3 ms·
You might look into a magnetometer: https://en.wikipedia.org/wiki/Magnetometer https://en.wikipedia.org/wiki/Magnetometer https://www.adafruit.com/product/112
by oblib 9y ago
You might look into a magnetometer:
https://en.wikipedia.org/wiki/Magnetometer https://en.wikipedia.org/wiki/Magnetometer
https://www.adafruit.com/product/1120 https://www.adafruit.com/product/1120
Here's link to a video I made about using one to create an HTML5 animated compass:
https://www.youtube.com/watch?v=2YW6HWJg4f4 https://www.youtube.com/watch?v=2YW6HWJg4f4
Here's a link to code I used and some install instructions for the Pi:
http://www.raspberryperl.com/compass/ http://www.raspberryperl.com/compass/
- nblavoie 9y agoThank you for your feedback. Correct me if I'm wrong, but the magnetometer is only for measuring the earth's electromagnetic field, right ? What if I want to detect metal nearby, does the same chip will be OK for the task ?
- oblib 9y agoNo, it will detect a nearby magnetic field. I had to try that just for fun when I had mine hooked up.