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
| from picamera2 import Picamera2 | |
| import cv2 | |
| import numpy as np | |
| # Load the TensorFlow model (frozen graph + pbtxt) | |
| model = cv2.dnn.readNetFromTensorflow( | |
| "frozen_inference_graph.pb", | |
| "ssd_mobilenet_v1_coco_2017_11_17.pbtxt" | |
| ) |
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
| from picamera2 import Picamera2 | |
| import cv2 | |
| picam2 = Picamera2() | |
| # Set up Auto Focus | |
| config = picam2.create_preview_configuration() | |
| picam2.configure(config) | |
| picam2.start() |
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
| from picamera2 import Picamera2 | |
| import cv2 | |
| picam2 = Picamera2() | |
| # Set up Auto Focus | |
| config = picam2.create_preview_configuration() | |
| picam2.configure(config) | |
| picam2.start() |
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
| from picamera2 import Picamera2 | |
| import cv2 | |
| # Initialize the camera | |
| picam2 = Picamera2() | |
| picam2.start() | |
| try: | |
| while True: | |
| # Capture frame from the camera |
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 <Wire.h> | |
| #include <IOXESP32_4-20mA_Receiver.h> | |
| Receiver4_20 sensor(&Wire, 0x45); // Default 0x45 | |
| void setup() { | |
| Serial.begin(115200); | |
| Wire.begin(); // Start I2C |
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 <TinkerC6.h> // เรียกใช้ไลบรารี่ Tinker C6 | |
| void setup() { | |
| Serial.begin(115200); // เริ่มใช้งาน Serial Monitor | |
| TinkerC6.Power.enable12V(); // สั่งเปิดใช้ไฟเลี้ยง 12V | |
| } | |
| void loop() { | |
| float mA = TinkerC6.Analog.getCurrent() + 0.08; // อ่านค่าช่อง 4-20mA เก็บลงตัวแปร mA | |
| float percent = (mA - 4.0) * 100.0 / (20.0 - 4.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
| float temp = 0, humi = 0; | |
| void readXY_MD02() { | |
| uint8_t buff[] = { | |
| 0x01, // Devices Address | |
| 0x04, // Function code | |
| 0x00, // Start Address HIGH | |
| 0x01, // Start Address LOW | |
| 0x00, // Quantity HIGH | |
| 0x02, // Quantity LOW |
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 char *index_html = R"rawliteral( | |
| <!DOCTYPE html> | |
| <html lang="th"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>ระบบเรียกคิว</title> | |
| <style> | |
| * { | |
| margin: 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
| #include <Arduino.h> | |
| #include <WiFi.h> | |
| #include <ESP32-HUB75-MatrixPanel-I2S-DMA.h> | |
| #include <ESPAsyncWebServer.h> | |
| #include "index.h" | |
| #define PANEL_RES_X 64 // Number of pixels wide of each INDIVIDUAL panel module. | |
| #define PANEL_RES_Y 32 // Number of pixels tall of each INDIVIDUAL panel module. | |
| #define PANEL_CHAIN 1 // Total number of panels chained one to another |
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 <Adafruit_GFX.h> | |
| #include "Adafruit_LEDBackpack.h" | |
| Adafruit_7segment matrix = Adafruit_7segment(); | |
| float temperature = 25.5; | |
| void setup() { | |
| matrix.begin(0x70); |
NewerOlder