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
/* | |
วัดอุณหภูมิ ด้วย LM35 Arduino | |
https://www.ab.in.th/b/62 | |
*/ | |
int val; | |
int tempPin = A5; //ต่อ Sensor ที่ ขา A5 | |
void setup() { | |
Serial.begin(9600); |
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
/* | |
หรี่ความสว่างหลอดไฟ LED ด้วย Arduino | |
https://www.ab.in.th/b/54 | |
*/ | |
const int analogOutPin = 3; //กำหนดใช้งานขา 3 ของ Arduino | |
void setup() { | |
} |
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
/* | |
Nodemcu esp8266 Arduino IDE เปิดปิดไฟผ่าน Website | |
https://www.ab.in.th/b/27 | |
*/ | |
#include <ESP8266WiFi.h> | |
const char* ssid = "9arduino"; | |
const char* password = "tv357911itv"; |
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
// I2C Scanner | |
// Written by Nick Gammon | |
// Date: 20th April 2011 | |
/* | |
จากบทความ ค้นหา Address I2C ด้วย Arduino กันเถอะ | |
https://www.ab.in.th/b/1 | |
*/ | |
#include <Wire.h> | |
void setup() { |
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
/* | |
การใช้งาน Code Water flow Sensor กับ Arduino | |
บทความ : https://www.ab.in.th/b/8 | |
*/ | |
volatile int flow_frequency; | |
unsigned int l_hour, f_val; | |
unsigned long ctTime, flow_val, cloopTime; | |
void flow () // Water flow Interrupt function | |
{ | |
flow_frequency++; f_val++; |
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
/* | |
การใช้งาน hc-sr04 Arduino และตัวอย่างโปรแกรม | |
https://www.ab.in.th/b/60 | |
*/ | |
#define echoPin 3 // Echo Pin | |
#define trigPin 2 // Trigger Pin | |
#define LEDPin 13 // Onboard LED | |
int maximumRange = 200; // Maximum range needed |
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 ตรวจจับการเคลื่อนไหว PIR (HC-SR501) | |
https://www.ab.in.th/b/13 | |
*/ | |
const int buttonPin = 2; | |
const int ledPin = 13; | |
int buttonState = 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
/* | |
จากบทความ Nodemcu Deepsleep เข้า Mode ประหยัดพลังงาน | |
https://www.ab.in.th/b/14 | |
*/ | |
void setup() { | |
Serial.begin(115200); | |
Serial.setTimeout(2000); | |
// Wait for serial to initialize. |
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 เปิดปิดไฟ ผ่าน App android ด้วย Bluetooth | |
จากบทความ https://www.ab.in.th/b/9 | |
*/ | |
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(10, 11); //Pin10 RX , Pin 11 TX | |
#define Relay1 2 | |
#define Relay2 3 | |
#define Relay3 4 |
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
/* | |
สอนใช้งาน จอ LCD IIC/I2C Interface ด้วย Arduino | |
จากบทความ https://www.ab.in.th/b/57 | |
Download Library : http://download.เอบี.ไทย/download.php?file=Arduino-LiquidCrystal-I2C-library-master.zip | |
*/ | |
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x27, 16, 2); //Module IIC/I2C Interface บางรุ่นอาจจะใช้ 0x3f | |
void setup() |
NewerOlder