1.11 Teensy and PIO Setups - mcgill-robotics/auv-embedded-2026 GitHub Wiki
How to Connect to a Teensy (Teensy Status, UDev Rules, PlatformIO)
Checking for Teensy Status
- Check for dead Teensy by short testing 3V and GND - they should not be shorted.
- For USB-connection, check the two pads on the back, next to the 5V - they should NOT be cut. See image below
- For external power connection, the two pads SHOULD BE CUT.
Setup PlatformIO
- In VSCode > Extensions search for PlatformIO IDE and install. It is an orange alien icon.
- Click on the PlatformIO icon on the left sidebar to open the workspace. Click 'Open Project' and select the folder in which the
platformio.inifile exists (auv-embedded_2026/pio_workspace) - At the bottom of your VSB, the text bar under the terminal/output window, select the environment you want to be working in, ie.
env:power (pio_workspace).
- Check the additional requirements for your OS here.
Running Code with PlatformIO
- Plug the Teensy into the laptop and open the PIO Workspace (left sidebar, PIO Icon).
- Under Project Tasks > teensy40 > General > Clean to wipe the Teensy of prior artifacts.
- Hit Build to compile the code.
- Hit Upload and Monitor to upload the code to the Teensy.
Troubleshooting for UDev Rules
DESTINATION LOCATION DOES NOT EXIST
If you have an error copying, you may not have the folders it needs on your computer: /etc/udev/rules.d/ or /lib/udev/rules.d/. Use the following code to create the folder for you:
sudo mkdir -p /etc/udev/rules.d
Then follow the instructions from the file: sudo cp 00-teensy.rules /etc/udev/rules.d/00-teensy.rules
CANNOT GET THE .rules FILE
If you have trouble downloading the .rules file, you can just create a blank .rules file through terminal:
code 00-teensy.rules
Paste and save the text from the website to this file.