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
/* | |
OpenLCD is an LCD with Serial/I2C/SPI interfaces. | |
By: Nathan Seidle | |
SparkFun Electronics | |
Date: November 12th, 2015 | |
License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). | |
OpenLCD gives the user multiple interfaces (serial, I2C, and SPI) to control an LCD. SerLCD was the original | |
serial LCD from SparkFun that ran on the PIC 16F88 with only a serial interface and limited feature set. | |
This is an updated serial LCD. |
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
#include "Wire.h" | |
#include <Sparkfun_APDS9301_Library.h> | |
APDS9301 apds; | |
#define INT_PIN 2 // We'll connect the INT pin from our sensor to the | |
// INT0 interrupt pin on the Arduino. | |
bool lightIntHappened = false; // flag set in the interrupt to let the | |
// mainline code know that an interrupt occurred. | |
int threshold = 26; |
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
/* | |
SparkFun Inventor’s Kit | |
Circuit 1C-Photoresistor | |
Use a photoresistor to monitor how bright a room is, and turn an LED on when it gets dark. | |
This sketch was written by SparkFun Electronics, with lots of help from the Arduino community. | |
This code is completely free for any use. | |
View circuit diagram and instructions at: https://learn.sparkfun.com/tutorials/sparkfun-inventors-kit-experiment-guide---v40 |
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
/* | |
SparkFun Inventor’s Kit | |
Circuit 1C-Photoresistor | |
Use a photoresistor to monitor how bright a room is, and turn an LED on when it gets dark. | |
This sketch was written by SparkFun Electronics, with lots of help from the Arduino community. | |
This code is completely free for any use. | |
View circuit diagram and instructions at: https://learn.sparkfun.com/tutorials/sparkfun-inventors-kit-experiment-guide---v40 |
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).** |
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).** |
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
/****************************************************************************** | |
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
// 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. |