Jim

[BRICKPI] BrickPi General Discussion

Recommended Posts

I changed the 0 to a 1 and now I don't get any errors anymore.....except the BrickPi has not been found.

try:
	BP = brickpi3.BrickPi3() # Create an instance of the BrickPi3 class. BP will be the BrickPi3 object.
	print("BrickPi3 connected and running")
except brickpi3.FirmwareVersionError as error:
	print(error)
except:
	print("Communication with BrickPi3 unsuccessful")

Resulting in...

Communication with BrickPi3 unsuccessful

Maybe I need to call it a day :sadnew:

Share this post


Link to post
Share on other sites

O nooo, I think I have been following the wrong white rabbit. I have taken the wrong pill.

For ev3dev, there's a different import statement:

import ev3dev.brickpi3 as ev3

 

Share this post


Link to post
Share on other sites
On 11/25/2018 at 8:39 PM, MajorAlvega said:

I think this helps:
https://github.com/ev3dev/ev3dev-lang-python/issues/525

An issue is open that will make things easier soon:

https://github.com/ev3dev/ev3dev-lang-python/issues/527

I was as simple as looking at these two useful posts again. I have no clue why I took that massive detour.

But my motor is running...

m = LargeMotor("spi0.1:MA")
m.on_for_rotations(SpeedPercent(100), 5, brake=False, block=False)

 

All it took was adding this line

import ev3dev.brickpi3 as ev3

I feel like

80cc0f4c808f3d976d72ee71d6527f49820f016c

Share this post


Link to post
Share on other sites
13 minutes ago, dwalton76 said:

If you are running ev3dev then you can completely ignore the dexter industries brickpi images, docs, etc.  Think of ev3dev as a complete independent alternative to raspian, the dexter industries OS, etc.

In a nutshell just follow this guide :)

https://www.ev3dev.org/docs/getting-started/

Yup, that was my big mistake.

I did follow the tutorial, but I somehow still got sidetracked.

Now I need to look at the stacked BrickPi. I have changed the serial numbers, but I still get the error that 

ev3dev2.DeviceNotFound: Motor(spi0.1:ME)

Maybe I need to swap the two serial numbers.

Share this post


Link to post
Share on other sites
9 minutes ago, Jim said:

Maybe I need to swap the two serial numbers.

That did the trick!

 

1236910781222.jpg

2 minutes ago, dwalton76 said:

Something to try would be to git clone https://github.com/ev3dev/ev3dev-lang-python and then set your PYTHONPATH env variable to point to that repo.  I'm not sure if the stacked brickpi support is in the released images yet but if you git clone ev3dev-lang-python that will put on on the latest and greatest which has it.

Thanks for the tip!

Share this post


Link to post
Share on other sites

I am using two Brick Pi's, connected to a monitor. Both Pi's are powered via my new rechargeable battery (which is awesome btw). When I turn on the switch on the battery, both Pi's power up. But there is "no signal" on the screen. Apparently, the Raspberry is not booting. The Raspberry seems to be booting, because I can ping it. When I switch off the power switches on the Pi's and I turn them on one by one, I do get a signal on the screen. Any thoughts?

Share this post


Link to post
Share on other sites

You are using HDMI, I suppose?

I only used my BrickPi in headless mode so not sure if ev3dev supports the native HDMI output for console by default.
ev3dev documentation has a link to David post about using Adafruit PiTFT as a display:
https://lechnology.com/2016/05/adding-a-display-to-brickpi/

It has a reference for "using the HDMI as well" so it looks like HDMI should work so perhaps you just need to edit the configuration file for video options?

https://www.raspberrypi.org/documentation/configuration/config-txt/video.md

Share this post


Link to post
Share on other sites

Thanks! I will check it out.

But that doesn’t explain why the display DOES work when I switch on the Pi’s one by one, right?

PS yes, I am using Hdmi.

Share this post


Link to post
Share on other sites

Reading the comments, it should work. Do you think I need to make an issue for this problem?

Share this post


Link to post
Share on other sites

If you are using latest stretch-based snapshot, yes. But first try just the usual debug procedures like just one Raspberry Pi (without the BrickPi). If you are a patient guy also test booting with a Raspbian SD Card to check if it really show something.

Edited by MajorAlvega

Share this post


Link to post
Share on other sites

Yeah, that sounds like a plan! I will check various situations to pinpoint the actual issue. Probably not today, but I will keep you posted. Thanks, again.

Share this post


Link to post
Share on other sites
On 11/26/2018 at 3:18 PM, Jim said:

@MajorAlvega What are the power supply specs for the BrickPi? I know the Raspberry can be powered with 5V USB and the BrickPi needs 12V (8x AA battery). But can I also use a rechargeable battery pack with 12V and 4.4A? What is the allowed amperage (is this an English word?)? I would love to a rechargeable battery pack, so any info (or links) is appreciated.

Hypothetically, I need to power the Raspberry, four BrickPi's (with a lot of motors and sensors), a 7 inch LCD screen, a camera and a 12V LED strip. Any thought on powering this monstrosity? :laugh:
(I do have enough space for batteries)

Hiya! I'm not sure the size of your robot but it must be decent to have all those boards in it. When I was building a R2-D2, my power solution was to buy these battery power adapters. These are meant to connect to cordless 12v or 24v batteries and people can use the USB to power or charge things on a job site. I opened them up and soldered wires directly to the positive and negative connections so I could get the full power.You can even hook two in parallel so you can get twice the current. As a bonus these make it easy to swap batteries when needed. Even one of them will power a bunch of boards for hours.

 

UYTf4AP.jpg

Share this post


Link to post
Share on other sites

This is a nice solution!

Actually, I am pretty happy with the battery I ordered. It's not that big, but it has enough power.

I will post some pics with the battery installed this weekend :thumbup:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.