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
| /** | |
| * One Channel Receiver | |
| * Author: Shawn Hymel (SparkFun Electronics) | |
| * Date: Aug 17, 2017 | |
| * | |
| * Connect a TB6612FNG and RC (PWM) receiver to the Arduino. | |
| * Only works 1 channel for forward and back drive. | |
| * | |
| * This code is beerware; if you see me (or any other SparkFun | |
| * employee) at the local, and you've found our code helpful, |
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
| const int STBY_PIN = 9; | |
| const int AIN1_PIN = 2; | |
| const int AIN2_PIN = 4; | |
| const int APWM_PIN = 5; | |
| const int BIN1_PIN = 7; | |
| const int BIN2_PIN = 8; | |
| const int BPWM_PIN = 6; | |
| void setup() { |
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
| /** | |
| * Digital Compass | |
| * MAG3110 Demo | |
| * | |
| * Author: Shawn Hymel (SparkFun Electronics) | |
| * Based on SparkFun_MAG3110_Calibrated.ino by George B. | |
| * Date: July 25, 2017 | |
| * | |
| * Connect MAG3110 to MicroView. If "Calibrating" appears, | |
| * slowly rotate the MAG3110 sensor 360 degrees while flat on |
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 soft(10, 11); // Rx, Tx | |
| // Globals | |
| String utc = ""; // hhmmss.00 | |
| String lat = ""; // DDMM.MMMM N/S | |
| String lon = ""; // DDMM.MMMM E/W | |
| String alt = ""; // x meters |
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 soft(10, 11); // Rx, Tx | |
| void setup() { | |
| Serial.begin(9600); | |
| soft.begin(9600); | |
| } | |
| void loop() { |
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
| /** | |
| * Adventures in Science: Fred Bot | |
| * SparkFun Electronics | |
| * Author: M. Hord (October 8, 2013) | |
| * Modified by: B. Huang (October 31, 2014) | |
| * Modified by: Shawn Hymel (July 21, 2017) | |
| * | |
| * Use two magnetic encoders on Fred's motor shafts (48:1 | |
| * gearbox, 60mm wheels) to make him move in a straight line for | |
| * 1m. |
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
| // Parameters | |
| const int threshold = 600; | |
| const float multiplier = 1.4; | |
| // Pins | |
| const int i_pin = A1; | |
| const int q_pin = A0; | |
| const int led_pin = 8; | |
| const int lamp_pin = 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
| // Set this to enable serial debugging | |
| #define debug 1 | |
| // Only include SofwareSerial if we're debugging! | |
| #if (debug > 0) | |
| # include <SoftwareSerial.h> | |
| #endif | |
| #if (debug > 0) | |
| SoftwareSerial softy(2, 1); // RX, TX |
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
| /** | |
| * Qduino Picture Frame | |
| * Author: Shawn Hymel | |
| * Date: December 5, 2016 | |
| * | |
| * Digital picture frame based on the Qduino Mini and Adafruit | |
| * 2.2" LCD. Load microSD card with bitmap images with 240x320 | |
| * resolution. Name them sequentially: | |
| * 00.bmp | |
| * 01.bmp |
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 <ESP8266WiFi.h> | |
| #include <WiFiClient.h> | |
| // WiFi information | |
| const char WIFI_SSID[] = "AP SSID"; | |
| const char WIFI_PSK[] = "AP PASSWORD"; | |
| // Remote site information | |
| const char http_site[] = "api.usno.navy.mil"; | |
| const int http_port = 80; |