This project is part of the Teensy LC Challenge

Teensy Project 001: Blinking LED

Checkout the source code on Github.

Teensy LC blinky

Teensy Setup

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.

Go to the complete setup guide


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:

1
"Tools" > "Board"

Arduino Software IDE

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:

1
"File" > "Examples" > "02.Digital" > "BlinkWithoutDelay"

Arduino Software IDE Sketch Example

Now click on the verify button: Arduino Software IDE Verify

In my case, I got the following error

1
Error compiling for board Teensy LC.

Arduino Software IDE Verify Check

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.

Teensy Loader 1.47

After I push the button on the Teensy LC, the Teensy Loader window changed to the following state.

Teensy Loader 1.47 OK

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:

1
2

const int ledPin =  13;      // the number of the LED pin

Arduino Software IDE Verify Check

Now, click on “Upload” and the sketch should be flashed onto the Teensy LC.

Arduino Software IDE Verify Check

You will see the Teensy Loader window changes to this view and it updates the program details at the bottom to BlinkWithoutDelay.ino.hex

Teensy Loader 1.47 Program

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.