Posts

Showing posts from April, 2018

codings for ultrasonic sensor

                      codings for ultrasonic sensor #define trig 5 #define echo 6 void setup() {   Serial.begin(9600);   pinMode(trig,OUTPUT);   pinMode(echo,INPUT);   pinMode(13,OUTPUT); } void loop() {   long duration , distance;      digitalWrite(trig,LOW);   delay(2);   digitalWrite(trig,HIGH);   delay(2);   digitalWrite(trig,LOW);      duration= pulseIn(echo,HIGH);   distance=(duration/2)/29.1;   if(distance <= 10)   {     digitalWrite(13,HIGH);   }   else   {     digitalWrite(13,LOW);   }     delay(1000);    } ---------------------------***********----------------------------***************------------------ This is the codings for ultrasonic sensor...  For reference watch my  yout...

programing part for petrol level measuring in tamil

Image
this is coding part for petrol measuring project.How the codes are working and how is run.All details are told in this video.This is fully tamil video.So you will learn easily.                                 code for this project #define trig 5 #define echo 6 #include <LiquidCrystal.h> LiquidCrystal LCD(8,9,10,11,12,13); //(en ,rs,d0,d1,d2,d3) void setup() {   Serial.begin(9600);   LCD.begin(16,2);   pinMode(trig,OUTPUT);   pinMode(echo,INPUT);   pinMode(13,OUTPUT);   pinMode(4,OUTPUT);   digitalWrite(4,HIGH); } void loop() {   digitalWrite(trig,LOW);   delay(2);   digitalWrite(trig,HIGH);   delay(2);   digitalWrite(trig,LOW);      long t= pulseIn(echo,HIGH);   float cm=t/29/2;   LCD.setCursor(0,0);   LCD.print("petrollevel:");   LCD.setCursor(12...