Advertisement

[EN] Binary Search Tree

This article is about programming C/C++ language with Arduino Nano, Arduino Uno, LGT8F328P [NANO F328P-C] and ET-BASE AVR EASY32U4 (Figure 1) or other boards and platforms using C language for learning to code another type of data structure management program that has different storage and management methods, called BST or Binary Search Tree, as in Figure 2, which is a structure that can be applied to collecting data with attributes in which the data on the left node is less than current node and the right node is greater than current node or the opposite, the left node is greater and the right noe is less. Thus, searching for data in the event that the tree is balanced both left and right on the BST structure saves time or number of searches per round by half of available data, for example, there are 100 data sets in the first round, if the current node is not what you’re looking for it, the choice left is to find from the left or right node. This selection causes the data of the other side to be ignored or cut it in half approximately but if the Binary Search Tree is unbalanced, the search speed will not be much different from the Sequential Search.

ET-BASE AVR EASY32U4
Figure 1 ET-BASE AVR EASY32U4
Read More
Advertisement

[EN] Doubly Linked-List

This article is about programming C/C++ language with Arduino Nano, Arduino Uno, LGT8F328P [NANO F328P-C], ET-BASE AVR EASY32U4 or other boards and platforms that use C language to store temperature/humidity data from the DHT11 sensor (Figure 1) with a dual linked list data structure. The basics of memory reservation, access, memory deallocation can be read in the previous article (Singly Linked List).

Figure 1 Arduino Uno and DHT11
Read More
Advertisement

[TH] Binary Search Tree

บทความนี้เป็นการเขียนโปรแกรมภาษา C/C++ กับบอร์ด Arduino Nano, Arduino Uno, LGT8F328P [NANO F328P-C] และ ET-BASE AVR EASY32U4 (ภาพที่ 1) หรือบอร์ดอื่น ๆ และแพล็ตฟอร์มอื่น ๆ ที่ใช้ภาษา C เพื่อเรียนรู้การเขียนโปรแกรมจัดการโครงสร้างข้อมูล (Data Structure) อีกประเภทหนึ่งซึ่งมีวิธีการจัดเก็บและจัดการที่แตกต่างกันไปอันมีชื่อว่าต้นไม้แบบ BST หรือ Binary Search Tree ดังในภาพที่ 2 ซึ่งเป็นโครงสร้างที่สามารถนำไปประยุกต์เกี่ยวกับการเก็บข้อมูลที่มีคุณลักษณะที่ข้อมูลทางกิ่งด้านซ้ายมีค่าที่น้อยกว่าตัวเอง และกิ่งด้านขวามีค่ามากกว่าต้นเอง หรือทำตรงกันข้ามคือกิ่งซ้ายมีค่ามากกว่า และกิ่งด้านขวามีค่าน้อยกว่า ทำให้การค้นหาข้อมูลในกรณีที่ต้นไม้มีความสมดุลย์ทั้งทางซ้ายและทางขวาบนโครงสร้าง BST ประหยัดเวลาหรือจำนวนครั้งในการค้นหาลงรอบละครึ่งหนึ่งของข้อมูลที่มี เช่น มีข้อมูล 100 ชุด ในรอบแรกถ้าตัวเองยังไม่ใช่ข้อมูลที่กำลังค้นหา จะเหลือทางเลือกให้หาจากกิ่งทางซ้ายหรือขวา ซึ่งการเลือกทำให้ข้อมูลของอีกฝั่งนั้นไม่ถูกพิจารณา หรือตัดทิ้งไปครึ่งหนึ่งโดยประมาณ แต่ถ้าเป็นกรณีที่ Binary Search Tree นั้นขาดความสมดุลย์จะส่งผลให้การค้นหามีความเร็วไม่แตกต่างกับการค้นหาแบบลำดับ (Sequential Search) เท่าใดนัก

ET-BASE AVR EASY32U4
ภาพที่ 1 บอร์ด ET-BASE AVR EASY32U4
Read More
Advertisement

[TH] Doubly Linked-List

