I write the codes below in main.py. But there is no data out,when i mesure PB9.How can I do?
from pyb import CAN
can = CAN(1,CAN.NORMAL)
can.setfilter(0, CAN.LIST16, 0, (123, 124, 125, 126)) # set a filter to receive messages with id=123, 124, 125 and 126
while True:
can.send('message!', 123) # send a message with id 123
pyb.delay(1000)
How can I use CAN?
Re: How can I use CAN?
Damy2005, do you have the CAN wires connected to another CAN device? Something on the bus must reply with an 'ACK', so you need to connect something CAN to it.