Example code of MIT app, about sending data from Raspberry Pi pico to the phone

For example like this

from machine import Pin,UART
import time
uart=UART(0,9600)

r=Pin(10,Pin.OUT)
but=Pin(15,Pin.IN)

while True:
if uart.any():
data=uart.read()
data=str(data)
print(data)

    if('R_ON' in data):
        r.value(1)
        
    elif('R_OFF' in data):
        r.value(0)
1 Like

What is your problem actually ?

This with Raspberry Pi 3 Model B:

https://community.appinventor.mit.edu/search?q=raspberry

1 Like

just dont know how to use phone to read the data from the raspberry pi

1 Like