Skip to content

Instantly share code, notes, and snippets.

@TridentTD
TridentTD / ESP32WroomTFT2.8_SDTest.ino
Created September 18, 2022 12:58
ESP32WroomTFT2.8 : Test list files in SD
#include <SD.h>
//=============================================================
// https://randomnerdtutorials.com/esp32-spi-communication-arduino/
// ESP32 Default SPI Pins
// Many ESP32 boards come with default SPI pins pre-assigned.
// The pin mapping for most boards is as follows:
//
// SPI MOSI MISO SCLK CS
// VSPI GPIO 23 GPIO 19 GPIO 18 GPIO 5
@TridentTD
TridentTD / TridentTD_LCD_Message_Loop_Blinking.ino
Last active May 26, 2022 11:23
TridentTD_LCD_Message_Loop_Blinking
#include <BlynkGO_Duino.h> // โหลดจาก https://github.com/BlynkGO/BlynkGO_Duino
#include <LiquidCrystal_I2C.h>
#define LED1 14
#define LED2 15
#define SENSOR1 25
#define SENSOR3 27
GTimerDuino timer_lcd, timer_led2;
LiquidCrystal_I2C lcd(0x27,16,2);
@TridentTD
TridentTD / TridentPing.ino
Created February 26, 2020 05:41
ESP8266 IP List TridentPing
#include <ESP8266WiFi.h>
#include <Ticker.h>
extern "C" {
#include <user_interface.h>
#include <ping.h>
}
#define SSID "--------------"
#define PASSWORD "--------------"
@TridentTD
TridentTD / FirebaseESP8266Pro_get_steam
Last active February 20, 2020 12:09
FirebaseESP8266Pro_steam.ino
/* ตัวอย่างการ get steam สำหรับไลบรรี่ TridentTD_Firebase8266Pro.h (Licenced) v.2.0
* ตามปกติไลบรารี่นี้จะ stream อัตโนมัติ อยู่แล้วทำให้ code ไม่ซับซ้อน ในการ get แบบ streaming
* และสำหรับ v.2.0 จะมี FirebaseTimer มาให้ใช้ ได้ง่ายๆเพิ่มเข้ามาให้
*/
#include <ESP8266WiFi.h>
#include <TridentTD_Firebase8266Pro.h>
#define SSID "-----------"
#define PASSWORD "-----------"
@TridentTD
TridentTD / struct_tester.ino
Last active December 28, 2018 03:00
test struct and display
struct mystruct {
uint8_t x;
uint8_t y;
uint16_t u;
String name;
};
struct mystruct list[] = {
{0,1, 23425, "ไวไฟ"},
@TridentTD
TridentTD / unicode_utf8.cc
Created October 31, 2018 04:30 — forked from rechardchen/unicode_utf8.cc
C++: convert between utf8 and unicode
wstring UTF8toUnicode(const string& s)
{
wstring ws;
wchar_t wc;
for( int i = 0;i < s.length(); )
{
char c = s[i];
if ( (c & 0x80) == 0 )
{
wc = c;
@TridentTD
TridentTD / BlynkServer_Free.txt
Last active January 24, 2024 17:15
BlynkServer Free (more than 100,000 energy)
รวม Blynk Server ฟรี ที่
จะได้ Energy แบบเหลือเฟือใช้สะดวก
ใครมีเพิ่มเติม แจ้งเพิ่มได้เลยนะครับ
รวมไว้ที่เดียวกัน
#update 11 December 2018 @ 10:00
Total : 7 Free Blynk Server
----------------------------------------------------
1.
#include <SoftwareSerial.h>
SoftwareSerial ArduSerial(9, 8); // rx, tx
int analogPin = A0;
byte chuyenxuongbit =0;
void setup() {
Serial.begin(115200);
ArduSerial.begin(9600); // set same baudrate of the second arduino
DDRD = 0xFF;
#include <SoftwareSerial.h>
SoftwareSerial ArduSerial(9, 8); // rx, tx
byte chuyenxuongbit =0;
void setup() {
Serial.begin(115200);
ArduSerial.begin(9600); // set same baudrate of the first arduino
DDRD = 0xFF;
}