Remove the HM-10/11 test

This commit is contained in:
Danny Staple 2022-06-22 22:25:02 +01:00
parent c962c0bd6b
commit 13801c8551
2 changed files with 0 additions and 43 deletions

View File

@ -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')

View File

@ -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)