micropython / micropython

MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems
https://micropython.org
Other
19.1k stars 7.64k forks source link

neopixel_write function not defined #4279

Closed bricedenicedu69 closed 5 years ago

bricedenicedu69 commented 5 years ago

Hi everyone, I am working on a project which consists in putting some colors on my LED. They are quite similar to WS2812 devices but I was thinking about using the neopixel module given. However, it looks like I also need the neopixel_write function imported from the esp module (which I cannot import as well, so I've been looking for the esp.py file which is missing). Thus the neopixel_write function definition is missing and I cannot use it. Does anyone know where I can find it ? I found this : https://github.com/adafruit/Adafruit_Blinka/blob/master/src/neopixel_write.py (I ignore everything above the function definition) but I run my main file, it is not working because the _neopixel is not defined and I have no idea what it stands for. I am using Atom as IDE and working with a Pycom/Sipy device. Thanks for your help, I can provide you with further information if needed.

robert-hh commented 5 years ago

@bricedenicedu69: First of all, this is the bug tracker for the micropython.org variant of micropython. Your question seems not to be a bug, but more a "how do I this or that". So it is better asked in the respective forum. Since it is a Pycom device, the matching forum is forum.pycom.io, where you alerady asked that question. I have seen it and will respond to it this night. Besides that, the micropython.org version of micropython has a method neopixel.write in the esp module. And since this module is an embedded one, you cannot find esp.py. There no esp module in the pycom variant of micropython. Therefore your script does not work. But, as said, I'll look into that later. P.S.: Please do not forget to close the issue here.