Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python3
import notecard
from notecard import hub
from periphery import I2C
import time
#import serial
# init both notecards
productUID = "com.your.productuid:here"
port = I2C("/dev/i2c-1")
#!/usr/bin/python3
import notecard
from notecard import hub
from periphery import I2C
import cv2
import keys
import time
from picamera2 import Picamera2
from smbus2 import SMBus
from bme280 import BME280
@rdlauer
rdlauer / main.cpp
Created November 15, 2023 21:47
Example of downloading/uploading binary data with a Blues Notecard
#include <Arduino.h>
#include <Wire.h>
#include <Notecard.h>
#include <SD.h>
Notecard notecard;
File myImageFile;
Sd2Card card;
SdVolume volume;
SdFile root;
@rdlauer
rdlauer / main.js
Last active January 28, 2022 20:28
Notecard vs Softcard on Node.js
const SerialPort = require('serialport')
const Readline = require('@serialport/parser-readline')
const port = new SerialPort('/dev/ttys001') // ** softcard **
//const port = new SerialPort('/dev/cu.usbmodemNOTE1') // ** notecard **
const parser = port.pipe(new Readline({ delimiter: '\r' }))
port.on('open', showPortOpen);
port.on('close', showPortClose);
port.on('error', showError);
//port.on('data', showSerialData);