Skip to main content

Posts

Featured

How measure the distance using Ultrasonic sensor

Source code. const int out = 12; const int in = 13; void setup() {   Serial.begin(9600);   pinMode(in, INPUT);   pinMode(out, OUTPUT); } void loop() {   long dur;   long dis;   long tocm;   digitalWrite(out, LOW);   delayMicroseconds(2);   digitalWrite(out, HIGH);   delayMicroseconds(10);   digitalWrite(out, LOW);   dur = pulseIn(in, HIGH);   tocm = microsecondsToCentimeters(dur);   Serial.println(String(tocm));   delay(100); } long microsecondsToCentimeters(long microseconds) {   return microseconds / 29 / 2; }

Latest posts

HOW TO ON / OFF BULB WITH BLUETOOTH

Knight rider light using arduino uno board

LDR using arduino board

How to make LED chaser using CD 4017 ic

How Air Cleaners works

HOW AIR COOL ENGINES WORKS

What is vibration damper

What is stepper motor

Whats is engine mounts

What is diesel engine