Jim Posted November 25, 2018 Posted November 25, 2018 On 11/21/2018 at 12:12 AM, dwalton76 said: It isn't as compact as an EV3 but a pi3 + brickpi3 + this screen: https://www.amazon.com/gp/product/B01N447AEY/ref=oh_aui_search_detailpage?ie=UTF8&psc=1 makes for a nice alternative, it boots in about 8 seconds!! I put a SSD on it once and the boot time was even better :) (I forget exactly how fast it was though) I just bit the bullet and I ordered two full BrickPi3 starter kits, so with two Pi3's. This gives me the option to test with robot-to-robot communication and I can stack the BrickPi's so I have all the ports I need (for now hehe). Really looking forward to testing these babies. I am also still interested in the daisy chaining solution btw. Quote
Jim Posted November 25, 2018 Author Posted November 25, 2018 When you stack multiple BrickPi's, you need to enter the ID's in the config.txt. http://docs.ev3dev.org/en/ev3dev-stretch/platforms/brickpi3.html#setup But how do you address the different motors in the Python program? Where can I find examples/documentation for stacked BrickPi's? I basically have this question: https://github.com/ev3dev/ev3dev/issues/910 Quote
MajorAlvega Posted November 25, 2018 Posted November 25, 2018 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 Quote
Jim Posted November 25, 2018 Author Posted November 25, 2018 Wow, so easy. And it is getting even better. The last days I have fallen in love with Python and ev3dev Thanks for the response. I love the fact that you guys are around to point me in the right direction I am so psyched right now. Can't wait for my Pi's to arrive. Quote
MajorAlvega Posted November 25, 2018 Posted November 25, 2018 You're welcome. Open source usually gives a good community experience and I started using ev3dev also because of that - people answered most of my questions and Google also helped (being based on Debian, some questions are answered in Raspberry Pi or Ubuntu forums and blogs). Your experience is also good for the project - it shows to others that it is not so scaring and also helps finding things that can or need to be improved. Of course I'm also interested on your progress - since I'm not a programmer I will most probably learn something following this thread. Quote
Jim Posted November 25, 2018 Author Posted November 25, 2018 I have never thought of using Python for my robot(s). But I can (and will) definitely recommend using Python in combination with the EV3. I would prefer using several EV3 bricks and work on a pure LEGO robot (besides the Rotacaster wheels), but given the power and possibilities of the Pi-BrickPi combo, I would be stupid not to try that. Of course, I can still use the EV3 bricks. So many options It's always good to have someone with no prior knowledge to work with a certain firmware/programming environment. I'm glad I can add some value to the project that way. I just made an authenticate request on my Web Api. The Api returned the JWT (Json Web Token), so I can start making authenticated calls. I am working on a GameHub Api for my mobile games (one of my other hobbies), so I can use the robot to test the Api. This means my robot can send highscores to the server (of course this allows for various other implementations) Quote
MajorAlvega Posted November 25, 2018 Posted November 25, 2018 (edited) I think you are the guy I need for some crazy ideas I might start later... One year ago I tested Google API with ev3dev and got some interesting results. It was a one year trial license that already expired but I might try it again. The only real problem I had was authentication times taking too long before I can start using Google services from my EV3 (I didn't try BrickPi... perhaps its time to return). Edited November 25, 2018 by MajorAlvega Quote
Jim Posted November 25, 2018 Author Posted November 25, 2018 I’m definitely your guy Let me know how I can help you. Create a new topic or send me a PM, when you feel the time is right Quote
Jim Posted November 26, 2018 Author Posted November 26, 2018 I just ordered a bunch of Raspberry stuff (LCD's, camera and some accessoires) to go with my BrickPi solution. When everything arrives in two or three weeks I am all good to go. Toorrow my Wifi dongles and Micro SD Cards will be delivered, so I can start testing different communication scenerarios with my EV3 units. I need to make checklist of PoCs (Proofs of Concept) to complete. BlueTooth brick-to- brick Wifi sockets brick-to-brick-via-lan Daisy chaining (depending on ev3dev) Websockets (sending commands from a webserver to the brick) ... Quote
Jim Posted November 26, 2018 Author Posted November 26, 2018 @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? (I do have enough space for batteries) Quote
dwalton76 Posted November 26, 2018 Posted November 26, 2018 1 hour ago, 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? (I do have enough space for batteries) Some info here: https://www.dexterindustries.com/BrickPi/brickpi3-technical-design-details/ the dexterindustries forums are fairly active (employees will respond to questions you post), it may be worth starting a thread there to ask about your specific setup. Quote
Jim Posted November 27, 2018 Author Posted November 27, 2018 Thanks! I was on that page yesterday, but I missed the tech specs. I will take a look and create a topic if I need more info Quote
Jim Posted November 27, 2018 Author Posted November 27, 2018 I have ordered this rechargeable battery pack. Provides 5V, 9V and 12V....exactly what I need. And it has a nice casing, so I can put it somewhere in my robot https://nl.aliexpress.com/store/product/15000mAH-DC-5V-9V-12V-USB-High-Capacity-Rechargeable-Li-ion-Battery-Pack-Charger/3871001_32867193291.html Quote
MajorAlvega Posted December 4, 2018 Posted December 4, 2018 Missed these last posts. That rechargeable battery pack is interesting, not sure of output current limits in 9V and 12V modes (some chinese products lie on their specs and some don't even have any kind of protection). For that "monstruosity" you probably need several battery packs. Motors draw lots of current, the TFT also draws some, latests RPis at full CPU usage add a few 100 mA's... not sure if one single battery pack can deliver all that current from the internal LiPo batteries without overheating. Quote
Jim Posted December 4, 2018 Author Posted December 4, 2018 I have ordered one for "testing purposes". If it meets my expectations, I can get another one. I definitely want to avoid using a ton of rechargeable AA's and a dozen separate battery packs. So one, or two, rechargeable packs to power the beast is preferable. Do the Raspberry and the BrickPi have any internal protection? In other words; can I break them when I use the wrong power source? Quote
dr_spock Posted December 5, 2018 Posted December 5, 2018 Pi is 5V DC USB powered through a microUSB connector. There looks like a poly fuse near the USB power input on the underside. Quote
Jim Posted December 8, 2018 Author Posted December 8, 2018 My BrickPi's have arrived EDIT: Following are a lot of issues and problems. I recommend skipping to the final comment and reading my posts backwards Let's go... https://www.dexterindustries.com/BrickPi/brickpi3-getting-started/ Quote
Jim Posted December 8, 2018 Author Posted December 8, 2018 I am having issues getting the BrickPi up-and-running. I am not sure I grasp the setup process. The BrickPi comes with DexterOS, which boots with a "windows like" GUI. However, I am using the Pi Model 2/3 image on my Raspberry Pi3. When I try to run a program, the module brickpi is not found. I am not sure how to install it. I was trying to run setup, but I am not sure this is for ev3dev. #!/usr/bin/env python # # https://www.dexterindustries.com/BrickPi/ # https://github.com/DexterInd/BrickPi3 # # Copyright (c) 2016 Dexter Industries # Released under the MIT license (http://choosealicense.com/licenses/mit/). # For more information see https://github.com/DexterInd/BrickPi3/blob/master/LICENSE.md import setuptools setuptools.setup( name="brickpi3", description="Drivers and examples for using the BrickPi3 in Python", author="Dexter Industries", url="http://www.dexterindustries.com/BrickPi/", py_modules=['brickpi3'], install_requires=['spidev'] ) Starting: brickrun --directory="/home/robot/ev3dev-test" "/home/robot/ev3dev-test/setup.py" Started. ---------- usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: no commands supplied ---------- Exited with error code 1. When I go to this page, I don't see any instructions to install/download brickpi. http://docs.ev3dev.org/en/ev3dev-stretch/platforms/brickpi3.html#setup I am able to update the firmware, so the board is properly found. It's my python installation that can't locate the brickpi module. I have followed this setup https://www.instructables.com/id/BrickPi-Setup/ When I run a program, I get the message that I need to install the BrickPi Drivers. import brickpi3 # import the BrickPi3 drivers Quote
Jim Posted December 8, 2018 Author Posted December 8, 2018 I have cloned the repository to my Pi with this command: sudo git clone https://github.com/DexterInd/BrickPi3.git So now I have all the files on the Pi, but I think I need to install the Python modules somewhere. Quote
Jim Posted December 8, 2018 Author Posted December 8, 2018 I am not sure what I am doing, but I try to run the setup.py program. sudo python setup.py install Things are looking okay, but at the end I get an error: nstalled /usr/local/lib/python2.7/dist-packages/brickpi3-0.0.0-py2.7.egg Processing dependencies for brickpi3==0.0.0 Searching for spidev Reading https://pypi.python.org/simple/spidev/ Downloading https://files.pythonhosted.org/packages/36/83/73748b6e1819b57d8e1df8090200195cdae33aaa22a49a91ded16785eedd/spidev-3.2.tar.gz#sha256=09d2b5122f0dd79910713a11f9a0020f71537224bf829916def4fffc0ea59456 Best match: spidev 3.2 Processing spidev-3.2.tar.gz Writing /tmp/easy_install-7GLDQj/spidev-3.2/setup.cfg Running spidev-3.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7GLDQj/spidev-3.2/egg-dist-tmp-Br6XdJ unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory error: Setup script exited with error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1 I am following the steps on this page, but I get the feeling that I am going in the wrong direction. https://github.com/ynsta/steamcontroller/issues/42 Quote
Jim Posted December 8, 2018 Author Posted December 8, 2018 I think I managed to install spidev, but somehow the brickpi3.py still doesn't see the spidev module. I think I see what the problem is. The module gets installed in Python2.7. I do have two version in the lib folder, Python 2.7 and Python 3.5. Quote
Jim Posted December 8, 2018 Author Posted December 8, 2018 This might do the trick: sudo python3 setup.py install I will continue to Rubber Duck here. The previous step indeed solved my spidev issue, resulting in a new issue. This is more or less the same issue as the spidev. Traceback (most recent call last): File "/home/robot/ev3dev-test/Examples/Test_Connected.py", line 16, in <module> import brickpi3 # import the BrickPi3 drivers File "build/bdist.linux-armv7l/egg/brickpi3.py", line 21, in <module> IOError: [Errno 2] No such file or directory ---------- Exited with error code 1. I have run the following command: sudo python3 setup.py install And I do see the following file in my user/local/lib/python3.5 folder: brickpi3-0.0.0-py3.5 Quote
Jim Posted December 8, 2018 Author Posted December 8, 2018 I do notice that all the ev3dev modules are located in python3 instead of python3.5. Maybe that is causing the issue. Quote
Jim Posted December 8, 2018 Author Posted December 8, 2018 Sigh....why do I still get this error: File "build/bdist.linux-armv7l/egg/brickpi3.py", line 21, in <module> IOError: [Errno 2] No such file or directory Installed /usr/local/lib/python3.5/dist-packages/brickpi3-0.0.0-py3.5.egg Processing dependencies for brickpi3==0.0.0 Searching for spidev==3.3 Best match: spidev 3.3 Adding spidev 3.3 to easy-install.pth file Using /usr/local/lib/python3.5/dist-packages Finished processing dependencies for brickpi3==0.0.0 running install_egg_info Copying brickpi3.egg-info to build/bdist.linux-armv7l/egg/brickpi3-0.0.0.egg-info I kinda understand the message. I copied the example files to my program, but I didn't include the build folder. So I somehow need to make sure that my program can find that build folder...or something like that?! Quote
Jim Posted December 8, 2018 Author Posted December 8, 2018 I have probably narrowed my issues down to this command: spi.open(0,1) This command doesn't work, but when I change it to: spi.open(0,0) ...it does work. The second number is the device id and apparently, I don't have a device with id 1. Another strange thing is that I when I run my program from VS Code, I get a permissions error. But when I use sudo python3 test.py from the terminal command line, it does work. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.