Setup PlatformIO with micro ros arduino (for teensy 4.1) - kajmoerk/Brick_Feeder GitHub Wiki

1. First install visual code

2. Then install the platformIO extension

NOTE: You probably need to restart VS Code after installation.

3. Create a new project, choose your Teensy 4.1 board and the Arduino Framework.

4. Then navigate to the platformIO platform manager and check if the Teensy platform is installed.

PlatformIO should now autogenerate the new project for you.

5. Navigate to the platformio.ini file in your newly generated project and replace the existing configurations with the following:

[env:teensy41]
platform = teensy
board = teensy41
framework = arduino

lib_deps =
    https://github.com/micro-ROS/micro_ros_arduino

build_flags =
    -L ./.pio/libdeps/teensy41/micro_ros_arduino/src/imxrt1062/fpv5-d16-hard/
    -l libmicroros
    
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
export ROS_DOMAIN=0
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:galactic serial --dev /dev/ttyACM0 -v6