Skip to content

Instantly share code, notes, and snippets.

@maxpromer
Created August 22, 2025 14:32
Show Gist options
  • Select an option

  • Save maxpromer/10f194378976f52eea6285acebf2b02d to your computer and use it in GitHub Desktop.

Select an option

Save maxpromer/10f194378976f52eea6285acebf2b02d to your computer and use it in GitHub Desktop.
#include <TinkerC6.h>// เรียกใช้ไลบรารี่ Tinker C6
void setup() {
Serial.begin(115200); // เริ่มใช้งาน Serial Monitor
Serial.println("--- Begin ---"); // แสดงข้อความใน Serial Monitor
Serial.println("Enter to Light Sleep 5 sec"); // แสดงข้อความใน Serial Monitor
Serial.flush(); // รอจนกว่าจะส่งข้อมูลไปที่ Serial Monitor เสร็จ
TinkerC6.Power.enterToLightSleep(5000); // เข้า Light Sleep Mode เป็นเวลา 5 วินาที
Serial.println("Enter to Deep Sleep 5 sec"); // แสดงข้อความใน Serial Monitor
Serial.flush(); // รอจนกว่าจะส่งข้อมูลไปที่ Serial Monitor เสร็จ
TinkerC6.Power.enterToDeepSleep(5000); // เข้า Deep Sleep Mode เป็นเวลา 5 วินาที
}
void loop() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment