Add ESP32S2 pins in comments
This commit is contained in:
parent
93ff153cb2
commit
aa8d416029
4 changed files with 12 additions and 0 deletions
|
|
@ -14,7 +14,10 @@ if hasattr(board, 'BOOST_ENABLE'):
|
|||
boost_enable = digitalio.DigitalInOut(board.BOOST_ENABLE)
|
||||
boost_enable.switch_to_output(True)
|
||||
|
||||
# Use this line if your board has dedicated CAN pins. (Feather M4 CAN and Feather STM32F405)
|
||||
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)
|
||||
# On ESP32S2 most pins can be used for CAN. Uncomment the following line to use IO5 and IO6
|
||||
#can = canio.CAN(rx=board.IO6, tx=board.IO5, baudrate=250_000, auto_restart=True)
|
||||
listener = can.listen(matches=[canio.Match(0x408)], timeout=.9)
|
||||
|
||||
old_bus_state = None
|
||||
|
|
|
|||
|
|
@ -14,7 +14,10 @@ if hasattr(board, 'BOOST_ENABLE'):
|
|||
boost_enable = digitalio.DigitalInOut(board.BOOST_ENABLE)
|
||||
boost_enable.switch_to_output(True)
|
||||
|
||||
# Use this line if your board has dedicated CAN pins. (Feather M4 CAN and Feather STM32F405)
|
||||
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)
|
||||
# On ESP32S2 most pins can be used for CAN. Uncomment the following line to use IO5 and IO6
|
||||
#can = canio.CAN(rx=board.IO6, tx=board.IO5, baudrate=250_000, auto_restart=True)
|
||||
listener = can.listen(matches=[canio.Match(0x408)], timeout=.9)
|
||||
|
||||
old_bus_state = None
|
||||
|
|
|
|||
|
|
@ -15,7 +15,10 @@ if hasattr(board, 'BOOST_ENABLE'):
|
|||
boost_enable = digitalio.DigitalInOut(board.BOOST_ENABLE)
|
||||
boost_enable.switch_to_output(True)
|
||||
|
||||
# Use this line if your board has dedicated CAN pins. (Feather M4 CAN and Feather STM32F405)
|
||||
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)
|
||||
# On ESP32S2 most pins can be used for CAN. Uncomment the following line to use IO5 and IO6
|
||||
#can = canio.CAN(rx=board.IO6, tx=board.IO5, baudrate=250_000, auto_restart=True)
|
||||
listener = can.listen(matches=[canio.Match(0x409)], timeout=.1)
|
||||
|
||||
old_bus_state = None
|
||||
|
|
|
|||
|
|
@ -15,7 +15,10 @@ if hasattr(board, 'BOOST_ENABLE'):
|
|||
boost_enable = digitalio.DigitalInOut(board.BOOST_ENABLE)
|
||||
boost_enable.switch_to_output(True)
|
||||
|
||||
# Use this line if your board has dedicated CAN pins. (Feather M4 CAN and Feather STM32F405)
|
||||
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)
|
||||
# On ESP32S2 most pins can be used for CAN. Uncomment the following line to use IO5 and IO6
|
||||
#can = canio.CAN(rx=board.IO6, tx=board.IO5, baudrate=250_000, auto_restart=True)
|
||||
|
||||
old_bus_state = None
|
||||
count = 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue