-
Hi All, I'm attempting to use the ESP8266 to interface with a LED driver, the driver communicatation needs a PWM signal. The ESP board is connected to a PWM breakout via i2c to set the PWM duty cycle so the drivers react properly. Everything is up and running, I can modify the duty cycles, pull values from a look-up table to set duty cycles as needed. I can talk to 10 different drivers... I would like to extend this project so that I can create an arbitrary intensity shape 'offline' to be used in my controller. (Intensity and duty cycle are the same here...) By offline I mean, using something like scipy.interpolate -> CubicSpline to visualize the curve i'm trying to create on my laptop. This all works, but i've run into a problem loading shape into memory on the ESP8266. I'm exporting the cubic spline values as a text file, and it's a giant single line string (30k columns-ish) (4096 numbers x-xxxx, split by a space.) This is not likely an ideal approach, and this whole thing is a new problem for me... anyone have any ideas on how better to move a List created in one spot into a List to be used on the 8266?? Where this is falling over is when i call Split() it runs out of memory. Doing a bit of digging, this isn't a new problem as there are up to 3 internal copies of the string being chopped up. Is there a more memory efficient version of split? I can trade time, a few 10's of seconds to chug through is okay... I've seen a few suggestions, but nothing that made sense to me. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
int.from_bytes()
orstruct.unpack()
.