Skip to content

Instantly share code, notes, and snippets.

View bboyho's full-sized avatar

Ho Yun "Bobby" bboyho

View GitHub Profile
/*
Reading a serial ASCII-encoded string.
This sketch demonstrates the Serial parseInt() function.
It looks for an ASCII string of comma-separated values.
It parses them into ints, and uses those to fade an RGB LED.
Circuit: Common-Cathode RGB LED wired like so:
- red anode: digital pin 3
- green anode: digital pin 5
/*
Non Addressable RGB LED: Custom Color Mixing
Written by: Ho Yun "Bobby" Chan and Gella
SparkFun Electronics
1M Bare - https://www.sparkfun.com/products/12021
1M Sealed - https://www.sparkfun.com/products/12023
5B Bare - https://www.sparkfun.com/products/12022
5M Sealed - https://www.sparkfun.com/products/12024
//Debug mode, comment one of these lines out using a syntax
//for a single line comment ("//"):
//#define DEBUG 0 //0 = LEDs only
#define DEBUG 1 //1 = LEDs w/ serial output
// Define our LED pins:
#define redPin 5
#define greenPin 6
#define bluePin 9
@bboyho
bboyho / teensy_3_1_xbee_UART1_example.ino
Created October 16, 2019 05:55
Test of Teensy XBee Adapter
//Serial test using the hardware uart on pins 0/1 (UART1).
//Connect an XBee and Teensy 3.1 to the adapter board
//Connect an XBee to a serial terminal of your choice (USB dongle for example)
//
//Characters sent out the XBee terminal go:
// Onto the airwaves -> into UART1 RX -> out the serial monitor
//
//Characters sent out the serial monitor go:
// Out the UART1 TX pin -> onto the airwaves -> out the SBee serial terminal
//
/******************************************************************************
template.ino
Template
WRITTEN BY:
@ SparkFun Electronics
DATE:
GITHUB REPO:
DEVELOPMENT ENVIRONMENT SPECIFICS:
Firmware developed using Arduino IDE v1.8.9
//Create brightness variable
//Ranging from 0.0-1.0:
// 0.0 is off
// 0.5 is 50%
// 1.0 is fully on
float brightness_LED = 0.7;
float knobValue = 0.0;
//.
//.
/******************************************************************************
SparkFun_TMP117_Breakout_Example.ino
Example for the TMP117 I2C Temperature Sensor
Madison Chodikov @ SparkFun Electronics
May 29 2019
~
This sketch configures the TMP117 temperature sensor and prints the
alert state of the temperature sensor.
/******************************************************************************
TMP117vsTMP36.ino
Modified Example 1 to Compare the Precision of TMP117 against TMP36
Madison Chodikov @ SparkFun Electronics
Modified by Ho Yun "Bobby" Chan
May 29 2019
~
This sketch configures the TMP117 temperature sensor and prints the
temperature in degrees celsius and fahrenheit. For comparison, the