I am using python 3.10.5 on my raspberry pi pico and I am trying to use match & case instead of if statements When I try to run the program it returns an error: Traceback (most recent call last): File "<stdin>", line 22 SyntaxError: invalid syntax Here is my function: async def BlueTooth(delay): while True:… Read More match case in micropython – SyntaxError: invalid syntax
New with C++ but been coding a lot of ObjC back in the day. So i thought i was smart trying to solve a cross reference issue with the old delegate pattern used widely in ObjC but only managed to move the issue it to another file 😂. Im trying to reach the invoker of… Read More How do i solve this "chicken vs egg" declaration issue?
from machine import Pin from time import sleep led = Pin(0, Pin.OUT) def dot(): led.value(1) sleep(0.5) led.value(0) sleep(2) def dash(): led.value(1) sleep(1) led.value(0) sleep(2) # 0.5 Seconds = Dot # 1 Second = Dash # word to be translated word = "Hi" >Solution : You can treat a string in Python as a list, for… Read More Trying to make a Raspberry Pi Pico project that blinks a light in morse code. How would I get the separate character from the "word" variable?