This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
สอนใช้งาน DS3231 โมดูลนาฬิกา ตั้งเวลา ง่ายๆ | |
บทความ https://www.ab.in.th/b/58 | |
download : https://www.ab.in.th | |
*/ | |
#include <Wire.h> | |
#include <SPI.h> | |
#include <RTClib.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
ตัวอย่าง การใช้งาน Sensor DHT22 สินค้า | |
บทความ : https://www.ab.in.th/b/22 | |
Download Library LCD I2C : https://download.เอบี.ไทย/d.php?file=Arduino-LiquidCrystal-I2C-library-master.zip | |
Download Library DHT22 : https://download.เอบี.ไทย/d.php?file=DHT-sensor-library-master.zip | |
*/ | |
#include "DHT.h" | |
#define DHTPIN 2 // what digital pin we're connected to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
โปรเจคเครื่องรดน้ำต้นไม้อัตโนมัติ ด้วย Arduino ราคาถูก พร้อม Code ตัวอย่าง | |
จากบทความ https://www.ab.in.th/b/10 | |
แก้ไข 7/05/2562 | |
*/ | |
const int analogInPin = A0; // ขา analog สำหรับต่อ sensor | |
const int stPin = 11; // ขา 11 Pin แสดง Status | |
int sensorValue = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Line_Notify(String message) ; | |
#include <ESP8266WiFi.h> | |
////////////////////////////////////////////////////////////////// | |
const int GasPin = A0; // ประกาศขา A0 ต่อกับ sensor MQ-2 | |
const int GreenPin = D3; // ประกาศขา D3 ต่อกับ หลอด LED สีเขียว | |
const int RedPin = D4; // ประกาศขา D4 ต่อกับ หลอด LED สีเขียว | |
////////////////////////////////////////////////////////////////// | |
const int timedelay = 1000; //เวลาในการ delay สำหรับอุ่นหัวก่อนเริ่มโปรแกรม 1000 = 1 วินาที แนะนำที่ 30000 หรื 30 วินาที |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Arduino RC Car Drift | |
By Pakorn Rattanaying | |
https://www.ab.in.th/ | |
ตามบทความ https://www.ab.in.th/b/26 | |
*/ | |
#include <ESP8266WiFi.h> | |
#include <WiFiUDP.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
บทความจาก Link https://www.ab.in.th/b/17 | |
*/ | |
const int analogInPin1 = A0; | |
static int ctr,flag_tog; | |
static unsigned char adcval; | |
void setup() | |
{ | |
Serial.begin(115200); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ตัวอย่าง โดย https://www.ab.in.th เขียนเอง | |
การต่อสาย | |
ขา D1 SCL | |
ขา D2 SDA | |
ขา Vin VCC ของจอ LCD | |
ขา GND GND ของจอ LCD | |
ขา Vin VCC ของ Relay | |
ขา GND GND ของ Relay | |
ขา D0 IN1 ของ Relay |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
จากบทความ https://www.ab.in.th/b/29 | |
*/ | |
#include <OnewireKeypad.h> | |
char KEYS[] = { | |
'1', '2', '3', 'A', | |
'4', '5', '6', 'B', | |
'7', '8', '9', 'C', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
วิธีการใช้งาน Sensor DS18B20 Arduino วัดอุณหภูมิในน้ำ | |
บทความ จาก https://www.ab.in.th/b/18 | |
*/ | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
#define ONE_WIRE_BUS 2 //กำหนดขา |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
การต่ออุปกรณ์ สามารถอ่านเพิ่มได้ที่ Link : https://www.ab.in.th/b/12 | |
*/ | |
int LedRED = 12; | |
int LEDgreen = 11; | |
int smokeA0 = A0; | |
int sensorThres = 400; //ตั้ง ค่าความหนาของตวัน แก๊ส ก๊าซที่ 400 |