mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
8c9dcfb618
Signed-off-by: 李昂 <liang6516@outlook.com>
16 lines
239 B
Python
16 lines
239 B
Python
import PikaStdDevice as std
|
|
print('hello pikascript')
|
|
|
|
uart = std.UART()
|
|
uart.setId(0)
|
|
uart.setBaudRate(115200)
|
|
uart.enable()
|
|
|
|
def cb1(signal):
|
|
print('recv:', uart.read(32))
|
|
|
|
uart.setCallBack(cb1, uart.SIGNAL_RX)
|
|
|
|
while True:
|
|
pass
|