Incorrect ultrasonic sensor readings Arduino fail?


#1

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


#2

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?


#3

@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?


#4

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