mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
6c1d9ebc81
Signed-off-by: 李昂 <liang6516@outlook.com>
16 lines
221 B
Python
16 lines
221 B
Python
import PikaStdDevice as std
|
|
print('hello pikascript')
|
|
|
|
io = std.GPIO()
|
|
io.setPin('P4')
|
|
io.setMode('in')
|
|
io.enable()
|
|
|
|
def cb1(signal):
|
|
print('cb1', signal)
|
|
|
|
io.setCallBack(cb1, io.SIGNAL_FALLING)
|
|
|
|
while True:
|
|
pass
|