Created
August 22, 2025 14:55
-
-
Save maxpromer/5130fe9be2f2907b74a9ea65f11716ec to your computer and use it in GitHub Desktop.
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.RS485.begin(9600); // เริ่มใช้งาน RS485 | |
} | |
void loop() { | |
TinkerC6.RS485.enable(); // เปิดใช้งานส่วน RS485 | |
TinkerC6.RS485.println("Hello, RS485 !"); // ส่งข้อความออก RS485 | |
TinkerC6.RS485.flush(); // รอจนกว่าจะส่งข้อความผ่าน RS485 เสร็จ | |
TinkerC6.RS485.disable(); // ปิดใช้งานส่วน RS485 | |
TinkerC6.Power.enterToLightSleep(1000); // หน่วงเวลา 1 วินาที ด้วย Light Sleep Mode | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment