dexterind / brickpi3 Goto Github PK
View Code? Open in Web Editor NEWThe BrickPi3 connects LEGO Mindstorms with the Raspberry Pi.
Home Page: https://www.dexterindustries.com/brickpi/
License: Other
The BrickPi3 connects LEGO Mindstorms with the Raspberry Pi.
Home Page: https://www.dexterindustries.com/brickpi/
License: Other
And yet another bug! Once in a while BP.reset_all() doesn't correctly reset everything. For example I'll be running two motors and do CTRL-C to terminate the program. As you can see in the code that it should run BP.reset_all(), which it does. However sometimes it will not stop the motors at all or even stop one motor but not the other.
try:
main()
except Exception as Inst:
print(Inst)
except KeyboardInterrupt:
pass
BP.reset_all()
I was noticing while working on ev3dev drivers that only the values 0-99 change the brightness of the LED. If I send a value of 100, the brightness does not change. From the python code, it looks like it is intended that 100 should work.
While working on ev3dev support for BrickPi3, I found a missing feature that is present on other similar devices. There is not any feedback from the motors other than the position.
Other useful feedback would include:
See ev3dev/ev3dev#282 (comment) for a table with a comparison of other devices.
BrickPi3, ev3dev, lejos, lego-ev3-gyro sensor, I’m getting odd readings. I was expecting degrees, but instead get 0-255 as I tilt the sensor.
From the ev3-gyro-sensor docs, it looks like it should be a signed 16-bit integer:
Which isn’t quite ideal, I can’t tell if it went in a circle, and the resolution isn’t as good as 360 degrees.
My readings over a few seconds, I was rocking it back and forth.
I confirmed this was the same reading from /sys/bus/lego/devices/spi0.1:S4:lego-ev3-gyro/lego-sensor/sensor0/device/lego-sensor/sensor0/value0 so it isn’t an artifact of Java or Kotlin.
and after some research, David L said:
"I've confirmed the problem on the BrickPi3 (firmware v1.4.6). There is a mode on the EV3 Color sensor that uses the same data format and that is working, so I am quite confident this is a BrickPi3 firmware issue. Best thing to do would be to test using Raspbian 4 Robots and if the same problem is there, file an issues with Dexter Industries."
After doing so, Nicole P. suggested I log the issue here.
Hello. I just got two brickpi3's and I have stacked them on top of eachother and given them enough power. How do I control the "stacked" brickpi3 with python script? It seems like I need to go through a complex process of using each individual Brickpi3's ID. I guess I have a second question which is how would I be able to do two Brickpi3's running ev3 dev? I still have yet to figure out how to run a simple motor with a brickpi3 on ev3dev. Any help would be greatly appreciated. You can even send me an email response if you like at [email protected]
Thanks.
I am getting inaccurate dps readings from get_motor_status.
my code:
import brickpi3
from time import sleep
BP = brickpi3.BrickPi3()
BP.set_motor_dps(BP.PORT_B, 200)
for i in range(0, 20):
print(BP.get_motor_status(BP.PORT_B))
sleep(0.2)
BP.set_motor_dps(BP.PORT_B, 0)
Running that code I got readings anywhere from 50 to 200 dps off depending on what dps I set it to.
Hardware: BrickPi3 + Raspberry Pi Zero W
OS: Raspian Buster Lite
When I am try to update the firmware by executing the shell script brickpi3samd_flash_firmware.sh
, there pop up the error message:
NOT_FOUND_9000c1
I just simply modify the first if
paragraph and add these lines after
elif [ "$RPI_VERSION" == "RPI4" ] ; then
# use rpi2 interface config file
INTERFACE_FILE="rpi4.cfg":
else
INTERFACE_FILE="rpi1.cfg"
to force using the rpi1.cfg
to update the firmware. Hope this method can solve this issue.
I'm using ev3dev and just upgraded to firmware v1.4.4. The voltage compensation introduced in this firmware version seems to cause problems at 9V. I am running off of a variable voltage wall wart power supply. At 12V, motors seem to run normally. At 9V, however, the motor does not rotate.
Here are videos showing the difference. The only difference is the power supply voltage. The commands are the same.
12V: https://youtu.be/Vw6AnY2EMxg
9V: https://youtu.be/EfUtpgdzhdw
When I try to connect to the RaspberryPI with the BrickPI image from you on it, using ssh x.x.x.x -Y
, and run scratch
, the display won't get forwarded.
I get the error:
...
X11 connection rejected because of wrong authentication
xhost: unable to open display "localhost:10.0"
BrickPi3
X11 connection rejected because of wrong authentication
Unable to access the X Display, is $DISPLAY set properly?
...
After some investigation, we fixed this by editing your scratch-wrapper script in /usr/bin/scratch
, by
adding -E
parameter to the sudo command when starting click_scratch.py
so the environment variables get transfered. So the command will be sudo -E python $SCRATCH_PATH/click_scratch.py
.
I did not find this script in this repository, so it might be in another? Can you send me the link and I'll create a pull request
The installation instructions in the README only tell to run the BrickPi3/Install/install.sh script. This script does not install the brickpi3 module. Shouldn't the install script either install the module or it be included in the installation instructions to run BrickPi3/Software/setup.py?
The documentation for set_motor_dps reads the same as the comments for set_motor_position.
I quote from the documentation.
| set_motor_dps(self, port, dps)
| Set the motor position in degrees
|
| Keyword arguments:
| port -- The motor port
| position -- The target position
|
| set_motor_position(self, port, position)
| Set the motor position in degrees
|
| Keyword arguments:
| port -- The motor port
| position -- The target position
As you can see it says they both do the same exact thing.
However functions do two different things. The set_motor_dps function moves the motor by degrees per second. It does not move the motor to a target position.
Would it be possible for you to export a 3D model of the board or alternatively provide the pcb layout so that it is easier to get the precise connector positioning etc? Thanks!
Hi,
I was wondering where are the Eagle files for the schematic and board? Seem to be mentioned on the website: https://www.dexterindustries.com/BrickPi/brickpi-tutorials-documentation/about/design/hardware-design/ but I can only see a schematic PDF.
Are they open source?
Following the directions found here.
I can't find the answer to the question. Does BrickPi3 support the new Raspberry Pi 4?
I have a Raspi 3B+ and a BrickPi3. I've already setup the ordinary Raspi and have been using it for months - has just the right setup I want for it. To use the BrickPi3 I'll have to erase all that and flash a new OS onto it. Why?
Why can't communicating between the BrickPi3 and Raspi be just a pip install
? What changes were made in the ordinary Raspbian?
I have ported the browserBot example to the BrickPi3. I have tested it and it appears to work.
The Python library has a typo on line 298 that causes a TypeError if an IOError is caught upon attempting to initialize the SPI communication with the Pi hat. Changing the line from except IOError()
to except IOError
should fix the issue.
If I am corrected the motors are not regulated, meaning if a force is applied the power will increase to keep it moving the same speed. Currently the motors run unregulated, so they will slow down when a force is applied.
If the system is switched on, the default motor power is set to -128
. As this is out of the allowed range of -100 <= ... <= 100
, setting the power to 0 causes a hop backwards.
I have tried to set the motors power limit to 0 first, yet it didn't have an effect.
After looking at the source code, I believe that this is hardware related (maybe with the attached powerbank?). What could be the reason for such a problem?
It would be nice to be able to allow other stop actions when a motor has reached the target position. In ev3dev, we have "hold", which is the current behavior of set_motor_position
and also "brake" and "coast".
In some applications, it is desirable to not halt so abruptly.
In the ev3dev drivers for BrickPi3, we use the custom sensor type for NXT analog sensors. We have successfully updated our drivers to be compatible with the 1.4.x firmware. Everything else seems to be working except for this. Is it possible you missed a change in the firmware when switching from index to bitwise port numbers? I don't see the firmware source code anywhere to check.
Hello. The set_motor_position() function does not include the option to control the speed of which the motors turn. You can only control the degrees. The BrickPi+ had this feature but apparently it wasn't added to the BrickPi3.
On line 22 of Test_Connected.py there is a missing parentheses.
Line 22:
print("Communication with BrickPi3 unsuccessful"
This bug also goes for the BrickPi repository There are no instructions to remove the brickpi python module. However the setup.py script does support it.(I tried it on the brickpi3) I noticed that they did previously exist on the BrickPi_Python repository. Here's a link of the repo at a point where there is the instructions: older BrickPi_Python readme
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.