Git Product home page Git Product logo

breakout-garden's People

Contributors

gadgetoid avatar koaning avatar nickbroon avatar sandyjmacdonald avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

breakout-garden's Issues

Icons in the weather example causing `UnicodeDecodeError`

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 - sgp30, drv2605 - block the installer

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.

Issue with running BME680 and MLX90640 Simultaneously

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

traceback in get_weather() example

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?

option to install everything

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.

ltr559 won't install

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.

Seismometer example: ImportError: No module named PIL

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

weather example open icons

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

Weather API

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.

Incorrect identification of module

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.

Installer failed to install five breakout boards at once

Hello :)
==SETUP==

  • Brand new Raspbian from latest image installed fresh this morning.
  • Raspberry Pi 3B
  • SSH in to Pi from Linux machine over Ethernet

==END==

  • git clone the repo, attached five breakout boards BME680, OLED, LSM303D, BH1745, VL53L1X
  • Ran the installer as per instructions.
  • I2C not enabled via installer (typically Pimoroni boards have an I2C step in the installer)
  • Ran sudo raspi-config and enabled I2C, rebooted for good luck.
  • Ran the installer again

breakoutgarden

  • Received the above error message (GIF image)
  • Removed four breakouts and repeated install.
  • Installer detected one board and installed.
  • Repeated the install process, adding a new breakout each time.
  • Worked each time/
  • All working.

Hope this makes sense :)
Les

seismograph.py Thread

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

Traceback in weather example

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.

Getting error on Raspberry Pi Zero

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?

ImportError: No module named smbus

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.

Error installing for mlx90640

Warning/error when running the install script with the mlx90640. install.log: Warning: No install.sh found for mlx90640 thermal camera.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.