How to use a fake Teensy in Arduino / Teensyduino on Linux  

I recently bought a fake/knock off teensy from china. They can be purchased from Dealextreme and others. Problem is, the device is more like a teensy 1.0 but reports as teensy 2.0 to the teensy loader application. So uploading stuff to the fake teensy from Teensyduino does not work.

Fortunately, there also is a teensy loader command line interface ( teensy_loader_cli) that does work with the fake teensy. So all one has to do, is to make Teensyduino use the cli loader instead of the graphical one.

Most of the following code is stolen from here.

First, cd into your arduino directory

Second, edit

and change


Third, create a file

with the following contents:
use Getopt::Std;
#print @ARGV;
my %args;
my $hexfile;
my $dfu = "/usr/local/bin/teensy_loader_cli";
my $cpu;
my $hexfile;

$hexfile =~ s/flash:w://;
$hexfile =~ s/:i//;

#print "\n[" . $hexfile . "]";
#print "\n[" . $cpu . "]\n";
#print "$dfu $cpu erase\n";
#system "$dfu $cpu erase";
print "$dfu -mmcu=at90usb162 $hexfile\n";
system "$dfu -v -mmcu=at90usb162 $hexfile\n";
#system"$dfu $cpu flash $hexfile";
#print "$dfu $cpu start\n";
#system "$dfu $cpu start 1>&2";
#print "\n";

Sorry ... didn't care to pretty up the script. Don't forget to make it executable.

Finally, copy the teensy_loader_cli application to

That's it ... now you can program your fake teensy from Teensyduino.
The only problem is, that the device does not perform a reset after programming and one hast to do it manually, e.g. cut the power.

[ add comment ] ( 11 views ) permalink print article ( 0 / 0 )
[ 304 comments ] ( 24635 views ) permalink print article ( 3.3 / 222 )

| 1 |