[EN] Arduino : DHT Sensor

This article describes how Adafruit’s DHT Sensor library is compatible with all Arduino-compatible architectures, making it easier to deploy DHT sensors for humidity and temperature readings across multiple platforms. This article has tested with ESP32, ESP8266, Arduino UNO and stm32f103c and found that it can be used without modifying the code in the working part or having to modify the source code to make it compatible with the platform.

(Figure. 1 dht22 and BluePill)
Read More

[EN] Arduino: JoyStick Shield

This article is a guideline on using GamePad/Joystick with Arduino Uno or Arduino Mega because it is a module designed as a shield of both boards. When assembled, you will get 1 cute gamepad as shown in Figure 1. The article explains more about the information of the connection between each device and the GPIO with examples of use. The content about the joystick module can be read from the previous article.

(Figure. 1 Joystick Shield)
Read More

[EN] Arduino: Ohm’s Law

This article is about Ohm’s Law, which is a fundamental subject related to electrical circuits that arise from the relationship between the current in amps, the voltage (Volt) and the resistance of the conductor or load is measured in Ohm, or the equation V=IR, where V is voltage, I is current, and R is the resistance of the conductor.

Read More

[TH] Arduino : DHT Sensor

บทความนี้เป็นการอธิบายการใช้งานไลบรารี DHT Sensor ของ Adafruit ที่รองรับกับทุกสถาปัตยกรรมที่ใช้กับ Arduino ได้ ทำให้สามารถประยุกต์การใช้งานเซ็นเซอร์ DHT ซึ่งใช้สำหรับอ่านค่าความชื้นและอุณหภูมิได้สะดวกและกับหลายแพลตฟอร์มได้ง่ายขึ้น โดยบทความนี้ได้ทดสอบกับ ESP32, ESP8266, Arduino UNO และ stm32f103c แล้วพบว่าสามารถใช้งานได้โดยไม่ต้องปรับแก้ไขโค้ดในส่วนของการทำงานหรือต้องเข้าไปแก้ไขรหัสต้นฉบับเพื่อให้ใช้งานได้กับแพลตฟอร์มที่ใช้งาน

ภาพที่ 1 dht22 Sensor กับ BluePill
Read More

[TH] Arduino: JoyStick Shield

บทความนี้แนะนำการใช้ Game Pad/Joystick กับบอร์ด Arduino Uno หรือ Arduino Mega เนื่องจากเป็นโมดูลที่ออกแบบเป็น Shield ของบอร์ดทั้ง 2 เมื่อนำมาประกอบจะได้เกมแพดน่ารัก ๆ 1 ชิ้นดังภาพที่ 1 โดยในบทความอธิบายเพิ่มเติมเกี่ยวกับข้อมูลของการเชื่อมต่อระหว่างอุปกรณ์แต่ละชิ้นกับ GPIO พร้อมตัวอย่างการใช้งาน ซึ่งเนื้อหาเกี่ยวกับโมดูลจอยสติกอ่านได้จากบทความก่อนหน้านี้

ภาพที่ 1 Joystick Shield
Read More

[TH] Arduino: Joystick Module

บทความนี้เป็นการเขียนโปรแกรมเพื่อใช้งานโมดูลจอยสติก (Joystick) ดังภาพที่ 1 ซึ่งตัวโมดูลสามารถบอกข้อมูลการเคลื่อนที่ในแกน X การเคลื่อนที่ในแกน Y และสถานะการกดสวิทตช์ที่ตัวจอยสติก โดยตัวอย่างการใช้งานโมดูลนี้เป็นการใช้กับบอร์ด esp32 โดยใช้ภาษา C++ เพื่อเชื่อมต่อกับ GPIO ด้วยคำสั่งที่เคยกล่าวไปแล้วในบทความนี้

ภาพที่ 1 โมดูลจอยสติกกับ esp32
Read More

[TH] Arduino: Arduino Uno

บทความนี้แนะนำบอร์ด Arduino รุ่น Uno ซึ่งเป็นบอร์ดที่นิยมใช้ในการศึกษาการเขียนโปรแกรมเพื่อควบคุมอุปกรณ์ โดยกล่าวถึงคุณสมบัติของบอร์ด และการใช้ Arduino IDE รุ่น 2 (beta 7) เป็นพื้นฐานสำหรับการเขียนโปรแกรมต่อไป

Read More

[TH] Arduino: Ohm’s Law

ในบทความนี้เป็นเนื้อหาเกี่ยวกับกฎของโอห์ม (Ohm’s Law) ซึ่งเป็นเรื่องพื้นฐานที่เกี่ยวข้องกับวงจรไฟฟ้าที่เกิดจากความสัมพันธ์ระหว่างกระแสไฟฟ้าที่มีหน่วยเป็นแอมป์ (Amp) ความต่างศักย์ไฟฟ้าหรือแรงดันไฟฟ้าที่่มีหน่วยเป็นโวลต์ (Volt) และความต้านทานของตัวนำหรือโหลด (Load) ที่มีหน่วยเป็นโอห์ม (Ohm) หรือสมการ V=IR โดย V เป็นแรงดัน I คือกระแสไฟฟ้า และ R คือค่าความต้านทานของตัวนำ

Read More