Software > Software

arduino and ultrasonic


I am using a hr-04 4 pin ultrasonic and I want to print the result on an lcd using arduino and this is not working

int distance

distance = so and so

serial.print(distance) // this worked perfectly

lcd.print(distance) // not working

Does not working mean your code doesn't compile, or just that nothing happens with the hardware when  running the code?

Posting full code will help others diagnose the problem, as well.  You can use [ code ] [ /code ] tags (without the spaces inside the brackets) to make the code easier to read in your post.


[0] Message Index

Go to full version