Bought a Teensy 3.1, how do I learn to use it?

Status
Not open for further replies.
well, I guess the best way to learn is to do. Did you buy the Teensy with something specific in mind? If so, breaking that down into small chunks that require learning processes to fulfil the final goal would be a good way to go about it. So, get your programming environment set up first like it explains in the page at the link (install arduino IDE and then teensyduino), and test it out by running the simplest pre-made sketch, the blink one.
 
In addition, please tell us a little bit about your background. Are you a beginner at programming? Have you worked with electronics ever before? Did you study something technical in school? Are you artistically inclined? How do you feel about spending money to save time? I see from your other posts that you're interesting in generating HDMI output and music synthesis.

To answer your question, I learned a little bit of Arduino on a Freeduino board before I bought my first Teensy 3.0. I learned some basic soldering and how to copy simple circuits to blink LEDs, sense the ambient light level with a photoresistor, control a small DC motor with an H-bridge chip and debug by printing things to the Arduino serial monitor. All of that stuff translates over to the Teensy without trouble.

Once I got the Teensy, I quickly discovered that having a separate USB-to-Serial FTDI board was relatively expensive and inconvenient compared to having a Teensy that had the functionality of the FTDI chip built-in and of course so much more.

I decided to take the cheap route because I figured I'd learn what I needed to spend money on first hand. Two quick bits of advice: (1) A temperature controlled soldering iron makes a huge difference in soldering small things well; and (2) if you don't have the right wire cutter and reasonable wire for DIY, you'll waste a ton of time learning how not to work with wires.

Cheap goes with simple, so I explored the touchRead() function of the Teensy for input. This is amazing. You can simply touch the circuit board on one of the pins and your program can measure how much of your finger is touching (or even very near) the pin. From this you can make input buttons. I stuffed a Teensy into an Altoids Smalls container. I used a couple of chrome buttons wired to the Teensy to make a gadget that I could enter Morse code on. It is equally easy to wire up an earphone jack and generate beeps. So, with these two things, I had a basic human interface based on touch and audio.

I also played with interfacing to wireless routers, GPS, solid state relays, cheap displays, photodiodes (much faster than photoresistors!). I tend to just think about the basic ingredients I might need to automate something and work on the pieces. I finished and documented one project: http://pictographer.com/didah. Didah is a device to transmit the power state of a Ham radio repeater.

Lately, I'm rewriting my Morse code software to use interrupts rather than delays. It's harder to program with interrupts and I need the practice. This will free up more processing power, allow me to implement something like type-ahead for Morse code and allow me to take advantage of Duff's wonderful library for accessing all the low power modes of the Teensy board. Eventually, I'll probably publish a password vault in a Teensy.
 
Last edited:
Using a Teensy is very much like using any Arduino, but better in various ways, so if you don't find the tutorial information you're looking for here, you can also look at Arduino tutorials. In most cases, Arduino libraries can be ported. If the library doesn't reference AVR registers directly the port is likely to be pretty easy with occasional gotchas one gets moving to much faster hardware. If the library does use hardware registers of the AVR processors, then it takes a bit of expertise mostly to undo the low level stuff that doesn't make sense for a Teensy 3.

If I were you I might just go ahead and breadboard a circuit with a Teensy 3.1, YM2612, level shifter (?), powered speakers and whatever discrete components are needed to start experimenting with making the Teensy talk to the synth chip.

To take it step-by-step, you might want to work through tutorials about generating sound from a Teensy or Arduino with a speaker, a capacitor and a resistor.

I wonder how much of the functionality of the YM2612 could be implemented on a Teensy with the Audio shield? It might be easier to get started this way because the web front end for designing audio processing is pretty slick and the interface between the Teensy and the audio shield is already worked out. And there are some fantastic people here pushing the audio shield forward.
 
OP said
Absolute beginner, where did you learn how to use Teensy?
Never used Arduino before either.

Much of what's said above is likely too much jargon and advanced.
A "Maker" class for Adults and Arduino would be good. Some YouTube videos on microprocessors/arduinos?
Some lightweight texts?

The suggestion "learn by doing" is good, but first, some basic foundation and orientation is needed.
 
thanks,

I've got most of the needed components, breadboard, wires, resistors, caps, rotary encoder, output plug. i think i want to use midi to play some cycles on the chip.
 
Think about your current interests and hobbies, and what you might be able to do to "improve" them with a microcontroller. Keep it simple, for sure. You will find your first project is way more complicated than you expect, because everything takes ages the first time.

Barring finding a perfect idea on your own, check out the "Arduino Cookbook" which is an expertly written arduino guide I got into arduino two years ago reading that. It's very project-orientated, which was perfect for me to learn and understand things.
 
When I started learning Arduino programming (which is basically a derivative of C++), I watched Jeremy Blum's tutorials https://www.youtube.com/watch?v=fCxzA9_kg6s They're very straight forward and easy to understand.
You may want to describe your programming background (if any) so users can point you in the right direction. But I think these tuts are a good starting point.
Even though some basic projects only require you to hook up a couple wires and load the code, it'll be much better if you understand what/why the program is doing.
 
