Presumably that would come from here -NameError: name 'send_at_command' isn't defined
It is best to turn what you are doing into a MicroPython program or module rather than try to do it all from the REPL or there's going to be a lot of typing every time you try to get it to work.Code:
# Function to send an AT command and wait for the responsedef send_at_command(command, timeout=5000): uart.write(command + "\r\n") time.sleep(0.1) start = time.ticks_ms() response = b"" while time.ticks_diff(time.ticks_ms(), start) < timeout: if uart.any(): response += uart.read() return response
Statistics: Posted by hippy — Fri Nov 08, 2024 6:47 pm