返回教程正文

配套源码

sketch.ino

app/sketch/sketch.ino
zdt_motor Brick:用 Python 控制一台 ZDT 电机app/sketch/sketch.ino
Arduino20 行
#include <Arduino_RouterBridge.h>

/*
 * @description         : 初始化RouterBridge并让系统CANnectivity向Linux提供FDCAN1
 * @param               : 无
 * @return              : 无
 */
void setup() {
  const bool bridgeReady = Bridge.begin();
  (void)bridgeReady;
}

/*
 * @description         : 保持MCU任务调度运行且不占用FDCAN1
 * @param               : 无
 * @return              : 无
 */
void loop() {
  delay(10);
}