Monday, November 17, 2025

Arduino ( 3 - 7 ) Analog Voltage Reading With Arduino

Code များအား ကူးယူရာတွင် Code များ မကျန်ခဲ့စေရန် သေချာဂုရုစိုက်၍ ကူးယူစေလိုပါသည်။



 void setup() {

// initialize serial communication at 9600 bits per second:
Serial.begin( 9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
int voltage = sensorValue * (5.0 / 1023.0);
// print out the value you read:
Serial.println(voltage);
delay(100);
}


No comments:

Post a Comment

Home Appliances ( 1 - 3 ) လျှပ်စစ်မီးဖိုစစ်ဆေးခြင်း

မီးဖိုတခုကို မီးထိုးထားချိန် တခါတရံ ဓါတ်လိုက်ခြင်းကို ကြုံဖူးပါလိမ့်မယ် . မြန်မာနိုင်ငံတွင် Earth စနစ်တပ်ဆင်ထားခြင်း အလွန်နည်းပါးတာကြောင့် အ...