Commit Graph

17 Commits

Author SHA1 Message Date
aedad94aaf modified py 2022-10-24 17:35:24 +02:00
53105d5935 update exception 2021-01-24 14:44:35 +01:00
6bd6dd2e1c add exception output 2021-01-24 14:41:39 +01:00
11d9a58a55 added button inputs to rpyhal 2021-01-24 14:07:15 +01:00
27c6c5c3f5 repaired merger conflict 2021-01-07 15:56:49 +01:00
826c71e8cc fix typo 2021-01-07 15:32:24 +01:00
5debfae1dc modified service script and fixed merge conflict 2021-01-07 15:00:00 +01:00
59dfb0c818 added service scripts 2021-01-07 14:56:22 +01:00
d737de33dc cleaned up 2021-01-07 14:53:50 +01:00
3fafd9bf35 Added icon upload script, fixed ledmatrix for different layout 2021-01-07 11:02:50 +00:00
1abe7b1773 update error 2021-01-07 10:48:20 +01:00
4f4cbde2bf modified for 8x8 panels 2021-01-07 10:42:20 +01:00
Noah
57106a07d3 README: fix typo 2021-01-06 22:08:48 +01:00
Noah
bb67ca9060 Basic support for driving a display with rpi_ws281x
NOTE: weatherscene.py is known to NOT work under Python 3.x due to
an incompatibility with MicroPython's handling of strings and bytes.

This can be easily resolved although I opted to not do this, to preserve
compabilitity with the original code.

To use this on a Raspberry Pi, try:

    sudo apt install -y python-pip python-requests
    sudo pip install rpi_ws281x

Then connect the display's data line to the Raspberry Pi's GPIO 18 (PCM CLK)
(see https://pinout.xyz/)

References:

- https://github.com/noahwilliamsson/lamatrix/issues/1
- https://github.com/rpi-ws281x/rpi-ws281x-python (userspace WS281x driver)
- https://github.com/jgarff/rpi_ws281x (wiring docs)
2021-01-06 14:27:02 +01:00
Noah
bf0c4087b4 Improve compatibility with CPython 2.7 and 3.x 2021-01-06 14:25:33 +01:00
Noah
3e4dd4c0bc Rewrite to reduce memory usage and add more features
In addition to the clock scene, both the animation scene and the weather
scene should now work under MicroPython on devices with 520kBytes of RAM
(e.g. LoPy 1, WiPy 2) after:

- combating heap fragmentation during initialization by temporarily allocating
  a large chunk of RAM in the beginning of main.py and freeing it after all
  modules have been imported and initialized
- stream parsing the JSON response from the weather API
- converting animations to binary and streaming them from the flash file system

(additionally, older ESP8266 modules with 4MB flash have been found working
 under some circumstances with MicroPython 1.9.4 and an 8x8 LED matrix)

- 3D parts: add diffuser grid and frame for square LED matrix displays
- Arduino projects needs to be in a folder with the same name as the .ino file
- config: allow multiple WiFi networks to be configured
- config: add support for debug flags
- config: add intensity configuration
- HAL: unify serial input processing for Arduino and Pycom devices
- HAL: handle UART write failures on Pycom devices
- HAL: drop garbage collection from .update_display() because it takes several
  hundred milliseconds on 4MB devices
- MCU: clear display when enabling/disabling MCU independence from host
- PixelFont: move data to class attributes to reduce memory usage
- PixelFont: add more characters
- PixelFont: move data generation to scripts/generate-pixelfont.py
- LedMatrix: support LED matrixes with strides other than 8 (e.g. as 16x16 matrices)
- LedMatrix: add method to render text
- LedMatrix: let consumers handle brightness themselves
- AnimationScene: MicroPython does not implement bytearray.find
- AnimationScene: ensure minimum on-screen time
- BootScene: wifi connection and RTC sync progress for Pycom devices
- ClockScene: delete unused code, switch to generic text rendering method
- FireScene: classical fire effect
- WeatherScene: bug fixes, switch to generic text rendering method
- WeatherScene: ensure minimum on-screen time
- WeatherScene: use custom JSON parsing to reduce memory usage
2018-12-26 20:26:05 +00:00
Noah
30903a207b Initial commit 2018-12-21 08:12:54 +00:00