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
| #if defined ESP8266 | |
| #include <ESP8266WiFi.h> | |
| #include <ESP8266WebServer.h> | |
| #elif defined ESP32 | |
| #include <WiFi.h> | |
| #include <WebServer.h> | |
| #endif | |
| #define SSID "--------" | |
| #define PASS "--------" |
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
| //----------------------------------------------------------------- | |
| class HWTimer32 { | |
| public: | |
| HWTimer32(uint8_t hw_timer_num /* 0,1,2,3 */): _hw_timer_num(hw_timer_num) {} | |
| bool setInterval_us(uint64_t period_us, void(*fn)(void)){ | |
| this->del(); | |
| _period = period_us; | |
| _t = timerBegin(_hw_timer_num,80,true); | |
| if(_t!=NULL) { | |
| timerAttachInterrupt(_t, fn, true); |
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 "esp_timer.h" | |
| class GTimerUS { | |
| public: | |
| GTimerUS(){} | |
| void setInterval_us(uint64_t period_us, esp_timer_cb_t fn,void *arg=NULL){ | |
| this->del(); | |
| _period = period_us; | |
| esp_timer_create_args_t _t_arg; | |
| _t_arg.callback = fn; |
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 <BlynkGO_Duino.h> | |
| #define ThaiID_Reader Serial2 | |
| enum { CMD_ID, CMD_IMAGE, CMD_ADDRESS, CMD_THAI_NAME, CMD_PLACE, | |
| CMD_CODE_UNDERCARD, CMD_DATE, CMD_ENG_NAME, CMD_BIRTHDAY, CMD_GENDER, CMD_MAX }; | |
| uint8_t cmd[][2] = { | |
| {0x30, 0x0D}, // id | |
| {0x31, 0x0D}, // image | |
| {0x32, 0x0D}, // address |
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 <BlynkGOv2.h> | |
| #define ThaiID_Reader Serial2 | |
| #define ThaiID_RX 14 | |
| #define ThaiID_TX 13 | |
| enum { CMD_ID, CMD_IMAGE, CMD_ADDRESS, CMD_THAI_NAME, CMD_PLACE, | |
| CMD_CODE_UNDERCARD, CMD_DATE, CMD_ENG_NAME, CMD_BIRTHDAY, CMD_GENDER, CMD_MAX }; | |
| uint8_t cmd[][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 <BlynkGOv2.h> | |
| char tis620_byte_1[] = {0x33, 0x33, 0x2F, 0x35, 0x20, 0x20, 0x20, 0x20, 0xB6, 0xB9, 0xB9, 0xA8, 0xC3, 0xD4, 0xA7, 0xA8, 0xD4, 0xB5, 0xC3, 0x20, 0xB5, 0xD3, 0xBA, 0xC5, 0xB7, 0xD1, 0xBA, 0xE0, 0xB7, 0xD5, 0xE8, 0xC2, 0xA7, 0x20, 0xCD, 0xD3, 0xE0, 0xC0, 0xCD, 0xE0, 0xC1, 0xD7, 0xCD, 0xA7, 0xB5, 0xC3, 0xD1, 0xA7, 0x20, 0xA8, 0xD1, 0xA7, 0xCB, 0xC7, 0xD1, 0xB4, 0xB5, 0xC3, 0xD1, 0xA7, 0x00}; | |
| char tis620_byte_2[] = {0x31, 0x31, 0x31, 0x2F, 0x32, 0x32, 0x32, 0x20, 0xCB, 0xC1, 0xD9, 0xE8, 0x20, 0x33, 0x33, 0x20, 0xB6, 0xB9, 0xB9, 0xCD, 0xD8, 0xB7, 0xD4, 0xC8, 0x20, 0xB5, 0xD3, 0xBA, 0xC5, 0xCB, 0xB9, 0xCD, 0xA7, 0xB9, 0xE9, 0xD3, 0xE0, 0xA2, 0xD5, 0xC2, 0xC7, 0x20, 0xCD, 0xD3, 0xE0, 0xC0, 0xCD, 0xBB, 0xE8, 0xD2, 0xCA, 0xD1, 0xA1, 0x20, 0xA8, 0xD1, 0xA7, 0xCB, 0xC7, 0xD1, 0xB4, 0xCD, 0xD8, 0xB4, 0xC1, 0xBA, 0xD8, 0xC3, 0xD5, 0x00}; | |
| char tis620_byte_3[] = {0x34, 0x34, 0x34, 0x2F, 0x35, 0x35, 0x35, 0x20, 0xB6, 0xB9, 0xB9, 0xC7, 0xD4, 0xB7, 0xC2, 0xD2, 0xB8, 0xC3, 0x20, 0xB5, 0xD3, 0xBA, 0xC5, 0x |
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 <BlynkGOv2.h> | |
| #define ThaiID_Reader Serial2 | |
| #define THAIID_RX 22 // กำหนดขา Serial2 RX | |
| #define THAIID_TX 25 // กำหนดขา Serial2 TX | |
| uint8_t CMD_THAINAME[2] = { 0x33, 0x0D }; | |
| GLabel label; |
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 <BlynkGOv2.h> | |
| #include <CircularBuffer.h> // ติดตั้งไลบรารี่โดยโหลดได้จาก https://github.com/rlogiacco/CircularBuffer | |
| #define Y_MAX 400 // ค่า Y MAX | |
| #define Y_MIN 200 // ค่า Y MIN | |
| #define POINT_CNT 20 // จน.จุด ที่ต้องการให้แสดง ใน chart | |
| GChart chart; | |
| serie_t serie1; |
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 <BlynkGOv2.h> | |
| GWiFiManager wifi_manager; | |
| GLabel lb_clock; | |
| GButton btn; | |
| void setup() { | |
| Serial.begin(115200); Serial.println(); | |
| BlynkGO.begin(); |
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 <BlynkGOv2.h> | |
| #include <TridentTD_EasyFreeRTOS32.h> // https://github.com/TridentTD/TridentTD_EasyFreeRTOS32 | |
| #include <SparkFun_AS7265X.h> // https://github.com/sparkfun/SparkFun_AS7265x_Arduino_Library | |
| #define TASK_MEM 2048 | |
| GButton btn; | |
| void setup() { | |
| Serial.begin(115200); Serial.println(); |