Wykres commitów

22 Commity (8d964bce2c243e654626d5d3920abdec58cef33d)

Autor SHA1 Wiadomość Data
Phil Howard 6bf5c7f7b5 Plasma: Swap make_new/print functions for WS2812 module.
Fixes #637
2023-01-19 10:29:30 +00:00
Phil Howard 77a5edc83f MicroPython: Update to support new slots mp_obj_type_t.
Follows the lead from: 662b9761b3

Update to support MP_DEFINE_CONST_OBJ_TYPE with backwards compatibility.
2023-01-11 09:46:45 +00:00
Philip Howard 3405130820
Merge pull request #536 from pimoroni/hel-plasma
Plasma Stick examples
2022-10-19 10:51:27 +01:00
helgibbons ce76ff5ea3 update docs 2022-10-18 14:25:02 +01:00
ZodiusInfuser a7dd4b3baf Updated MP examples with plasma_stick defs 2022-10-18 13:13:57 +01:00
Philip Howard 9878e4bff7
Merge pull request #528 from pimoroni/patch-plasma-alloc
Plasma: Use m_new to alloc buffer on gc_heap if not supplied.
2022-10-06 12:12:34 +01:00
Phil Howard eaf9fcdf93 Plasma: Use m_new to alloc buffer on gc_heap if not supplied.
When no buffer was supplied it would fall upon the class to call "new" and allocate within C/C++'s (very small) heap.

Ensure a MicroPython managed buffer (allocated from gc_heap) is always supplied to the APA102/WS2812 classes.
2022-10-04 11:39:56 +01:00
Peter Copeland 8cc6e85f98
Move set_brightness to APA102
Documentation for set_brightness function was under WS2812 but text referred to APA102, and set_brightness is not supported on WS2812. I've moved the paragraph to the end of the APA102, verbatim.
2022-10-02 23:43:12 +01:00
Phil Howard 6a3ba0d421 MicroPython: Shim MP_REGISTER_MODULE for >1.18 compat.
MicroPython has changed MP_REGISTER_MODULE to use only *two* args and now runs the preprocessing stage on files before running makemoduledefs.py.

This change avoids the build exploding, since the new regex matches the last two args as a single argument and generates a malformed module defs include.

The pattern here exploits the fact that 1.18 and below do not preprocess files, so *both* MP_REGISTER_MODULE lines are included in the source, but *only* the three arg version is matched by regex.

In >1.18 the files will be processed and the three arg version removed before makemoduledefs.py processes it.
2022-06-14 12:08:47 +01:00
Phil Howard bc0390b86c MicroPython: Use placement new to alloc classes on GC_HEAP 2022-05-23 15:34:49 +01:00
Philip Howard ab602135b6
Merge pull request #232 from waveform80/rgbgrbrg
Fix ordering of tuple returned by WS2812.get
2022-01-25 11:10:49 +00:00
Philip Howard 9c05e69573
Merge pull request #235 from mozz100/patch-1
Fix "repeat_time" docs in README
2022-01-25 11:01:29 +00:00
Phil Howard 52df22a16a Plasma/MP: bind update method for #236 2022-01-07 16:04:46 +00:00
Richard Morrison aea0756fb8
Update README.md
Fix documentation around `Button` class's `repeat_time` behaviour.
2022-01-04 22:09:38 +00:00
Dave Jones 1a66c9f6d6 Fix ordering of tuple returned by WS2812.get
(and types of numbers returned by both WS2812.get and APA102.get)
2021-12-23 00:39:22 +00:00
Phil Howard 580d8cf7a2 Plasma: Add WS2812 W suppot for #220 2021-12-03 10:50:06 +00:00
Edd Hurst 47259c55e8
Fix documentation examples setting RGB LED
Update the examples using set_led function and replacing to use set_rgb

Fixes #221
2021-11-21 14:05:12 +00:00
Phil Howard 5abdad05a8 Fix MicroPython alloc'd bytearray support in APA102 driver
A bytearray allocated in Python would point to uninitialised bytes, missing the SOF byte and brightness for APA102 pixels.

Add a blunt loop over the MicroPython buffer, calling "brightness" for each RGB element to ensure the SOF byte and brightness are initialized.
2021-08-25 22:00:12 +01:00
ZodiusInfuser cf4b45acc7 Exposed Get to MP, and added I2C pin numbers 2021-08-24 15:21:14 +01:00
ZodiusInfuser c8f90ea846 Changed default color order to GRB to match our strips 2021-08-23 17:18:34 +01:00
ZodiusInfuser 4976c90ab3
Updated readme with changes, and description of current sensing 2021-08-19 16:15:38 +01:00
ZodiusInfuser 7496e8c8ba Renamed plasma mp directory to match module name 2021-08-19 15:25:12 +01:00