The raspberry Pi gpio specs state that the pololu drv8835 is supported using built in broadcast or variable based controls for Scratch programming, but I cannot determine how this is supposed to work. I start the gpio server, set AddOn to pololu8835, and then have it broadcast ‘motor0speed75’ and the motor does not move. I also tried change motor0 by 25, change motor1, change motorA, and even change motor12 in case it meant the pin. None of these are functioning.
I cannot find any examples of Scratch programs that use the pololu 8835 on the web, and searches of this forum only found ‘starting from scratch’ or ‘scratching my head,’ which is what I’m starting to do…
Can anyone post an example of using the 8835 with Scratch?
See the site for RPi that I referred to here:
I tried using python and determined that motor1 attachment is not functioning, so I guess I need to do some resoldering, but moving the motor to m2a/m2b did work in python. I then did some guessing in Scratch GPIO based on the minimal raspberry pi scratch programming documentation and got that working. Here are the steps to follow for m2 at least, using the pololu DRV8835 motor driver.
Note you must go to add variable and name it motor2.
Be sure you turn on the gpio server first before running this (edit->start gpio server)
The broadcast will just turn it to whatever speed you end the name with.
The speed maxes out at 100, but I didn’t code that in for the variable.
We do not have any examples for the DRV8835 using Scratch and do not used it, but it sounds like you figured out the problem. Thank you for letting us know and sharing your solution.
By the way, if you have further questions like this, you might consider posting your questions on forums that are focused on the Raspberry Pi and Scratch programming like the Raspberry Pi’s forum or the Scratch forum.