[EN] How to used Arduino 2.4″ TFT LCD&Touch Shield with STM32F401?

From the previous article that has used a 3.5″ display for Raspberry Pi Board to use with ESP32, we also have an Arduino 2.4″ TFT LCD & Touch Shield that is used with Arduino Uno and Arduino Mega (as shown in Figure 1. ) and want to use with a microcontroller STM32F401RET6 Board NUCLEO-F401RE and STM32F401CC (Figure 2), which are Cortex-M4 with 96KB and 64KB memory respectively, ROM memory is 512KB and 128KB, with 8 switches connected to the pin. In this article, Board ET-TEST 10P/INP (Figure 3) is used to replace the left, up, down, right, m1,m2, A and B buttons respectively.

Nucleo-F401RE+Arduino Uno 2.4" TFT&Touch Shield
(Figure. 1 Arduino Uno TFT&Touch Shield module on Nucleo-F401RE)
Read More

[TH] Arduino: STM32F103CBT6 ADC&LDR.

จากที่ได้อ่านบทความการใช้ ADC ของบอร์ด STM32L432 และบทความเกี่ยวกับ STM32F103x ในการเชื่อมต่อกับ ST7735S เลยถึงคราวนำ STM32F103CBT6 หรือบอร์ด Blue-Pill/Black-Pill มาเขียนโปรแกรมใช้งาน ADC เพื่อแสดงผลบนจอ TFT กันบ้าง โดยตัวอย่างผลลัพธ์ของบทความนี้เป็นดังภาพที่ 1 อันเป็นการอ่านค่าจากขา PA0 ที่ได้เชื่อมต่อกับขาสัญญาณแอนาล็อกจากบอร์ด LDR ในภาพที่ 2 เพื่อแสดงผลบนจอแสดงผลแบบ TFT

ภาพที่ 1 ตัวอย่างการทำงานของโปรแกรมในบททความ
Read More

[EN] How to used RPi 3.5″ TFT LCD&Touch Shield with esp32?

Because we bought a 3.5″ display for the Raspberry Pi board to use and wonder if it can be used with the ESP32 board or not. Therefore, this article talks about how to use a TFT LCD Shield designed for Waveshare’s Raspberry Pi with the TTGO T8 ESP32 microcontroller via the TFT_eSPI library to display and operate a touch screen system as shown in Figure 1.

(Figure. 1 When use with ESP32)
Read More

[EN] Understand and use the ESP32-C3

We have been using the esp8266, especially the esp-01 and esp-01s modules, to manage the sensor network for quite some time and with the limitation in terms of the number of pins used, the system must be designed to work with STM32F103C8T6 or STM32F401CCU6/STM32F411CEU6. To ensure stable operation, no problems with the esp8266’s WDT were encountered, and over time, espressif released several other microcontrollers such as esp32, esp32-s2, esp32-c3 and esp32-s3.

We have tested and used esp32 almost all the time until esp32-s2 with LILYGO board made us try to order it. The main problem is that the development tools are very late. However, as of now, espressif has released a development kit for Arduino or Arduino Core for ESP32 version 2.0 with support for esp32 esp32-s2 and esp32c3, making it work with ESP32 and ESP32-S2. We got the esp-c3-32s board so this article was born.

This article is compiled from the datasheet of ESP32-C3 WROOM-02, in this article we use the board as shown in Figure 1. The example program is to drive an RGB LED on the board to work by using Arduino Core for ESP32 and the improved ESP-IDF from the article in Ep. 3

(Figure. 1 ESP32-C3)
Read More

[EN] ESP-NOW

The article discusses the use of communication developed by espressif to communicate between its microcontrollers via wireless communication, as an alternative to the development of a non-linear  Client/Server system. It describes the working process of working as a service provider, commander, and a set of related instructions through the Arduino core, along with explaining the working examples that come with both Arduino cores, which are basic and Multi-slave, which can be applied variously.

Read More

[EN] ST7735s

This article describes setting up the Arduino’s TFT_eSPI library to use the ST7735s-controlled TFT LCD that was written as an example in a previous article in Python. We found that there are 2 0.96″ LCD IPS ST7735s models, which are GREENTAB160x80 and REDTAB160x80. Both modules differ in the spacing between them, as shown in Figure 1. This article uses the ESP8266, ESP32 DO-IT DevKit version with ESP32CAM and STM32F103C8T6. It is a board to test the functionality of the program.