บทความนี้เป็นการเขียนโปรแกรมภาษา C/C++ กับบอร์ด กับบอร์ด Arduino Nano, Arduino Uno, LGT8F328P [NANO F328P-C] และ ET-BASE AVR EASY32U4 หรือบอร์ดอื่น ๆ และแพล็ตฟอร์มอื่น ๆ ที่ใช้ภาษา C เพื่อจัดเก็บข้อมูลอุณหภูมิ/ความชื้นจากเซ็นเซอร์ DHT11 (ดังภาพที่ 1) ด้วยโครงสร้างข้อมูลแบบลิงค์ลิสต์คู่ โดยพื้นฐานของการจองหน่วยความจำ การเข้าถึง การยกเลิกการจองหน่วยความจำสามารถอ่านได้จากบทความก่อนหน้านี้ (Singly Linked List)

ภาพที่ 1 บอร์ด Arduino Uno และเซ็นเซอร์ DHT11
Read More
Advertisement

[EN] Ender 3 V2

This article talks about the Ender 3 V2 3D printer, which is an improvement from Creality’s most popular models, Ender 3, Ender 3 Pro, with improvements in ease of assembly, usability, part quality, etc. This 3D printer is almost ideal for beginners who are just getting started with 3D printing.

Appearance

Figure 1 Ender 3 V2
Read More
Advertisement

[TH] การตั้งค่า Slicer เบื้องต้นสำหรับการพิมพ์ 3 มิติ

บทความนี้เรามาดูกันเกี่ยวกับการตั้งค่า Slicer เพื่อปรับแต่งค่าตัวแปรต่างๆ ที่จำเป็นต่อการพิมพ์สามมิติให้เหมาะสม โดยใช้ PrusaSlicer ซึ่งค่าทั้งหมดถูกแบ่งเป็น 3 ส่วน ค่าที่ถูกใช้ในบทความนี้เป็นเพียงตัวอย่างบางส่วนเท่านั้น

สิ่งที่ต้องเตรียม

  1. PrusaSlicer ดาวโหลดได้ที่นี่

เริ่มต้นให้เราทำการดาวโหลดโปรแกรม PrusaSlicer และติดตั้งให้เรียบร้อย

เมื่อเปิดโปรแกรมขึ้นมาจะเป็นดังภาพที่ 1

ภาพที่ 1 PrusaSlicer
Read More
Advertisement

[TH] เครื่องพิมพ์ 3 มิติ Ender 3 V2

บทความนี้พูดคุยเกี่ยวกับเครื่องพิมพ์ 3 มิติ Ender 3 V2 ซึ่งเป็นรุ่นปรับปรุงจากรุ่นยอดนิยมของ Creality คือ Ender 3, Ender 3 Pro โดยได้มีการปรับปรุงเรื่องของความง่ายในการประกอบ การใช้งาน คุณภาพของชิ้นงาน เป็นต้น ทำให้เครื่องพิมพ์ 3 มิติรุ่นนี้เหมาะสมสำหรับมือใหม่ที่พึ่งเริ่มใช้งานเครื่องพิมพ์ 3 มิติเป็นอย่างมาก

รูปร่างหน้าตา

ภาพที่ 1 Ender 3 V2
Read More
Advertisement

[EN] Filaments

This article is about filaments, which are plastics that are melted and molded into desired objects. Talking about the properties of the popular Filament, there are 3 types: PLA, PETG, ABS.

Figure 1 PLA+ Filament

In 3D printing, it is indispensable that the molding medium is the Filament, each of which has different properties.

Read More
Advertisement

[EN] Hosting Unity WebGL game on the sever

This article discusses bringing a Unity-developed WebGL-style game onto a server running Ubuntu operating system in the Google Compute Engine.

Developing a game with Unity, we can code a game once and create a game on multiple systems, whether it’s Windows, Android or the web, etc. Before we can put our game on the server, we need to modify it. Build target to WebGL first by going to File > Build Settings and selecting Platform as WebGL as shown in Figure 1.

Figure 1 Selecting WebGL platform
Read More
Advertisement

[EN] PIC18F458 Ep.6 ADC

This article uses the GPIO of the PIC18F458 microcontroller connected to an ADC module or an analog-to-digital converter module for reading voltage levels in the 0 to 5V range from the input signal. This allows the system designer to consider the details of the voltage from the circuit, such as from the variable resistor, resistors change their values ​​according to the brightness or microphone values, for example, to process these values or enter the next working condition, such as reading the voltage to report the result as a voltage in the Lo, Hi or unstable level, etc. On the computer architecture experiment board, there are 4 sets of adjustable resistor circuits as shown in Figure 1 makes it possible to study programming to use the ADC module and be able to apply it in the future.

Figure 1 ADC module on the board
Read More