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
| /* ---------------------------------------------------------------------- | |
| "Simple" Protomatter library example sketch (once you get past all | |
| the various pin configurations at the top, and all the comments). | |
| Shows basic use of Adafruit_Protomatter library with different devices. | |
| This example is written for a 64x32 matrix but can be adapted to others. | |
| Once the RGB matrix is initialized, most functions of the Adafruit_GFX | |
| library are available for drawing -- code from other projects that use | |
| LCDs or OLEDs can be easily adapted, or may be insightful for reference. |
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 <Adafruit_Protomatter.h> | |
| #include <Wire.h> | |
| #include <ArtronShop_SHT3x.h> | |
| uint8_t rgbPins[] = {42, 41, 40, 39, 38, 37}; // R1, G1, B1, R2, G2, B2 | |
| uint8_t addrPins[] = {48, 36, 45, 35}; // A, B, C, D | |
| uint8_t clockPin = 2; // CLK | |
| uint8_t latchPin = 47; // LAT | |
| uint8_t oePin = 14; // OE |
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 <Adafruit_Protomatter.h> | |
| #include <WiFi.h> | |
| #include <WiFiMulti.h> | |
| #include "time.h" | |
| uint8_t rgbPins[] = {42, 41, 40, 39, 38, 37}; // R1, G1, B1, R2, G2, B2 | |
| uint8_t addrPins[] = {48, 36, 45, 35}; // A, B, C, D | |
| uint8_t clockPin = 2; // CLK | |
| uint8_t latchPin = 47; // LAT | |
| uint8_t oePin = 14; // OE |
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 <driver/i2s.h> | |
| #include <math.h> | |
| // ─── กำหนดขา I2S ─────────────────────────────────────── | |
| #define I2S_BCK_PIN 26 // Bit Clock | |
| #define I2S_WS_PIN 25 // Word Select (LRCK) | |
| #define I2S_DATA_PIN 22 // Data Out → DIN ของโมดูล | |
| // ─── พารามิเตอร์เสียง ──────────────────────────────────── | |
| #define SAMPLE_RATE 44100 |
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 "Audio.h" | |
| // ─── กำหนดขา I2S ─────────────────────────────────────── | |
| #define I2S_BCK_PIN 26 | |
| #define I2S_WS_PIN 25 | |
| #define I2S_DATA_PIN 22 | |
| // ─── ข้อมูล Wi-Fi ──────────────────────────────────────── |
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 DE_RE_PIN 4 | |
| #define MODE_SEND HIGH | |
| #define MODE_RECV LOW | |
| void setup() { | |
| pinMode(DE_RE_PIN, OUTPUT); | |
| digitalWrite(DE_RE_PIN, MODE_RECV); | |
| Serial.begin(115200); | |
| Serial2.begin(9600, SERIAL_8N1, 16, 17); // 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
| 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 |
NewerOlder