Sunday, 8 May 2016

11: Making Robots Move





Wiring

How it works

HG7881 (L9110) Dual Channel Motor Driver Module Connector
PinDescription
B-IAMotor B Input A (IA)
B-IBMotor B Input B (IB)
GNDGround
VCCOperating Voltage 2.5-12V
A-IAMotor A Input A (IA)
A-IBMotor A Input B (IB)

InputOutput
IAIBOAIBDescription
LLLLOff
HLHLForward
LHLHReverse
HHHHOff
'

Code

Basic code to drive forward

Extensions

  • Can you make it go forward, then backward?
  • How about turning?
  • Can you make it drive forward if the distance sensor reads 'LOW'?
  • If you have 2 distance sensors can you make it turn left for one, then right for the other? This is how you follow a line!




No comments:

Post a Comment