Remove the HM-10/11 test
This commit is contained in:
parent
c962c0bd6b
commit
13801c8551
@ -1,23 +0,0 @@
|
||||
import board
|
||||
from digitalio import DigitalInOut
|
||||
import time
|
||||
import busio
|
||||
|
||||
led = DigitalInOut(board.LED)
|
||||
led.switch_to_output()
|
||||
|
||||
# PICO UART pins? What am i not using?
|
||||
uart = busio.UART(board.GP12,board.GP13,baudrate=9600)
|
||||
|
||||
while True:
|
||||
data = uart.read(32)
|
||||
|
||||
if data is not None:
|
||||
print(data)
|
||||
data_string = ''.join([chr(b) for b in data])
|
||||
if data_string=='1':
|
||||
led.value = True
|
||||
uart.write('on')
|
||||
if data_string=='0':
|
||||
led.value = False
|
||||
uart.write('off')
|
||||
@ -1,20 +0,0 @@
|
||||
import board
|
||||
from digitalio import DigitalInOut
|
||||
import time
|
||||
import busio
|
||||
import supervisor
|
||||
|
||||
led = DigitalInOut(board.LED)
|
||||
led.switch_to_output()
|
||||
|
||||
# PICO UART pins? What am i not using?
|
||||
uart = busio.UART(board.GP12,board.GP13,baudrate=9600)
|
||||
|
||||
while True:
|
||||
data = uart.read(32)
|
||||
if supervisor.runtime.serial_bytes_available:
|
||||
value = input().strip()
|
||||
print(f"Received: {value}\r")
|
||||
uart.write(value.encode())
|
||||
if data is not None:
|
||||
print(data)
|
||||
Loading…
x
Reference in New Issue
Block a user