This project is part of the Teensy LC Challenge
Project 001: Blinking LED
The environment setup section is common to all the Teensy LC projects, so I created a single post with the required instructions to set up the Arduino IDE, Teensy Loader application, Teensyduino and Linux udev rules.
First Usage: Blinky Program
This section is also repeated in the setup guide since it’s basically the first project introduced in this quest. You can skip it if you followed the setup guide above.
This article is based on the fact that it’s the first time you set up the Teensy LC with your software environment.
Start by plugging the Teensy LC board into our machine via the USB cable. You will notice that the LED on board will start blinking because the Teensy LC already comes pre-loaded with a blinking LED program.
Next, start Arduino Software IDE and choose “Teensy LC” from this menu as shown below:
"Tools" > "Board"
You might also need to choose the Teensy port from
"Tools" > "Port" menu as well, depending on your setup.
Next let’s load a simple Example Sketch from this menu:
"File" > "Examples" > "02.Digital" > "BlinkWithoutDelay"
In my case, I got the following error
Error compiling for board Teensy LC.
Immediately, the Teensy Loader 1.47 window pops up, prompting us to press the button on Teensy LC to enter the HalfKay Bootloader Mode, you can read more on that here.
After I push the button on the Teensy LC, the Teensy Loader window changed to the following state.
Now, I could compile the sketch for the
BlinkWithoutDelay on the Arduino IDE without errors. Notice the comments about the LED pin definitions for the different Teensy boards, I tried to change it to pin 11 as shown in the screenshots below, however, Teensy LC had its LED on pin 13 just as the default Arduino LED pin so I reverted back to pin 13.
The valid line for Teensy LC should be:
const int ledPin = 13; // the number of the LED pin
Now, click on “Upload” and the sketch should be flashed onto the Teensy LC.
You will see the Teensy Loader window changes to this view and it updates the program details at the bottom to
Now we are good and all setup for using the Teensy LC using the Arduino Software IDE. Your Teensy LC should be flashing its LED at the moment.
Good job! 😄
As always feel free to comment, suggest or ask anything below.