For example when i give 5 to the code, i want to turn on the led in our rpi pico (rpi pico connected to pc with cable)
#This code will run in my computer (test.py)
x=int(input("Number?"))
if (x==5):
#turn on raspberry pi pico led
The code of rpi pico:
#This code will run in my rpi pico (pico.py)
from machine import Pin
led = Pin(25, Pin.OUT)
led.value(1)
or vice versa (doing something in the code on the computer with the code in the rpi pico)
and how can i call/get a variable in pc to rpi pico
note: I am writing a code with opencv python and I want to process the data from my computer's camera on my computer and I want rpi pico to react according to the processed data. And raspberry pi pico connected to pc with cable.