dexterind / brickpi_python Goto Github PK
View Code? Open in Web Editor NEWBrickPi Python Development
BrickPi Python Development
It says to SSH in and run Car.py, but there is no file.
Hey folks,
We had a request to change this license from Creative Commons over to GNU GPL3. I wanted to propose it and make sure everyone is ok with it before I make the change.
http://www.gnu.org/licenses/gpl-3.0.txt
Please sound off!
The Ultrasonic drivers are not working at all. I first created a program to test the sensor and got readings from 980 to 110, and they were pretty much at random. I then tried the default test program, LEGO-UltraSonic_sensor_Test.py, and got a readout like this: -1, -1 -1, and so on.
I then tried the C# version and the drivers work great, very accurate.
I have done a great deal of testing, including switching cables, ports, and such, I think I have pretty much ruled out that it is not a hardware issue. It most likely is an issue with the python drivers.
Line 139 BrickPi.py contains =======, all copies of BrickPi.py, causes SyntaxError.
Would it be possible to upload the package to pypi instead of users having to pull from HEAD.
Hi,
i need more than four motors, so I'm looking for a Solution. Do you knwo, if its possible to use the Mindsensor's Multplexer NXTMMX-v2 with the "BrickPi.py"?
I think, this multiplexer is just an I²C extender. Mindsensors wrote me: "NXTMMX-v2 is an i2c device and it's programming interface is documented. Not sure if there is exposed I2C interface and API on BrickPi,
but it would be possible to use NXTMMX-v2 using i2c interface."
Thanks!
Hi, after putting the files onto my brickpi and installing brickpi according to your instructions, I tried running an example program. When I run it, my pi says ImportError: No module named BrickPi. This is confusing since I followed your instructions. I emailed you before and you said that I was probably doing it wrong... I've tried several times and its still not working. A video tutorial of all the steps from downloading the brickpi stuff from the internet to running a program would be great.
Thanks
Spaces in filenames can make life complicated when working on the command line, and the BrickPi repository is full of them. For example, you can't tell someone to run:
sudo python Sensor Examples/LEGO-Motor Test.py
But you have to make sure they either quote the path:
sudo python "Sensor Examples/LEGO-Motor Test.py"
Or backslash escape all the spaces:
sudo python Sensor\ Examples/LEGO-Motor\ Test.py
It would be helpful if you could retool this repository as a standard Python package that can be installed via pip
or easy_install
with automatic dependency resolution.
Hello, since the merge of the #58 pull request the installation process got disrupted.
When you try import BrickPi
there appears an error saying cannot import ir_receiver_check
.
If you revert this merge, everything works fine.
There is a Syntax error in the BrickPi sensor examples. There is a list of 5 =
I have removed these and the code seems to run for my initial tests. I attach the git diff, happy to open a pull request.
'''python
--- a/Sensor_Examples/BrickPi.py
+++ b/Sensor_Examples/BrickPi.py
@@ -136,7 +136,7 @@ TYPE_SENSOR_EV3_COLOR_M2 = 52 # Color // Min is 0, ma
TYPE_SENSOR_EV3_COLOR_M3 = 53 # Raw reflected
TYPE_SENSOR_EV3_COLOR_M4 = 54 # Raw Color Components
TYPE_SENSOR_EV3_COLOR_M5 = 55 # Calibration??? Not currently implemen
-=======
+
TYPE_SENSOR_EV3_COLOR_M0 = 50
TYPE_SENSOR_EV3_COLOR_M1 = 51
TYPE_SENSOR_EV3_COLOR_M2 = 52
'''
Are you distributing this project under the terms of the GPL? Something else? Can I fork it? Redistribute it? Can I use it to make millions selling Pi-based robots? If I do do I need to share my code changes with you?
The Ultrasonic drivers are not working at all. I first created a program to test the sensor and got readings from 980 to 110, and they were pretty much at random. I then tried the default test program, LEGO-UltraSonic_sensor_Test.py, and got a readout like this: -1, -1 -1, and so on.
I then tried the C# version and the drivers work great, very accurate.
I have done a great deal of testing, including switching cables, ports, and such, I think I have pretty much ruled out that it is not a hardware issue. It most likely is an issue with the python drivers.
There are some patch text in source codes, For example:
<<<<<< HEAD
TYPE_SENSOR_EV3_COLOR_M0 = 50 # Reflected
TYPE_SENSOR_EV3_COLOR_M1 = 51 # Ambient
TYPE_SENSOR_EV3_COLOR_M2 = 52 # Color // Min is 0, max is 7 (brown)
TYPE_SENSOR_EV3_COLOR_M3 = 53 # Raw reflected
TYPE_SENSOR_EV3_COLOR_M4 = 54 # Raw Color Components
TYPE_SENSOR_EV3_COLOR_M0 = 50
TYPE_SENSOR_EV3_COLOR_M1 = 51
TYPE_SENSOR_EV3_COLOR_M2 = 52
TYPE_SENSOR_EV3_COLOR_M3 = 53
TYPE_SENSOR_EV3_COLOR_M4 = 54
TYPE_SENSOR_EV3_COLOR_M5 = 55
origin/ev3dev
I uninstalled BrickPi then reinstalled with the latest bits . When I run a sample python script I get the message "Disable IR receiver before continuing". Has anyone seen this? Tried running the ir_receiver_check.py scripts and I'm still hitting the problem.
pi@dex ~/Desktop/BrickPi/BrickPi_Python $ sudo python simplebot_simple.py
Disable IR receiver before continuing
pi@dex ~/Desktop/BrickPi/BrickPi_Python $ sudo python ir_receiver_check.py
True
pi@dex ~/Desktop/BrickPi/BrickPi_Python $ sudo python ir_receiver_check.pyc
True
pi@dex ~/Desktop/BrickPi/BrickPi_Python $ sudo python simplebot_simple.py
Disable IR receiver before continuing
There is little to no documentation about this module.
At least a listing of all functions and classes with a brief explanation would be helpful.
Also way to little function are presented in the examples folder.
Greetings, Pixdigit.
So I have just put my BrickPi shield on My Pi3, downloaded the latest Raspbian
Done sudo update, Upgrade etc
Cloned BrickPi_Python
And tried to run sudo python LEGO-Touch_Sensor_Test.py
I get :
BrickPiSetupSensors() #Send the properties of sensors to BrickPi
File "/home/pi/BrickPi_Python/Sensor_Examples/BrickPi.py", line 492, in BrickPiSetupSensors
BrickPiFlush() # Toss out any old Rx data. This helps to make sure everything is fresh, and for the correct "core".
File "/home/pi/BrickPi_Python/Sensor_Examples/BrickPi.py", line 697, in BrickPiFlush
while ser.inWaiting():
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 435, in inWaiting
s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
IOError: [Errno 25] Inappropriate ioctl for device
proposed change: if you add "zip_safe =False" to the setuptools.setup() it will allow multiple "python setup.py install" to work without having to remove the zip file first. (kindof a hack, but it works).
I noticed that the wiki is not locked down only to contributor , so does that mean I can go ahead and create a wiki page?
When installing against the latest master, import BrickPi fails due to ImportError "no module ir_receiver_check". I see this was added to BrickPi, but was it added to the setup easy_install? If not, how can I install it by hand. Thanks!
I got BrickPi_Python all set up and installed, but when I try to run any of the sensor examples I get the following trace:
File "/usr/local/lib/python2.7/dist-packages/BrickPi-0.0.0-py2.7.egg/BrickPi.py", line 132
<<<<<<< HEAD
^
SyntaxError: invalid syntax
I'm using Python 2.7.3. The relevant lines are these: 132, 154.
I was having trouble getting the RPi script to work this morning and finally found the solution. Adding check_origin got it to work, I will try to make a pull request later today.
cd to directory BrickPi_Python/Sensor_Examples and run
} sudo python EV3-Touch.py
Traceback (most recent call last):
File "EV3-Touch.py", line 24, in <module>
from BrickPi import * #import BrickPi.py file to use BrickPi operations
File "/home/pi/workspace/BrickPi_Python-master/Sensor_Examples/BrickPi.py", line 47, in <module>
from builtins import input
ImportError: No module named builtins
Output of uname -a is
} uname -a
Linux dex 4.4.32-v7+ #924 SMP Tue Nov 15 18:11:28 GMT 2016 armv7l GNU/Linux
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.