Picoborg Reverse simple code?
Forums:
Hi i teach in a primary school and one of the projects the kids in my code club want to do is make a lego compatible kit with motors etc. Anyway as i have a diddy borg i figured using the reverse with the battborg and the pi zero w would be a great way to control it all due to only needing one battery supplyand being able to control the voltages to the motor etc. Anyway i need simple code to teach the kids eg
Motor1 forwards ()
Motor2 forwards ()
MotorsStop ()
That sort of thing. Just wondered if someone coukd tell me what tbe basic commands are.
Many thanks
Tim
piborg
Sun, 10/08/2017 - 15:00
Permalink
Below is a very basic example
Below is a very basic example of controlling motors from the PicoBorg Reverse.
In the comments below forwards / backwards refers to the PicoBorg Reverse output. The motors may run the opposite way depending on the wiring.
The
maxPower
calculation is not strictly necessary, however running the motors over their intended voltage is not recommended.