When I started learning Arduino programming (which is basically a derivative of C++.

Funny enough, I started studying C++ for that reason, then a Arduino expert told me that Arduino is actually C. So that is a little confusing.
 
Arduino certainly is C++, but without certain features like rrti and exceptions. However, many C++ features are seldom used, so studying C++ might be the long road to take if you only wish to use Arduino.
 
Yeah, the 'arduino language' (whatever that means) is C++, since the Arduino compiles and executes most C++ stuff.

Now the basic syntax and constructs in C and C++ are the same. Variable, for loops, if and else and all that.

Arduino then adds a number of C++ objects and classes, they are coded using the C++ deep magic, but for the users they can be used as things that can be told to do things like:

Serial.print("Hello") /* Tell serial to print "Hello" */

This is easy to use, its only part of the full C++ but its not C.

So I would say, for users, Arduino code is C with a bit of C++ objects thrown in.

Do I then need to learn C++ ?? .. well not the deep and arcane stuff, and the baiscs of C++ is the basics of C so C is a MUST.
 
Need help getting started

Can't seem to get past "go"
I am a retired engineer electrical engineer with essentially no programming experience. I did a little machine level programming in the early '70s and a very little assembler also. So, by any estimation my level of "expertise" is abysmal to say the least. And, yeah, i 'm old as dirt (75 yrs)
I bought Teensy to accomplish one laughably simple task i.e., control some solenoid valves on a flexible schedule dictated by several sensors.
I would like to use Dave Hylands port of Micropython rather than C++ simply because it seems less like Hyroglyphics, but i will take on C++ if necessary - it can't be that hard to control a couple of IO ports.
My problem is that I cannot get my machine to see the Teensy. The LED blinks when i plug it in, so the board is probably functional. I know that the USB cable is good; it works with my camera. I have arduino loaded but Teensy does not show on the list of boards.
I am runningUbuntu 14.04.1
For whar it's worth, I'm not anti Microsoft freak, I just got tired of dealing with them and buying a new copy of the operating system every two years; Registration, Validation, viruses, etc. Haven't used in ten years, or so.

I am sure there are a host of whiz bang programmers out there that could get me over this huge learning curve hump with a few lines of basic instructions - and it will have to be basic.

Any help will be greatly appreciated.
 
Teensy in Linux (Ubuntu) is quirky. Not an easy path for a beginner, versus MS Windows 7, 10 or perhaps a Mac.
 
If you don't know C programming, learn it on Ubuntu. Not GUI programs.

Then find someone on this forum that is a Linux user and they can help you.

Linux is 3rd tier with Teensy's tools as you can read here. It's because of the low population of users.

And at large, Linux has but 1.3% of the desktops. So it's always the hard road.

I'm not anti-Linux. Just seeking a path where I focus on the app, not the tools.
I use Mint now and then. And I used to work with Linux predecessors every day in my job.
 
If you don't know C programming, learn it on Ubuntu. Not GUI programs.

Then find someone on this forum that is a Linux user and they can help you.

Linux is 3rd tier with Teensy's tools as you can read here. It's because of the low population of users.

And at large, Linux has but 1.3% of the desktops. So it's always the hard road.

I'm not anti-Linux. Just seeking a path where I focus on the app, not the tools.
I use Mint now and then. And I used to work with Linux predecessors every day in my job.
------------------------
Thanks for your reply. I was hoping my OP would attract some Linux users.
Can you suggest how i may be more successful in attracting Linux users?
 
Post a new thread titled something like "Newbie needs help getting Teensy 3 tool chain running with Linux".
Your OP didn't mention Linux.

Learn C on a big computer, not a microprocessor.
 
Being a long time Linux (Puppy Linux from 2004), Linux has tools for all computer applications. However, there is a learning curve like every thing else in the world (e.g. cars, dealing with people, etc.). The Arduino IDE is java based and is fairly easy to install with the correct package for the Linux being used. There should be an installation package for Ubuntu. Please check the Arduino web site, I think there is a package for Ubuntu for the IDE there. Linux and Arduino are developed in the same way, by a dedicated group of unpaid volunteer developers with community support for testing and suggestions.

There are two excellent books that helped me to learn about Arduino processors and programming for it. They are both by Simon Monk and are fairly reasonable for cost. The first is "Programming Arduino Getting Started with Sketches". The second is "Programming Arduino Next Steps Going Futher with Sketches". Start with a the first book and read through it. It gives the basics. The second has more details and advance topics, but, I use it as a standard reference. The example programs in the book with some other stuff are available on the web at:https://github.com/simonmonk?tab=repositories.

There is also a simple reference on the web called arduino_notebook_v1-1.pdf. It is a good desk reference for syntax and command descriptions. The best web source is the Arduino web site and searching it. It has a specialized Google search for it.

Rather than jumping in the "deep end of the pool" with your project, I would suggest getting one of the Arduino starter kits and using it to learn the basics. The cost of the books and a starter kit should be around a hundred dollars.

One problem, as a new user that I encountered, is library differences between teensy and arduino. Sometimes a program calls a library that works with the arduino processor line, when used with teensy, complies with errors and warnings. You have to keep in mind that teensy is not using the same processor as Arduino. But, I have found a fix for the issues by either searching the web or asking on the forum. In general, the teensy community is kind to new users, but, you need to provide enough information to get a proper answer. People can not help with only the statement "it does not work".

I hope the above is a help.

Enjoy life, Greg
Live Well, Laugh Often, Love Much
 
Being a long time Linux (Puppy Linux from 2004), Linux has tools for all computer applications. However, there is a learning curve like every thing else in the world (e.g. cars, dealing with people, etc.). The Arduino IDE is java based and is fairly easy to install with the correct package for the Linux being used. There should be an installation package for Ubuntu. Please check the Arduino web site, I think there is a package for Ubuntu for the IDE there. Linux and Arduino are developed in the same way, by a dedicated group of unpaid volunteer developers with community support for testing and suggestions.

There are two excellent books that helped me to learn about Arduino processors and programming for it. They are both by Simon Monk and are fairly reasonable for cost. The first is "Programming Arduino Getting Started with Sketches". The second is "Programming Arduino Next Steps Going Futher with Sketches". Start with a the first book and read through it. It gives the basics. The second has more details and advance topics, but, I use it as a standard reference. The example programs in the book with some other stuff are available on the web at:https://github.com/simonmonk?tab=repositories.

There is also a simple reference on the web called arduino_notebook_v1-1.pdf. It is a good desk reference for syntax and command descriptions. The best web source is the Arduino web site and searching it. It has a specialized Google search for it.

Rather than jumping in the "deep end of the pool" with your project, I would suggest getting one of the Arduino starter kits and using it to learn the basics. The cost of the books and a starter kit should be around a hundred dollars.

One problem, as a new user that I encountered, is library differences between teensy and arduino. Sometimes a program calls a library that works with the arduino processor line, when used with teensy, complies with errors and warnings. You have to keep in mind that teensy is not using the same processor as Arduino. But, I have found a fix for the issues by either searching the web or asking on the forum. In general, the teensy community is kind to new users, but, you need to provide enough information to get a proper answer. People can not help with only the statement "it does not work".

I hope the above is a help.

Enjoy life, Greg
Live Well, Laugh Often, Love Much

--------------------
Thanks for the reply.
While I am a longtime Linux user, so while can by no means claim to be an expert, i know my way around pretty well i.e., can handle CLI, etc.
My intention here is not to become a programmer in any sense of the word. I am pretty sure I can come up with some kind of program to suit my purpose - my goals are really that simple.
Heck, even some of the tutorials would prety much be a cut and paste for my requirements.
I have the Arduino IDE loaded; my problem is that I cannot figure out how to get my machine to "see" the teensy board. It is not included in the list of boards in the Arduino tools board list

I would post a new thread with more specific information, if i could figure out how to post a new thread
 
Last edited:
I would post a new thread with more specific information, if i could figure out how to post a new thread

To do so, back out of reading a thread like this.
Then at the top of the page click the Post New Thread button

If you can use Windows to start with, you'll be able to spend your time learning Teensy, Teensyduinog, and the Teensy add-ons to Arduino's IDE.
Later you can return to trying to get the Linux variant installed and working. It's a struggle you can procrastinate.
 
Sadly, I do not have a windows option.
I do appreciate your continuing efforts. I posted a new thread.
 
Dont want to make Windows vs. Linux wars, but the notion that Windows is simple and just works, and Linux is hard and full of problems is simply untrue.

The installation process for Linux is a bit more 'linux'y sure, but I would say thats what Linux users are used to.

Then the issue, my new Teensy is not recognized by my Teensyduino setup on my OS. This is a real problem, but we have heard it from quite a number of new users lately, many of them using Windows.

On Windows, drivers must be installed, on Linux udev rules must be setup to allow device access from non root accounts. Its the same principle, that normal accounts are not allowed to access the USB devices unless (win) drivers are installed or (linux) udev rules are configured. Its a PITA but part of the work to make systems secure.

Disclosure: I run Teensyduino mostly from Mac OSX or from Linux (Fedora)
 
Thanks mlu I agre with you vis a vis linux wars. I am going to soldier along for a while.
I have now got the system to see teensy. If i remember correctly 16c0:0486 is the teensy id

wray@Huey:~$ lsusb
Bus 002 Device 004: ID 0a48:4001 I/O Interconnect
Bus 002 Device 002: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 16c0:0486 Van Ooijen Technische Informatica Teensyduino RawHID
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 
Teensy does not create a virtual COM port, nor any other USB connection, unless there's an active download of a .hex (and that uses HID not virtual serial), or if the Teensy is running a program that use the USB.
This is unlike an AVR based Arduino thing.
 
Status
Not open for further replies.
Back
Top