NMS Example icon NMS Example — Example NMS Level #1 navigation skill showing subscription to combined scan+location data, displaying position and scan info; source code included. 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

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.