pimoroni / breakout-garden Goto Github PK
View Code? Open in Web Editor NEWDocumentation, software, and examples for the Breakout Garden ecosystem.
Home Page: https://shop.pimoroni.com/products/breakout-garden-hat
License: MIT License
Documentation, software, and examples for the Breakout Garden ecosystem.
Home Page: https://shop.pimoroni.com/products/breakout-garden-hat
License: MIT License
Used apis are no longer working
Could you please provide a ful working example?
Thanks
I am getting the following error when running the weather example. I did not modify any code in the examples. I am running this on a raspberry pi zero w.
Traceback (most recent call last):
File "./weather.py", line 104, in <module>
icon_image = Image.open(f)
File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 2779, in open
prefix = fp.read(16)
File "/usr/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
My system configuration (output of uname -a
) is:
Linux raspberrypi 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l GNU/Linux
What am I doing wrong and how can I fix it? Currently I commented out all the code for processing the icons.
Some libraries have install.sh endpoints that try to install examples. They use a confirmation and require a keypress to continue, which stalls the auto installer.
We need a --force
argument added to install.sh across the board to fix this.
Hi, I tried to run the example codes of the BME680 (read-all.py) and MLX90640 (hotspot.cpp) together in parallel on the raspberry pi, but both crashes upon attempting to run them simultaneously.
The error shown on the read-all.py script is this:
Traceback (most recent call last):
File "read-all.py", line 58, in
if sensor.get_sensor_data():
File "build/bdist.linux-armv7l/egg/bme680/init.py", line 264, in get_sensor_data
File "build/bdist.linux-armv7l/egg/bme680/init.py", line 248, in set_power_mode
File "build/bdist.linux-armv7l/egg/bme680/init.py", line 304, in _set_bits
File "build/bdist.linux-armv7l/egg/bme680/init.py", line 319, in _get_regs
IOError: [Errno 5] Input/output error
From what I'm aware, they're on different i2c addresses, with the MLX90640 at 0x33 and BME680 at 0x76.
Does anyone know how this issue can be resolved?
Thank you
See https://twitter.com/ydn/status/1079784441344446464 for details.
On Jan. 3, 2019, the http://weather.yahooapis.com and http://query.yahooapis.com for Yahoo Weather API will be retired. Contact [email protected] for credentials for the free Yahoo Weather API service at https://weather-ydn-yql.media.yahoo.com/forecastrss .
Occasional traceback in weather example
Feb 25 17:17:46 raspberrypi weather.py[2043]: Traceback (most recent call last):
Feb 25 17:17:46 raspberrypi weather.py[2043]: File "/home/pi/breakout-garden/examples/weather/weather.py", line 155, in <module>
Feb 25 17:17:46 raspberrypi weather.py[2043]: weather = get_weather(location_string)
Feb 25 17:17:46 raspberrypi weather.py[2043]: File "/home/pi/breakout-garden/examples/weather/weather.py", line 71, in get_weather
Feb 25 17:17:46 raspberrypi weather.py[2043]: .join([str(c) for c in coords])))
Feb 25 17:17:46 raspberrypi weather.py[2043]: TypeError: 'NoneType' object is not iterable
My best guess is that perhaps get_coords() or the requests.get() may occasionally fail. Perhaps some try
exception handling around these is needed?
This is a feature request.
I like being able to install all requirements remotely via something that can do parallel ssh (ansible
in my case). The current install process seems to require that you do this step manually:
pi@raspberrypi:~/breakout-garden-master $ sudo ./install.sh help
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Breakout Garden: Installer. (3 breakout(s) found)
bme680 weather sensor: Installed
vl53l1x time of flight: Required
ltr559 proximity sensor: Required
Installing 2 module(s). Enter to continue (Ctrl+C to cancel)...
Would it be possible to add a flag to the script such that you just install everything? It is a bit of a bother that I need to manually run a script on every device (I've got 8 in my house) whenever I add a sensor.
The ltr559
sensor gives an install error. Figured I'd let people know about it here.
pi@raspberrypi:~/breakout-garden-master $ sudo ./install.sh
Breakout Garden requires I2C. We've enabled it for you.
Breakout Garden: Installer. (3 breakout(s) found)
bme680 weather sensor: Installed
vl53l1x time of flight: Installed
ltr559 proximity sensor: Error!
Installing 3 module(s). Enter to continue (Ctrl+C to cancel)...
Errors occured during install. For more info see /tmp/breakout-garden/install.log
pi@raspberrypi:~/breakout-garden-master $ cat /tmp/breakout-garden/install.log
Warning: No install.sh found for ltr559 proximity sensor.
Retrying doesn't help.
I had problems with PIL and the seismometer example, solved by installing python-imaging and libopenjp2-7-dev
$ python seismograph.py
Traceback (most recent call last):
File "seismograph.py", line 6, in <module>
from PIL import Image
ImportError: No module named PIL
$ sudo apt-get install python-imaging
$ python seismograph.py
Traceback (most recent call last):
File "seismograph.py", line 11, in <module>
from luma.core.interface.serial import i2c
ImportError: No module named luma.core.interface.serial
$ python3 seismograph.py
Traceback (most recent call last):
File "seismograph.py", line 6, in <module>
from PIL import Image
File "/usr/local/lib/python3.5/dist-packages/PIL/Image.py", line 94, in <module>
from . import _imaging as core
ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory
$ sudo apt-get install libopenjp2-7-dev
$ python3 seismograph.py
Hi
I´ve changed the weather example to use bm280, instead of bme680.
Yet I have an error when opening the icons file:
Traceback (most recent call last):
File "weather_bmp280.py", line 100, in
icon_image = Image.open(f)
File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2319, in open
prefix = fp.read(16)
File "/usr/lib/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
Is there something wrong with the files?
Is there any optional parameter on the objects used that I can change?
Thanks
For the weather.py example, what's the new suggested, recommended source API?
I ask as it appears the Dark Sky API is no longer available.
Thank you.
The Breakout Garden installer detected my PA101D GPS module as a UV and UVA sensor. It might be worth checking the I2C addresses of both.
breakouts.config shows I2C address of 0x10 is: veml6075-python: veml6075: veml6075 uva and uvb sensor
However this is now the address printed on my PA1010D GPS module, which isn't listed in the breakouts.config.
Hello :)
==SETUP==
==END==
Hope this makes sense :)
Les
Hi
I´ve tried to adapt the seismograph.py example but with bmp280 sensor to draw the graphic.
On the first iteration of the main loop the code throws an exception in this line
draw.line([(128, 64), (96, 64 + points[-1])], fill="white")
The array is empty so the call to the last element fails.
Is there something missing in the code sample?
I´m using a raspberry pi zero.
Thanks
Occasional traceback in the get_weather function
Mar 11 10:14:22 raspberrypi weather.py[2437]: Traceback (most recent call last):
Mar 11 10:14:22 raspberrypi weather.py[2437]: File "/home/pi/breakout-garden/examples/weather/weather.py", line 164, in <module>
Mar 11 10:14:22 raspberrypi weather.py[2437]: weather_icon = get_weather_icon(get_weather(coords))
Mar 11 10:14:22 raspberrypi weather.py[2437]: File "/home/pi/breakout-garden/examples/weather/weather.py", line 80, in get_weather
Mar 11 10:14:22 raspberrypi weather.py[2437]: weather["summary"] = curr[0].img["alt"].split()[0]
Mar 11 10:14:22 raspberrypi weather.py[2437]: IndexError: list index out of range
Mar 11 10:14:23 raspberrypi systemd[1]: weather-oled.service: Main process exited, code=exited, status=1/FAILURE
I'd guess that try/except is needed round the call to request.get()
call in the case in intermittent network error and also a check performed that soup.findall()
that it actually finds something that can then be split.
I'm getting this when weather.py is used as is.
This Pimoroni Breakout Garden example requires a
BME680 Environmental Sensor Breakout and a 1.12" OLED Breakout.
This example turns your Breakout Garden into a mini weather display
combining indoor temperature and pressure data with a weather icon
indicating the current local weather conditions.
Press Ctrl+C a couple times to exit.
Traceback (most recent call last):
File "./weather.py", line 152, in
code = get_weather_code(location_string)
File "./weather.py", line 73, in get_weather_code
if "channel" in json_data["query"]["results"]:
TypeError: argument of type 'NoneType' is not iterable
What am I doing wrong?
On a fresh install of Raspbian lite I get this error when trying to run install.sh:
Traceback (most recent call last):
File "autodetect.py", line 2, in <module>
import smbus
ImportError: No module named smbus
Sorry, I couldn't find any breakouts!
Installing the Python smbus module fixed this issue but I thought it might be useful to document that here.
Warning/error when running the install script with the mlx90640. install.log: Warning: No install.sh found for mlx90640 thermal camera.
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.