skip navigational linksPJRC
Shopping Cart Checkout Shipping Cost Download Website
Home MP3 Player 8051 Tools All Projects PJRC Store Site Map
You are here: Teensy How-To Tips Other Languages

PJRC Store
Teensy 3.1, $19.80
Teensy 2.0, $16.00
Teensy++ 2.0, $24.00
USB Cable, $4.00
Teensy
Main Page
Teensy 3.1
Getting Started
How-To Tips
Code Library
Projects
Teensyduino
Reference

Using Other Languages

Most projects use Arduino with Teensyduino extensions, or C language to program Teensy. However, a number of other options are available.

PJRC has not tested these programs. Most of the information on this page is contributed by users. Please contact paul@pjrc.com with any additions or corrections which should apply to this page.

BASCOM-AVR

BASCOM is a fully featured BASIC language environment, by MSC Electronics. The software reasonably priced, but only runs on Windows. Use the following definition files:
  • Teensy++: usb1287.dat
  • Teensy: m32U4def.dat
Here is a simple Bascom code to let the LED of the Teensy++ blink. With replacing the def at the top the same code can used for the Teensy too.

$regfile = "m32U4def.dat"
$crystal = 16000000

Led1 Alias Portd.6
Config Led1 = Output

Config Clockdiv = 1

Do
   Toggle Led1
   Waitms 100
Loop

End

Thanks to Daniel Schemann for testing BASCOM and providing these instructions.

BASCOM: Using Teensy Loader

  1. Compile the Program by pressing F7
  2. Open the Loader Application and prepare like normal
  3. Open the Bascom generated HEX file and upload it to the Teensy
  4. Now you can switch into AUTO mode

If you now press Compile (F7) in Bascom the HEX file will automatically uploaded to the Teensy

BASCOM: Using Command Line Loader

First you need to download the command line application. Next setup the programmer in Bascom, as shown:

Depending on the Teensy you use you need to verify that the right -mmcu option is set in parameters

LabVIEW

This modified Arduino code allows Teensy to work with LabVIEW's Arduino library.

Special thanks to Nicholas Ross for testing and providing these LabVIEW images:

      

Python

The Python-on-a-chip project supports Teensy++, including multiple stackless threads.

Txtzyme

Txtzyme is a minimal and extensible interpreter for Teensy written and open-sourced by Ward Cunningham. Typically a stream of very short Txtzyme programs are read over USB, executed and then discarded as more are on the way.

Ward has shared dozens of sample applications that run by generating Txtzyme programs. You'll find samples using the command line, shell scripts, CGI scripts, JSON and jQuery. Each example hooks Perl, Ruby, Java and JavaScript up to Txtzyme over Teensy's USB bus.

This picture shows a jQuery client talking JSONP to a Sinatra (Ruby) server talking Txtzyme to Teensy turn on Teensy's LED.

Bitlash

Bitlash is Bill Roy's Arduino-like shell and intepreter.

Max/MSP

Maxuino supports Teensy running StandardFirmata. Just program Teensy with Arduino using File > Examples > Firmata > StandardFirmata, or use a pre-built HEX file.

Puredata

The Pduino object provides Firmata-based access, similar to Maxuino on Max/MSP. However, several Pd users have indicated a preference to program Teensy as a USB MIDI device and access Arduino-based code using MIDI messages.

Funnel

TO BE DETERMINED.

Waiting for feedback from Shigeru Kobayashi.

AttoBASIC

AttoBASIC is a minimal BASIC intepreter and shell. Teensy should be programmed with "ATTOBASICV211_M32u4-16MHZ-usb_nobtldr.hex".