Learn Robotics Programming by Danny Staple

Learn Robotics Programming by Danny Staple

Author:Danny Staple [Danny Staple]
Language: eng
Format: epub
Tags: COM051000 - COMPUTERS / Programming / General, COM067000 - COMPUTERS / Hardware / General, COM049000 - COMPUTERS / Hardware / Peripherals
Publisher: Packt Publishing
Published: 2018-11-29T06:40:10+00:00


Testing our sensors

Because it is in a loop, you will need to press Ctrl + C to stop the program running.

Troubleshooting

The following points should be taken into consideration while troubleshooting:

The most common problem is that the trigger and echo pins are swapped. I highly recommend swapping the trigger/echo pin numbers in the code and testing it again. Don't swap the cables on a live Pi!

Next, ensure that the surface you are testing on is hard. Soft surfaces, such as clothes, curtains, or your hand will not respond as well as glass or plastic.

Make sure that your surface is fairly big. Anything smaller than about 5 cm square may be harder to measure.

Please check the code and indentation if you are getting invalid values.

Did you double-check the wiring? Turn off the Pi and try this.

As a last resort, it's possible that the device or the level shifter are faulty. This is rare, but not impossible. Try swapping the sensor out on the affected side first, and if that still doesn't work , then swap out the level shifter.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.