You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to get a motor to run on a Brickpi3 with ev3dev with Python3? #525
ev3dev version: Stretch Beta raspberry pi model 2/3
ev3dev-lang-python version: INSERT ALL VERSIONS GIVEN BY dpkg-query -l python3-ev3dev* HERE
I have been trying to figure out how to get a Brickpi3 to work with ev3dev. I notice when I first turn it on the yellow LED is not blinking at all but is just solid yellow (is it not supposed to blink when you run ev3dev?). I have cloned the Brickpi3 repository into both the robot and the home folder. I am able to establish an ssh connection with:
sudo ssh robot@ev3dev.local
My main question is how do you run a motor on a Brickpi3 running ev3dev? I consistently get an error message saying the motor is not connected to in1. What should I do next? I guess I'd like a list of steps of how to get a simple EV3 Large Motor to run on a Brickpi3 running ev3dev.
With recent ev3dev-stretch images, you shouldn't need to install any extra software or clone additional repos. Without seeing your code I can't tell what exactly is wrong, but it seems to be something with port names. Please see our README for a getting started guide: https://github.com/ev3dev/ev3dev-lang-python#usage
thank you so much. It seems crazy but yeah I was working a long time trying to figure out something that simple. I guess now I am trying to get stuff like this to work with two Brickpi3's stacked on top of eachother. Do you know what the python code would be for multiple brickpi3's stacked on top of eachother to run a motor on the 2nd one?
Additional ports need to use 'spi0.1:ME' instead of OUTPUT_A. The last letter (E in this case) is the name of the port where the first BrickPi3 is A, B, C or D, the second is E, F, G, or H and so on.
Hello, so I think I'm close to getting the 2nd brickpi3 to work. But yeah I am a little confused by your statement above.
Additional ports need to use 'spi0.1:ME' instead of OUTPUT_A. The last letter (E in this case) is the name of the port where the first BrickPi3 is A, B, C or D, the second is E, F, G, or H and so on."
so how do you "use 'spi0.1:ME' instead of OUTPUT_A"?
I typed this into python3 and I get this error.
from ev3dev.brickpi3 import *
m = LargeMotor(OUTPUT_E)
Traceback (most recent call last):
File "", line 1, in
NameError: name 'OUTPUT_E' is not defined
when i type in spi0.1:ME I get
from ev3dev.brickpi3 import *
m = LargeMotor(spi0.1:ME)
File "", line 1
m = LargeMotor(spi0.1:ME)
^
SyntaxError: invalid syntax
I guess I mostly just need to know how to "use 'spi0.1:ME' instead of OUTPUT_A"
Activity
WasabiFan commentedon Sep 19, 2018
With recent ev3dev-stretch images, you shouldn't need to install any extra software or clone additional repos. Without seeing your code I can't tell what exactly is wrong, but it seems to be something with port names. Please see our README for a getting started guide: https://github.com/ev3dev/ev3dev-lang-python#usage
As shown there, running a motor should look like:
coffeedood commentedon Sep 20, 2018
thank you so much. It seems crazy but yeah I was working a long time trying to figure out something that simple. I guess now I am trying to get stuff like this to work with two Brickpi3's stacked on top of eachother. Do you know what the python code would be for multiple brickpi3's stacked on top of eachother to run a motor on the 2nd one?
dlech commentedon Sep 20, 2018
You need to configure the multiple BrickPi3s in
config.txthttps://github.com/ev3dev/docker-library/blob/master/ev3dev-stretch/layers/rpi-common/boot/flash/config.txt#L27
Additional ports need to use
'spi0.1:ME'instead ofOUTPUT_A. The last letter (Ein this case) is the name of the port where the first BrickPi3 isA,B,CorD, the second isE,F,G, orHand so on.coffeedood commentedon Sep 20, 2018
Hello, so I think I'm close to getting the 2nd brickpi3 to work. But yeah I am a little confused by your statement above.
Additional ports need to use 'spi0.1:ME' instead of OUTPUT_A. The last letter (E in this case) is the name of the port where the first BrickPi3 is A, B, C or D, the second is E, F, G, or H and so on."
so how do you "use 'spi0.1:ME' instead of OUTPUT_A"?
I typed this into python3 and I get this error.
when i type in spi0.1:ME I get
I guess I mostly just need to know how to "use 'spi0.1:ME' instead of OUTPUT_A"
dlech commentedon Sep 21, 2018
Delete one and type the other in its place. Like this:
coffeedood commentedon Sep 21, 2018
sweet! Thanks again! Yeah I will probably have more questions soon!