Let's say the following code is uploaded to the main.py file on the microcontroller:
Code: Select all
from machine import Pin
led = Pin(25, Pin.OUT)
So far I have managed to send it, but not execute it. I run the following code on the laptop:
Code: Select all
import serial
ser = serial.Serial(port='/COM3', baudrate = 115200, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS, timeout=1)
ser.write(b'led.value(1)')
Is there something I can do to make the microcontroller run it without having to connect to the repl console? I've tried ser.write(b'\n') but it doesn't do anything.
I'm using the pico go extension in vs code on windows 10
Thanks in advance