hlxldb

无线自行车里程计(八)

0
阅读(1673)

 

Step 8Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing the Sensor / Reed Switch

Installing 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.

  1. Connect one wire from the sensor to Arduino +3.5v / 5v.
  2. The remaining wire goes to Arduino A0 pin (acting as digital pin 14).
  3. Connect a pull-down resistor between A0 and ground to make sure the pin isn't 'floating' about when we try and read it.