Teensy 4.1 — Integrated CAN2 logger, I2C radio forwarder, and RTD signal
Functions:
- Receives CAN2 frames and forwards them over I2C (Wire2) to radio module
- Logs all received CAN frames to SD card in CRTD format
- On button press: sends Ready-To-Drive CAN signal (5x) and sounds buzzer for exactly 3 seconds
CAN library : ACAN_T4 (https://github.com/pierremolinaro/acan-t4) I2C bus : Wire2 I2C slave : ESP32 radio board at address 0x08
Wire format sent over I2C (per CAN frame): Byte 0 : frame flags bit0=ext, bit1=rtr Bytes 1-4 : CAN ID (big-endian uint32) Byte 5 : DLC (0-8) Bytes 6-13 : data (DLC bytes valid, rest 0xFF) Bytes 14-17 : timestamp in milliseconds (big-endian uint32) Total : 18 bytes per frame
CRTD line format: <timestamp_s.us> R11/R29 <CAN_ID> Example: 1.020305 2R11 213 00 00 00 C0 01 00 00
Pin assignments: Button : PIN_BUTTON (active LOW, internal pull-up) Buzzer : PIN_BUZZER (active HIGH)