ตัวอย่าง

Real .mapo programs — English and Thai side by side. Copy any snippet into the Web IDE to try it.

Core & GPIO พื้นฐาน & ขา GPIO

Pin declaration, variables, arrays, structs, subroutines and control flow.

English
Core & GPIO.mapo
ภาษาไทย
พื้นฐาน & ขา GPIO.mapo

Displays จอแสดงผล

LCD I2C, OLED, 7-segment, RGB LED, stepper and servo output.

English
Displays.mapo
ภาษาไทย
จอแสดงผล.mapo

Sensors เซ็นเซอร์

DHT11, HC-SR04, DS18B20, LDR, soil moisture, IR, buzzer, PID and more.

English
Sensors.mapo
ภาษาไทย
เซ็นเซอร์.mapo

Network เครือข่าย

WiFi, MQTT, HTTP client, TCP/UDP, WebSocket, web server routes and camera.

English
Network.mapo
ภาษาไทย
เครือข่าย.mapo

Body & Topic (Pub/Sub) อวัยวะ & หัวข้อ (Pub/Sub)

organ / brain / task, ROS2-style topic pub/sub, bridge, save/load.

English
Body & Topic (Pub/Sub).mapo
ภาษาไทย
อวัยวะ & หัวข้อ (Pub/Sub).mapo

Millis / Timing มิลลิวินาที / การจับเวลา

Non-blocking timing with millis() and micros().

English
Millis / Timing.mapo
ภาษาไทย
มิลลิวินาที / การจับเวลา.mapo

Raw C Escape ฝัง C ดิบ

Embed raw Arduino C++ inside Mapo code with #c / #endc.

English
Raw C Escape.mapo
ภาษาไทย
ฝัง C ดิบ.mapo

WiFi Fan Web Server เว็บเซิร์ฟเวอร์ควบคุมพัดลม

Full example: control a fan over a web page served from the ESP32.

English
WiFi Fan Web Server.mapo
ภาษาไทย
เว็บเซิร์ฟเวอร์ควบคุมพัดลม.mapo