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
| #pragma once | |
| // html_page.h | |
| // Place this file in the SAME folder as ESP32_PCA9685_ServoWS.ino | |
| // Arduino's prototype-generator only scans .ino files, so JavaScript | |
| // "function" keywords inside this string won't cause compile errors. | |
| const char INDEX_HTML[] PROGMEM = R"HTMLEOF( | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> |
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
| /* | |
| * ESP32 + PCA9685 Servo Controller with WebSocket GUI | |
| * ===================================================== | |
| * Controls servos 0-3 on PCA9685 via a browser-based dashboard. | |
| * | |
| * FOLDER STRUCTURE (both files must be in the same sketch folder): | |
| * ESP32_PCA9685_ServoWS/ | |
| * ESP32_PCA9685_ServoWS.ino ← this file | |
| * html_page.h ← HTML dashboard (included below) | |
| * |
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
| #!/usr/bin/env python3 | |
| """ | |
| RS-LDO-N01-1 Fluorescence Dissolved Oxygen Sensor | |
| Raspberry Pi — USB to RS485 reader | |
| Default: address 0x01, baud 4800 | |
| """ | |
| import serial | |
| import struct | |
| import time |
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
| /* -------------------------------------------------------------------------- */ | |
| /* RS-LDO-N01-1 — Auto Scanner (address + baud rate) */ | |
| /* -------------------------------------------------------------------------- */ | |
| #include <Arduino.h> | |
| #include <SoftwareSerial.h> | |
| #include <ModbusMaster.h> | |
| EspSoftwareSerial::UART mySerial; |
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
| /** | |
| PS2 Wireless Controller Data Streaming | |
| Modified for web visualization with structured data format | |
| Messages prefixed with: | |
| - DATA: Controller state data | |
| - LOG: User information | |
| - ERROR: Error messages | |
| - WARN: Warning messages | |
| **/ |
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
| /* | |
| ESP8266 Board Tester (I/O + WiFi) | |
| - Arduino core for ESP8266 | |
| - Features: | |
| * Serial menu for quick tests | |
| * Simple web UI to view digital inputs & ADC, toggle outputs | |
| * WiFi scan, connect (via Serial), start SoftAP | |
| Pin notes: | |
| - Be careful with GPIO0, GPIO2, GPIO15: they affect boot. Use them carefully. | |
| - A0 is ADC (analogRead) |
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 <Arduino.h> | |
| #include "HX711.h" | |
| #include <Preferences.h> | |
| // HX711 circuit wiring | |
| #define LOADCELL_DOUT_PIN 27 | |
| #define LOADCELL_SCK_PIN 26 | |
| HX711 scale; | |
| Preferences preferences; |
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
| /** | |
| * ตัวอย่างโค้ดสำหรับการใช้งาน TCS3200 Sensor บน ESP32 | |
| * พร้อมการปรับเทียบเซ็นเซอร์เพื่อให้สามารถอ่านค่าสีได้อย่างแม่นยำ | |
| * | |
| * วิธีการต่อสาย: | |
| * | ESP32 Pin | TCS3200 Pin | | |
| * |------------|-------------| | |
| * | 3.3v | Vcc | | |
| * | GND | GND | | |
| * | 3.3v | LED | |
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
| #define TCS34725_ADDRESS 0x29 | |
| #define TCS34725_COMMAND_BIT 0x80 | |
| SoftI2C SoftWire1(25, 26); | |
| SoftI2C SoftWire2(27, 14); | |
| // Assume S0 goes HIGH, S1 goes LOW | |
| #define S2 26 /*Define S2 Pin Number of ESP32*/ | |
| #define S3 25 /*Define S3 Pin Number of ESP32*/ |
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 <Arduino.h> | |
| #define S2 26 /*Define S2 Pin Number of ESP32*/ | |
| #define S3 25 /*Define S3 Pin Number of ESP32*/ | |
| #define sensorOut 14 /*Define Sensor Output Pin Number of ESP32*/ | |
| /*Define int variables*/ | |
| int Red = 0; | |
| int Green = 0; | |
| int Blue = 0; |
NewerOlder