无线自行车里程计(八)
0赞
发表于 5/21/2011 9:39:41 PM
阅读(1673)
Step 8Installing the Sensor / Reed Switch
















The 'sensor' is just a reed switch that closes the circuit when a magnet passes in front.
The Arduino monitors when the sensor pin goes HIGH (magnet present) and sends out a pulse over serial of speed data etc.
- Connect one wire from the sensor to Arduino +3.5v / 5v.
- The remaining wire goes to Arduino A0 pin (acting as digital pin 14).
- Connect a pull-down resistor between A0 and ground to make sure the pin isn't 'floating' about when we try and read it.
