This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************** | |
template.ino | |
Template | |
WRITTEN BY: | |
@ SparkFun Electronics | |
DATE: | |
GITHUB REPO: | |
DEVELOPMENT ENVIRONMENT SPECIFICS: | |
Firmware developed using Arduino IDE v1.8.9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We'll use SoftwareSerial to communicate with the XBee: | |
//#include <SoftwareSerial.h> | |
//For Atmega328P's | |
// XBee's DOUT (TX) is connected to pin 2 (Arduino's Software RX) | |
// XBee's DIN (RX) is connected to pin 3 (Arduino's Software TX) | |
//SoftwareSerial XBee(2, 3); // RX, TX | |
//For Atmega2560, ATmega32U4, etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************** | |
PIR_Screensaver_wake-up.ino | |
Modified by: Ho Yun "Bobby" Chan | |
June 4th, 2019 | |
Original sketch for SparkFun's PIR Motion Detector | |
(https://www.sparkfun.com/products/13285) | |
Jim Lindblom @ SparkFun Electronics | |
May 2, 2016 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
SoftwareSerial xbee(2, 3); //Rx = 2, Tx = 3 | |
//Declare variables and pin definitions | |
//SEND Button | |
const int button1Pin = 4; //push button | |
const int ledPin1 = 13; //LED on the push button |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************** | |
servo-skatch.ino | |
Example sketch for connecting a hobby servo to a sparkfun redboard | |
(https://www.sparkfun.com/products/9065) | |
(https://www.sparkfun.com/products/12757) | |
Byron Jacquot@ SparkFun Electronics | |
May 17, 2016 | |
**SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).** |