Incorrect ultrasonic sensor readings Arduino fail?


I have recently started experimenting with ultrasonic sensors with the mblock software and an arduino uno, but I can’t make it work out. I have tried several different block combinations and copied online code but it wont work. Is it possible that the arduino is broken? If someone tells me how to share images (if possible) I can show the code, but I don’t think it is the problem


I just found out that the issue is caused by the sensor readings not resetting, so everything just stayed the same even though the sensor readings should change. Is there a way to fix this?


@Jesper Can I please see your code? It should be something like this:

Also, what is your pin hookup, what device are you using, and what extension?


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.