Connection Diagnostic icon Connection Diagnostic — Diagnose EZ-B Wi-Fi connection issues with verbose EZ-B communication logging, ping tests, log export and diagnostic reports for Synthiam support. Try it →
Asked — Edited
Resolved Resolved by DJ Sures!
1 Participant

How To Use Wheel Encoder From Blockly

I have a 2 wheeled robot running the EZ-B V4.     The EZ-BV4 is driving a PWM Hbridge.  Each wheel has an encoder counting the wheel pulses using an Arduino Mega 2560.   My question is how can I command my robot to move a specified distance stop, and then turn 90 degrees and move another distance stop etc.

I assume I can feed the distance into the Mega2560 via Blockly, but I'm not finding the Syntax to do this.

i.e  move forward 6 feet

  1. Set motor L and R motors to PWM 50% 2.  Load 1000 clicks into Mega 2560 odometer counter,  ( can I do this via UART ? ) 3.  Robot moves until one of the 2 counters hits 0, then motors stop

Goto next routine. rotate platform 90 degrees right

  1. Set motor L PWM to 50% and  reverse R to PWM 50%
  2. Load 450 clicks into Mega 2560 odometer counter,
  3. Robot moves until one of the 2 counters hits 0, then motors stop


Related Hardware (view all EZB hardware)
EZ-B V4 by EZ-Robot
EZ-B v4 with Synthiam ARCx controls servos, sensors, camera and audio over Wi-Fi or USB serial, no firmware needed.
Wi-Fi / USB
Servos 24
Camera
Audio
UART 3
I2C
ADC 8
Digital 24

Related Robot Skill (view all robot skills)
Arduino UNO wheel encoder: reads left/right ticks, provides counts, configurable ticks, wheel & pivot sizes, optional pose telemetry to ARC NMS.

ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

Author Avatar
PRO
USA
#2  

Thanks dj this has been resolved