[EN] Queue data structure with array and Singly Linked List.

This article describes Queue Data Structures previously written in the Python Queue Data Structure article and is frequently used with the MicroPython example, but this article is written in C via Arduino IDE to use with microcontroller board LGT8F328P, SAM-D21, ESP8266, ESP32 and ESP32-S2 as shown in Figure 1 by using an example of the array structure and a single link list as a queued data structure. This article is probably the last article on JarutEx.

Figure 1 ESP32-S2, LGY8P326P and SAM-D21
Read More

[EN] Stack data structure with Singly Linked List.

This article describes a stack data structure to write programs in C on various platforms using a single linked list data structure as a stack data store with examples of the array as storage and test the operation with the microcontroller board LGT8F328P, SAM-D21, ESP8266, ESP32 and ESP32-S2 as shown in Figures 1 and 2. In case of wanting to use with other platforms, you can still modify the code for use such as the same.

Figure 1 ESP32, LGY8P326P and SAM-D21
Read More

[EN] Arduino: Using the ST7735s module with an ESP32-S2 via the TFT_eSPI library.

This article describes the use of the ST7735s module with the ESP32-S2 microcontroller via the TFT_eSPI library. We have previously discussed its implementation with the ESP32 and STM32F103C microcontrollers, and the chosen TFT module as REDTAB80x160 (added code for GREENTAB80x160 at the end of the article), but you can adjust the settings to other modules, see the User_Setup.h file of the TFT_eSPI library as shown in Figure 1.

Figure 1 0.96″ IPS TFT module with ESP32-S2
Read More

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

After testing the DAC and ADC of both the ESP32, SAM-D21, LGT8F328P and STM32L432KC, This time, it’s the time of the ESP32-S2 that we have. The test performance is still the same as before using the DAC. Three types of waves are sent out: zigzag, triangular, and sine waves and connect to the ADC pin to read the value and test the graph to see what it looks like.

In this experiment, DAC1 is connected to the ADC as shown in Figure 1. The ESP32-S2 has 2 ports of 8-bit DAC called DAC1 and DAC2. The ADC has a 12-bit resolution, which is seen to have the same properties as the ESP32, but whether the results are the same or not, you can tell that they are probably different because they use different microcontrollers. The ESP32-S2 uses the same one as the ESP32-S3 with only one core and no BLE.

Figure 1 Neucleo L432KC with A3 connected to D3
Read More

[EN] Binary Search Tree data structure programming with Python.

In the previous article, programming to implement queue-based data structures was introduced. In this article, we introduce programming to manage another type of data structure which has different storage and management methods called BST tree or Binary Search Tree, as shown in Figure 1, which is a structure that can be applied to data collection with attributes in which the data in the left branch is less than itself and the right branch is greater than itself or the opposite, i.e. the left branch has a greater value and the right branch is less. It enables searching for data in cases where the tree is balanced on the left and right in the BST structure, saving half the time or number of search times per round of available data, e.g. 100 data sets in the first round if it is not the information you are looking for will be left with a choice to find from the left or right branches which the selection causes the information of the other side is not considered or cut off approximately half. However, if the Binary Search Tree is out of balance, the search speed is not much different from the sequential search.

In this article, we use Python that works on either a Python 3 or MicroPython interpreter to store the data, adding information ,searching for information as an example of further development.

BST : Binary Search Tree
Figure 1 BST
Read More

[TH] Queue data structure with array and Singly Linked List.

บทความนี้เป็นการอธิบายเกี่ยวกับโครงสร้างข้อมูลแบบคิว (Queue) ซึ่งได้เคยเขียนถึงไปในบทความ Queue Data Structure ที่เป็นภาษาไพธอนและถูกนำไปใช้บ่อยกับตัวอย่างของ MicroPython แต่บทความนี้เป็นภาษา C ที่เขียนผ่าน Arduino IDE เพื่อใช้งานกับบอร์ดไมโครคอนโทรลเลอร์ LGT8F328P, SAM-D21, ESP8266, ESP32 และ ESP32-S2 ดังภาพที่ 1 โดยยกตัวอย่างการนำโครงสร้างแถวลำดับ และลิงค์ลิสต์เดี่ยวมาเป็นโครงสร้างข้อมูลแบบคิว และคงเป็นบทความสุดท้ายบน JarutEx แล้วครับ

ภาพที่ 1 บอร์ดไมโครคอนโทรลเลอร์ ESP32-S2, LGY8P326P และ SAM-D21
Read More

[TH] Stack data structure with Singly Linked List.

บทความนี้เป็นการอธิบายเกี่ยวกับโครงสร้างข้อมูลแบบสแต็ก (Stack) เพื่อเขียนโปรแกรมด้วยภาษา C บนแพล็ตฟอร์มต่าง ๆ โดยใช้โครงสร้างข้อมูลแบบลิงค์ลิสต์เดี่ยวเป็นที่เก็บข้อมูลของสแต็กพร้อมตัวอย่างการแถวลำดับเป็นที่เก็บข้อมูล และทดสอบการทำงานกับบอร์ดไมโครคอนโทรลเลอร์ LGT8F328P, SAM-D21, ESP8266, ESP32 และ ESP32-S2 ดังภาพที่ 1 และ 2 ส่วนกรณีที่ต้องการไปใช้กับแพล็ตฟอร์มอื่น ๆ ยังคงสามารถดัดแปลงโค้ดเพื่อนำไปใช้ได้เช่นเดียวกัน

ภาพที่ 1 บอร์ดไมโครคอนโทรลเลอร์ ESP32, LGY8P326P และ SAM-D21
Read More

[TH] Arduino: Using the ST7735s module with an ESP32-S2 via the TFT_eSPI library.

บทความนี้เป็นการใช้โมดูล ST7735s กับไมโครคอนโทรลเลอร์ ESP32-S2 ผ่านไลบรารี TFT_eSPI โดยในก่อนหน้านี้ได้กล่าวถึงการใช้งานกับไมโครคอนโทรลเลอร์ ESP32 และ STM32F103C ไปแล้ว และโมดูล TFT ที่เลือกใช้เป็น REDTAB80x160 (ได้เพิ่มเติมโค้ดสำหรับ GREENTAB80x160 ในตอนท้ายบทความ) แต่สามารถปรับดารตั้งค่าเป็นโมดูลอื่น ๆ ได้ โดยดูรายละเอียดจากไฟล์ User_Setup.h ของไลบรารี TFT_eSPI ดังภาพที่ 1

ภาพที่ 1 โมดูลแสดงผล TFT ขนาด 0.96″ แบบ IPS กับ ESP32-S2
Read More

[EN] How to build MicroPython for esp32-s2.

This article discusses compiling and using MicroPython for an esp32-s2 microcontroller based on the TTGO ESP32-S2 V1.1 or TTGO ESP32-S2-WOOR V1.1 board with a Type-C USB port and supports operation via CH340C and OTG by using a dip switch as shown in Figure 1, enabling MicroPython to be used because the chip program uses the CH340’s circuit programming and Python programming requires a port that works like OTG

TTGO ESP32-S2 V1.1
Figure 1 TTGO ESP32-S2 V1.1
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