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...
Comments
Post a Comment