Shop OBEX P1 Docs P2 Docs Learn Events
Using Remote Control to slow down/speed up — Parallax Forums

Using Remote Control to slow down/speed up

NWCCTVNWCCTV Posts: 3,629
edited 2012-12-07 08:22 in Accessories
Anyone have any suggestions or BS2 code for slowing down and speeding up motors attached to HB-25's using a standard remote control? I have all I need for going forward, reverse, right and left but I would like to use the CH up/down to speed up and slow down.

Comments

  • ercoerco Posts: 20,256
    edited 2012-12-06 09:08
    HB-25s operate like servos, right? PULSOUTs from 500 (max reverse) to 750 (stop) to 1000 (max forward) and everywhere proportionally in between. Assuming you have robot built and coded to read the IR remote and drive the robot forward, reverse, right and left, you're nearly there. Add a routine which limits the speed (PULSOUT) range based on the CH up/down. For instance, full speed is 750 (stop) +/- 250. Reduce that 250 using input from your remote.

    Attach your code if you need more help.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2012-12-06 16:43
    Yes, HB-25's work just like servos. I do not yet have my bot built but want to have most of my code ready for when I do have it built. I broke my left wrist and shattered my elbow last month and that has really hindered my ability to build so I have been working on getting my code taken care of.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2012-12-07 08:22
    You could definitely use those buttons to increment/decrement the pulse values used by the motors. The scale factor would depend on how much overall resolution you want and how fast you want to be able to make the changes.
Sign In or Register to comment.