Frequency Detector icon Frequency Detector Detect audio frequencies via PC microphone (FFT), output a variable and drive servos within configurable min/max ranges with waveform feedback. Try it →
Tutorial
Published — Updated

Use Arduino For Wheel Encoder Counter

Step 1 of 4

Have your Arduino count motor encoder rotations. Connect the Arduino to your EZ-B UART #0 port to send the encoder counts.


Connect The Wires

There are two sets of wires which will need to be connected:

  1. The Arduino to the encoder
  2. The Arduino to the EZ-B

Encoder Connect the encoder wires to your Arduino pins 2 and 3. These pins are interrupt pins. The code will count the number of changes between HIGH and LOW state of these pins.

  • pin 2: Encoder #1
  • pin 3: Encoder #2

EZ-B Connect the Arduino's TX and RX ports to the UART #0 of the EZ-B. Consult the ez-b datasheet to locate the UART #0 port.

  • Connect EZB UART 0 TX to ARDUINO RX
  • Connect EZB UART 0 RX to ARDUINO TX
  • Connect Arduino GND to EZ-B GND

ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.