(Figure. 1 0.96” IPS TFT module)
Read More

[EN] Display time from NTP and TimeLib with esp8266

This article is an example of using the Arduino framework’s NTP and TimeLib libraries with either the ESP-01s (Figure 1) or esp8266 to report the current time via the web served by the esp8266, which in this example is called NTPClient and TimeLib libraries. An Internet connection is required to read the date and time from an NTP provider such as time.nist.gov.

(Figure. 1 ESP-01s on dCore-0 v.0.7)
Read More

[TH] Arduino: ESP32 PWM.

บทความนี้กล่าวถึงการใช้ PWM (Pulse Width Modulate) ของไมโครคอนโทรลเลอร์ ESP32 ในเฟรมเวิร์ก Arduino หลังจากที่ได้กล่าวถึงการทำงานของส่วนนี้ใน ESP-IDF และ MicroPython ไปแล้ว โดยบทความกล่าวถึงฟังก์ชัน การใช้งาน และตัวอย่างโปรแกรม ด้วยการเชื่อมต่อบอร์ดกับลำโพงดังภาพที่ 1

ภาพที่ 1 บอร์ด esp32G2 ที่ติดตั้งลำโพงแบบบัซเซอร์ไว้ที่ GPIO19
Read More

[TH] Arduino: ESP32-S2’s DAC&ADC.

หลังจากที่ทดสอบ DAC และ ADC ของทั้ง ESP32, SAM-D21, LGT8F328P และ STM32L432KC เป็นที่เรียบร้อย ครั้งนี้ก็เป็นคราวของ ESP32-S2 ที่ทางเรามีใช้งานอยู่ โดยการทดสอบการทำงานยังคงเป็นเหมือนก่อนหน้านี้ที่ใช้ DAC ส่งคลื่น 3 ลักษณะคือ ฟันปลา สามเหลี่ยม และคลื่นรูปไซน์ออกมา และเขื่อมต่อเข้ากับขาของ ADC เพื่อนอ่านค่า พร้อมทั้งทดสอบดูกราฟว่ามีลักษณะออกมาเป็นอย่างไร

ในการทดลองนี้ได้เชื่อมต่อ DAC1 เข้ากับ ADC ดังภาพที่ 1 โดย ESP32-S2 มี DAC ขนาด 8 บิตจำนวน 2 พอร์ตเรียกว่า DAC1 และ DAC2 ส่วน ADC มีความละเอียด 12 บิต ซึ่งจะเห็นว่ามีคุณสมบัติเหมือนกับ ESP32 แต่จะได้ผลลัพธ์เหมือนกันหรือไม่นั้นคงบอกได้ว่าน่าจะแตกต่างเนื่องจากใช้ไมโครคอนโทรลเลอร์คนละรุ่นกัน โดยใน ESP32-S2 ใช้ตัวเดียวกับ ESP32-S3 ที่มีเพียงแกนเดียว และไม่มี BLE

ภาพที่ 1 บอร์ด Neucleo L432KC เชื่อมต่อขา A3 เข้ากับ D3
Read More

[TH] Try the SoftHost USB library for ESP32.

บทความนี้เป็นตัวอย่างการนำ ESP32 Soft Host ของ nathalis มาทดลองใช้งานและทดลองแสดงผลที่จอแสดงผล OLED ที่มีความละเอียด 128×64 จุด ดังภาพที่ 1 เพื่อรับข้อมูลจากแป้นพิมพ์ หรือเมาส์ ทำให้ใช้ GPIO เพียงไม่กี่ขาแต่สามารถรับข้อมูลจากแป้นพิมพ์ที่มีจำนวนปุ่มที่เยอะได้ ซึ่งโดยปกติแล้วตัวไมโครคอนโทรลเลอร์ ESP32 ไม่รองรับการทำเชื่อมต่อกับ USB โดยตรงจึงต้องอาศัยการเขียนโปรแกรมด้วยการใช้ตัวตั้งเวลาหรือ Timer มาตรวจสอบสถานะของสายสัญญาณขา D- และ D+ เพื่อนำมาประกอบกันเป็นข้อมูลในระดับไบต์และนำมาประกอบกันเป็นแพ็คของข้อมูลเพื่อทำการตีความต่อไป

ภาพที่ 1 อุปกรณ์และบอร์ดที่เชื่อมต่อกันเพื่อเป็นตัวอย่างในบทความนี้
Read More