How to write efficient code? ( Micropython) #13726
Replies: 3 comments 1 reply
-
Maybe you should ask someone in the first place ?
This is called using
def LED_pattern_2():
for i in range(17):
if i == 0: # IC No.1
gs_data_IC_2_1()
elif i == 1: # IC No.3
gs_data_IC_2_2() by
|
Beta Was this translation helpful? Give feedback.
-
There is an official doc here. |
Beta Was this translation helpful? Give feedback.
-
Please tell us what hardware you are using. I understand that there may be a language barrier, but if you don't tell us about the hardware, this question will be about as helpful as your previous two identical questions: Newcomer's request for help, turn on LED and Error on Raspberry Pico with Micropython. Are you using WS2812 LEDs? There's already a NeoPixel driver built into the RP2040 MicroPython firmware that would make your code much shorter |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am trying to turn on Backlight by using Raspberry Pi Pico with Micropython.
(MicroPython v1.22.0 on 2023-12-27)
Here is the program code that I wrote:
https://paste.fastmirror.net/?c2c2e0dcd1beafe5#F6rycRgyEdiijcoPJoZdrwGWSb9D8BgJJL3PbbPfriav
Someone said that my code looks extremely inefficient, can anyone teach me how to improve my code?
By the way, this is how I set up the LEDs to light up, you can watch it by this URL:
https://streamable.com/9lx3g3
Beta Was this translation helpful? Give feedback.
All reactions