[EN] Arduino : condition

This article describes how to use a set of condition check statements to create programming alternatives. C++ programming uses the { and } symbols for each block of action that means the instruction set in each block is always executed from top to bottom, with one action at a time, and can be executed by creating a condition. In addition, the desired part of the command can also be repeated by loop, which will be discussed in the next article.

Read More

[TH] ST7735s

บทความนี้กล่าวถึงการตั้งค่าไลบรารี TFT_eSPI ของ Arduino เพื่อใช้งาน TFT LCD ที่ควบคุมด้วยชิพ ST7735s ที่ได้เคยเขียนเป็นตัวอย่างในบทความก่อนหน้านี้ด้วยภาษาไพธอน แต่จากการใช้งานของทีมงานเราพบว่า ST7735s ที่เป็น LCD IPS ขนาด 0.96″ นั้นมี 2 รุ่น ซึ่งเป็น GREENTAB160x80 กับ REDTAB160x80 โดยโมดูลทั้ง 2 ประเภทแตกต่างกันที่การเว้นวรรคช่องว่างระหว่างกันดังภาพที่ 1 ซึ่งในบทความนี้ใช้ ESP8266, ESP32 รุ่น DO-IT DevKit กับ ESP32CAM และ STM32F103C8T6 เป็นบอร์ดทดสอบการทำงานของโปรแกรม

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

[EN] Arduino: Expression

An expression is a combination of operands and operators. An expression can be nested. However, programming principles differ from mathematics. For this reason, the conversion of an expression from a mathematical equation to an expression in a programming language requires a procedure to translate the correct sequence of calculations to prevent errors in calculations such as

Read More

[EN] Arduino: data types

This article discusses variables, data types and constants for use with Arduino, the basis of programming. This is because programming has principles, as Niklaus Wirth has said since 1976 in his book that

Algorithms + Data Structures = Programs

A program is a problem-solving algorithm that processes data, which is the main reason for the difference between computation and program.

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] แสดงเวลาจาก NTP และ TimeLib ด้วย esp8266

บทความนี้เป็นตัวอย่างการใช้ไลบรารี NTP และ TimeLib ของเฟรมเวิร์ก Arduino กับ ESP-01s (ดังภาพที่ 1) หรือ esp8266 เพื่อรายงานเวลาปัจจุบันผ่านทางเว็บที่ให้บริการโดยไมโครคอนโทรลเลอร์ esp8266 ซึ่งในตัวอย่างนี้มีการเรียกใช้ไลบรารี NTPClient และ TimeLib โดยต้องมีการเชื่อมต่อเข้ากับเครือข่ายอินเทอร์เน็ตในการอ่านวันที่และเวลาจากเครื่องให้บริการ NTP เช่น time.nist.gov เป็นต้น

ภาพที่ 1 โมดูล ESP-01s บนบอร์ด dCore-0 รุ่น 0.7
Read More