Posts

Showing posts with the label coding for ultrasonic with LCD

raspberry gpio tutorial 7...ultrasonic and LCD display working in tamil

Image
that LCD coding is not available in internet. so that rare coding. so if you want download that..or copy that Coding for ultrasonic with LCD import RPi.GPIO as GPIO import time def get_distance():     GPIO.output(trig, True)     time.sleep(0.0001)     GPIO.output(trig, False)     srt = 0     fsh = 0     while GPIO.input(echo) == False:         srt = time.time()     while GPIO.input(echo) == True:         fsh = time.time()     dif = fsh - srt     dis_cm = dif/0.000058     return dis_cm # Define GPIO to LCD mapping LCD_RS = 26 LCD_E  = 19 LCD_D4 = 13 LCD_D5 = 6 LCD_D6 = 5 LCD_D7 = 11 trig = 4 echo = 18 # Define some device constants LCD_WIDTH = 16    # Maximum characters per line LCD_CHR = True LCD_CMD = False LCD_LINE_1 = 0x80 # LCD RAM address for the 1st line ...