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
| { | |
| "build": { | |
| "cpu": "cortex-m0", | |
| "extra_flags": "-DSTM32F070xB", | |
| "f_cpu": "48000000L", | |
| "framework_extra_flags": { | |
| "arduino": "-DVECT_TAB_OFFSET=0x2000 -DCUSTOM_STARTUP_FILE" | |
| }, | |
| "mcu": "stm32f070cbt6", | |
| "variant": "YAS-0_F070CB" |
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
| import http.client | |
| import time | |
| from pyfirmata import Arduino, util | |
| # Parameters | |
| COM_PORT = 'COM37' | |
| API_KEY = 'BMZ44FSBTE8JANSU' | |
| HOSTNAME = 'api.thingspeak.com' | |
| AREF = 5.0 |
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
| // Pins | |
| int echoPin = 5; | |
| int trigPin = 6; | |
| int switchPin = 7; | |
| const int BIN1 = 8; | |
| const int BIN2 = 9; | |
| const int PWMB = 10; | |
| const int PWMA = 11; | |
| const int AIN2 = 12; | |
| const int AIN1 = 13; |
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
| // Pins | |
| int switchPin = 7; | |
| const int BIN1 = 8; | |
| const int BIN2 = 9; | |
| const int PWMB = 10; | |
| const int PWMA = 11; | |
| const int AIN2 = 12; | |
| const int AIN1 = 13; | |
| // Parameters |
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 <WiFi.h> | |
| #include <SPIFFS.h> | |
| #include <ESPAsyncWebServer.h> | |
| #include <WebSocketsServer.h> | |
| // Constants | |
| const char *ssid = "ESP32-AP"; | |
| const char *password = "LetMeInPlz"; | |
| const char *msg_toggle_led = "toggleLED"; | |
| const char *msg_get_led = "getLEDState"; |
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
| /** | |
| * Qwiic Mux Spectral Demo | |
| * Author: Shawn Hymel (SparkFun Electronics) | |
| * Date: July 18, 2018 | |
| * | |
| * Reads from 2 light spectral sensors and shows amount of light | |
| * detected in each channel. | |
| * | |
| * Connect Qwiic Mux and Qwiic OLED to Arduino. Connect Visible | |
| * (AS7262) and NIR (AS7263) Spectral Sensor Qwiic Breakout |
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
| /* | |
| * Differential I2C Demo | |
| * Author: Shawn Hymel (SparkFun Electronics) | |
| * Date: May 24, 2018 | |
| * | |
| * Connect Qwiic OLED and Qwiic Environmental sensor to Arduino. | |
| * Demo will read and display temperature and humidity data. Try | |
| * adding 2x Differential I2C boards in between the Arduino and | |
| * Environmental sensor to place the sensor at some distance up to | |
| * 100 feet from the Arduino. |
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
| /** | |
| * GridEye LED Array Demo | |
| * Author: Shawn Hymel (SparkFun Electronics) | |
| * Date: May 1, 2018 | |
| * | |
| * Displays a heat map of what the GridEye sees (8x8 pixels). | |
| * | |
| * Required Components | |
| * - Arduino: https://www.sparkfun.com/products/13975 | |
| * - Qwiic Shield: https://www.sparkfun.com/products/14352 |
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
| /** | |
| * GridEye LED Array Demo | |
| * Author: Shawn Hymel (SparkFun Electronics) | |
| * Date: May 1, 2018 | |
| * | |
| * Displays a heat map of what the GridEye sees (8x8 pixels). | |
| * | |
| * Required Components | |
| * - Arduino: https://www.sparkfun.com/products/13975 | |
| * - Qwiic Shield: https://www.sparkfun.com/products/14352 |