APIs

APIs

Share

16/03/2020

မင်္ဂလာပါ

ယနေ့တင်ပေးမယ့် project လေးက Arduino project ထဲမှာ လွယ်ကူပြီးပါဝင်ပစ္စည်နည်းနည်းနဲ့ အပြင်လက်တွေ့ဘဝမှာအသုံးဝင်နိုင်မယ့် project လေးပါ။ Code နဲ့ diagram ကိုတင်ပေးထားပါတယ်။

Project 1 :

Arduino board
IR sensor
5v relay( 1 channel)
Water pump
Jumper wires

စတဲ့ပစ္စည်များရှိရင်ရပါပီ။
Arduino board နဲ့တွဲရမယ် ပုံကိုအောက်မှာပြထားပါတယ်။Code ကို copy ယူ၍ ထည့်ပီး စမ်းသပ်နိုင်ပါတယ်။

အသုံးပြုပုံ

သူကရှင်းရှင်းလေးပါ။ဘေစင်ရှေ့မှာလက်ထားလိုက်တာနဲ့ရေကအလိုအလျောက်ကျလာပေးမှာပါ။

Code;

// IR Obstacle Collision Detection Module
// Henry's Bench

int LED = 13; // Use the onboard Uno LED
int isObstaclePin = 7; // This is our input pin
int isObstacle = HIGH; // HIGH MEANS NO OBSTACLE

void setup() {
pinMode(LED, OUTPUT);
pinMode(isObstaclePin, INPUT);
Serial.begin(9600);

}

void loop() {
isObstacle = digitalRead(isObstaclePin);
if (isObstacle == LOW)
{
Serial.println("OBSTACLE!!, OBSTACLE!!");
digitalWrite(LED, HIGH);
}
else
{
Serial.println("clear");
digitalWrite(LED, LOW);
}
delay(200);
}

21/01/2020

မင်္ဂလာပါ

Want your business to be the top-listed Business in Pyinmana?
Click here to claim your Sponsored Listing.

Telephone

Website

Address

Thapyagone
Pyinmana
15012