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 <ESP32-HUB75-MatrixPanel-I2S-DMA.h> | |
#define PANEL_RES_X 32 // Number of pixels wide of each INDIVIDUAL panel module. | |
#define PANEL_RES_Y 16 // Number of pixels tall of each INDIVIDUAL panel module. | |
#define PANEL_CHAIN 1 // Total number of panels chained one to another | |
// Module configuration | |
HUB75_I2S_CFG mxconfig( | |
PANEL_RES_X, // module width |
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 <ESP32-HUB75-MatrixPanel-I2S-DMA.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 | |
// Module configuration | |
HUB75_I2S_CFG mxconfig( | |
PANEL_RES_X, // module width |
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 <Adafruit_GFX.h> | |
#include <Adafruit_Protomatter.h> | |
// Matrix Pin Configs | |
uint8_t rgbPins[] = { 42, 41, 40, 39, 38, 37 }; | |
uint8_t addrPins[] = { 36, 35, 46, 48 }; | |
uint8_t clockPin = 47; | |
uint8_t latchPin = 21; | |
uint8_t oePin = 2; |
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 <WiFiManager.h> // นำเข้าไลบรารี่ WiFiManager | |
#include <ArtronShop_LineMessaging.h> // นำเข้าไลบารี่ ArtronShop_LineMessaging | |
#define LINE_TOKEN "LINE Token" // Channel access token | |
WiFiManager wm; | |
void setup() { | |
Serial.begin(115200); // เริ่มต้นใช้ Serial ที่ความเร็ว 115200 | |
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> // นำเข้าไลบรารี่ WiFi | |
#include <ArtronShop_LineMessaging.h> // นำเข้าไลบารี่ ArtronShop_LineMessaging | |
const char* ssid = "WiFi Name"; // ชื่อ WiFi | |
const char* password = "WiFi Password"; // รหัสผ่าน WiFi | |
#define LINE_TOKEN "LINE Notify Token" // Channel access token | |
#define PIR_PIN (27) // กำหนดขาต่อเซ็นเซอร์ PIR | |
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
#include <WiFi.h> // นำเข้าไลบรารี่ WiFi | |
#include <ArtronShop_LineMessaging.h> // นำเข้าไลบารี่ ArtronShop_LineMessaging | |
const char* ssid = "WiFi Name"; // ชื่อ WiFi | |
const char* password = "WiFi Password"; // รหัสผ่าน WiFi | |
#define LINE_TOKEN "LINE Token" // Channel access token | |
void setup() { | |
Serial.begin(115200); // เริ่มต้นใช้ Serial ที่ความเร็ว 115200 | |
while (!Serial) { delay(100); } |
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
LINE_Messaging_Massage_Option_t option; // สร้างตัวแปร option | |
// ตั้งค่าส่งแผนที่ | |
option.map.service = LONGDO_MAP; // ใช้แผนที่จาก Longdo Map | |
// option.map.service = GOOGLE_MAP; // ใช้แผนที่จาก Google Map | |
option.map.lat = 13.91024; // ละติจูด | |
option.map.lng = 100.51108; // ลองจิจูด | |
option.map.zoom = 20; // ระยะซูม กำหนดได้ 1 - 20 | |
// option.map.api_key = "Google Map API Key"; // กรอก API Key หากใช้ Google Map |
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> // นำเข้าไลบรารี่ WiFi | |
#include <ArtronShop_LineMessaging.h> // นำเข้าไลบารี่ ArtronShop_LineMessaging | |
const char* ssid = "WiFi Name"; // ชื่อ WiFi | |
const char* password = "WiFi Password"; // รหัสผ่าน WiFi | |
#define LINE_TOKEN "LINE Token" // Channel access token | |
void setup() { | |
Serial.begin(115200); // เริ่มต้นใช้ Serial ที่ความเร็ว 115200 | |
while (!Serial) { delay(100); } |
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
LINE_Messaging_Massage_Option_t option; // สร้างตัวแปร option | |
option.image.url = "https://img2.pic.in.th/pic/IMG20230921232431.jpeg"; // ลิ้งรูป ไฟล์ JPEG ขนาดไม่เกิน 2048×2048px | |
if (LINE.send("User ID/Group ID", "รถโดยขโมย", &option)) { // ส่งข้อความ "รถโดนขโมย" ไปที่ LINE | |
Serial.println("Send notify successful"); | |
} else { | |
Serial.printf("Send notify fail. check your token (code: %d)\n", LINE.status_code); | |
} |
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> // นำเข้าไลบรารี่ WiFi | |
#include <ArtronShop_LineMessaging.h> // นำเข้าไลบารี่ ArtronShop_LineMessaging | |
const char* ssid = "WiFi Name"; // ชื่อ WiFi | |
const char* password = "WiFi Password"; // รหัสผ่าน WiFi | |
#define LINE_TOKEN "LINE Token" // Channel access token | |
void setup() { | |
Serial.begin(115200); // เริ่มต้นใช้ Serial ที่ความเร็ว 115200 | |
while (!Serial) { delay(100); } |