kopia lustrzana https://github.com/micropython/micropython
tests: Add simple CAN test.
rodzic
3550de4ebe
commit
e535a61983
|
@ -0,0 +1,9 @@
|
|||
from pyb import CAN
|
||||
|
||||
can = CAN(1)
|
||||
print(can)
|
||||
can.init(CAN.LOOPBACK)
|
||||
print(can.any(0))
|
||||
can.send('abcd', 123)
|
||||
print(can.any(0))
|
||||
print(can.recv(0))
|
|
@ -0,0 +1,4 @@
|
|||
CAN(1)
|
||||
False
|
||||
True
|
||||
(123, 0, 0, b'abcd')
|
Ładowanie…
Reference in New Issue