Why I put a Teensy in Every Project

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
The Teensy is my favorite microcontroller  and I use them in almost every project. So what is a Teensy? Is it a  super small Arduino? Well... [Simultaneously] Yes it is. No it's not. If you've watched Voidstar Lab before,  you know I use them in a LOT of projects. [Audio snippets] Teensy! Another Teensy...  A Teensy... Teensy? The Teensy. That Teensy! This video isn't sponsored by Teensy  or anyone. I just... really like Teensies.   [faint crying in background]  And it's not only because I salvaged 20 of them  when my past client threw out an entire run of   prototypes that I painstakingly hand-built and I  ripped them out in between bouts of sobbing. [Dramatic, resounding thuds] They're just great parts.  They have fast processors,   tons of interfaces, a fair price, a  diminutive size, and are compatible   with Arduino and most of its libraries.  So is a Teensy an Arduino? Well... kinda. You see, there are plenty of third-party  boards that are actually an Arduino   schematic but have a different shape or  a bunch of integrated sensors or drivers.   For instance, the Fio is an Arduino Micro  with a battery and a wireless socket.   The MaKey MaKey is an Arduino Leonardo going  through a man-child phase, and the WTFduino is   a banana-shaped middle finger right the face of  electrical engineering, but beneath the trolling,   it's just an Arduino Uno shaped like  a banana. You can plug all these into   your computer and they'll work with your  Arduino software right out of the box. The Teensy is not like these boards. The other  boards are like unexpected guests to your house   party who look out of place, but once you  get talking, you find that they fit right in. The Teensy is a weirdo who builds a shed in your  backyard, pops open a beer, and says that because   he's drinking indoors on your property, he's  technically part of your house party. You see,   the Teensy uses a completely different chip  and architecture as any Arduino-brand Arduino,   but through a filthy - but easy - hack, you  can interact and program with it as if it WERE   an Arduino. The Teensies we care about - not you,  Teensies 1.0 and 2.0 [fart noise] use cortex-based   Freescale processors and a proprietary USB  bootloader. Most Arduinos use AVR chips and a   serial bootloader. In other words, the Arduino  IDE can't compile code to run on the Teensy   and it can't interface with the Teensy to upload  it. That is, until Teensyduino shows it de wae. Teensyduino is the secret blend of herbs  and spices that makes this module so zesty. [Chef's kiss!] The simple installer modifies your Arduino  installation to hack Teensy support riiiiight   up in there. So now, in your tools menu,  above Adafruit's saccharine product names,   there's your selection of Teensy boards!  And holy cow, that is a LOT of options.   What does this mean, keyboard languages?  What the..? CPU speed? Optimization? OOH-WHAAAA?!! We'll stick a pin in it, because we're not even  out of the installer! Here's a list of libraries.   That's right, the installer also conveniently  pre-packages like 75 extremely useful libraries   right into your Arduino folder, which is  actually quite convenient even if you're   not using a Teensy. All of these libraries  are optimized and fully tested to run on   Teensies, [Faint angelic chorus] and many of them  were actually modified by Paul Stoffregen, the   main guy in the Teensy project, personally. Of  course, he also ported literally everything from   the Arduino standard libraries to his Teensy  boards, and added support for the Teensy's   special features, AND he commented all of it. What  a gentleman! Finally, the installer will show us   the how-to guide; it's only two steps, and one of  them is usually optional. Allow me to demonstrate. It all starts with a sketch. Not a special  sketch, but, like, you know, a regular one   for the Arduinos you already have. We just hit  'upload', maybe push the little button... wham,   bam I'm more machine than man, now it's running  75 times faster! Of course Windows needs drivers,   because when it comes to virtual COM ports,  no OS eats glue quite like Windows. Oh yeah,   this will break Arduino's code signing  because we're modifying the binary,   so MacOS, which considers users to be  The Three Stooges, will refuse to run it. [Larry the User] Ooh, I'm awful sorry! [Moe the Gatekeeper] So am  I! [Piano concussion noise] Instead, you just replace the  Arduino app with Teensyduino itself,   which is even more convenient because you  don't even need the wizard! Sad wizard. All right, we drilled into the warm, pulsating  brain of a living software program and implanted   some wetware. What do we get for it? Let's look  at the Teensy lineup. These are the Teensy boards   that I use most often; there's the Teensy 3.2  which is a bit outdated but still very usable.   All Teensies are 3V devices, but this one's pins  are 5V tolerant. It also has a hardware DAC,   so you can output smooth waveforms without  using PWM - this is really useful for audio. This is the Teensy 3.6, which has a stronger  processor, more pins, and a built-in SD card slot. Finally, we have the Teensy 4.0, which is an  absolute powerhouse that's stuffed with features.   That's the one we are going to look at today,  because it's the one I would recommend to   people who don't already have a drawer  overflowing with salvaged Teensy 3.2's. [Teensy impact noise. Not a small collision  noise, the noise of Teensies colliding] Now that I have a Teensy and no project in mind,  what would you like to see me build with this   thing? I will actually make the best idea and  make fun of the worst ones in a future episode!   So yeah. You got the stones, leave a comment. The first thing to notice is this is a  tiny doggo. It's just 35 by 18 millimeters,   which in American units, is reeeal [REDACTED]  small. Its length may be short, but it knows how   to use it - there are 24 I/O pins that you can  fit into a breadboard, and if you flip it over   you get 16 more. That's 40 I/O lines, compared  to the Arduino's [Lavalier-Arduino collision] 14. You know how the Arduino has six  analog pins? Teensy's got 14.   Six PWM pins? Have 27. This thing's  got three digital interrupt pins. You   know how many digital interrupt pins the  Teensy has? THEY'RE ALL INTERRUPT PINS. Finally, Arduinos have a serial port or two, SPI,  and one or two I2C interfaces. The Teensy 4.0 has   SEVEN hardware serial ports plus up  to three more over three more over   USB... [Cacophony of specs] ...three CAN buses,  USB host, SPDIF, and a partridge in a pear tree. We also get very flexible USB device  options, battery-backed real-time clock,   and a bunch of other onboard peripherals that  only two people who watch this video will   think to use in a project. You rule,  two people. I do this all for you. Oh yeah, the Teensy runs at 600 MEGAHERTZ!!!! So what does all this power,  engineering, and infrastructure cost you?   20 bucks. Costs you 20 bucks. The Teensy 4.0  is cheaper than an Arduino Uno, Nano, or Micro. Wait... what's that? The high-pitched shrieking  of self-important dweebs? Let's listen in! [Whiny bitch baby voices] It doesn't have  wiiireless! It's different, and that makes   me scaaared! Twenty dollars is too much!  I can get a shady Arduino clone imported   from a gray-market Shenzhen  sweatshop for two bucks fifty!   It's not really the smallest  board in the market! REEEEEE..... [Taking notes] Not the smallest... reeee...   got it. [Keyboard snaps shut] Those whiny bitches  actually make some good points. The Teensy is   tiny, but the Tinyduino is teensier. Boards based  off Arduinos and Adafruit products are definitely   easier for beginners to follow along. NRF52-based  boards use less power AND have wireless, and   $20 is nowhere near the disposably low price of  overseas garbage or an ESP8266. No overlap there. So why do I always use them? Well like an AK-47,  the Teensy might not be the best at anything,   but it's good everywhere. I can drop a Teensy into  almost any project and I know it'll perform well,   work with my circuits, and just be a pleasure  to code. Of course, no matter how boneheadedly   I design my models, there's probably  room to cram a Teensy somewhere in there. [Poor aim scratching sounds] [Power-up sound]  [Game voice] Red has gained control. Let's talk about that $20 price  point. Yes, you can buy very, very,   very cheap clones of popular dev boards. Allow me  to explain what you get for your Andrew Jackson.   Those rip-off boards are made with  the most trash-tier PCB's and parts   they can sweep off the factory floor.  The parts are often under specs, fake,   or just dead on arrival. The best deals will  ship from overseas, so they can take weeks to   arrive. All these things feed that horse that I  will never stop beating - delays kill projects. Okay then, so why don't I just  buy a knockoff Teensy? Well,   that's because the bootloader is proprietary and  PJRC locked it tighter than Mike Pence's butthole. [Crowd booing. BOOOOO!!!] Hey man, information wants to be  free, but developer wants to be paid.   If you want to implement a Teensy yourself,  like I did with this smartwatch - I should   really make an episode on this thing - you  can buy a bootstrapper chip directly from   PJRC that's pre-programmed with the bootloader  for, like, like seven bucks. I didn't mention   that - most Teensy boards put the bootloader  on a second microcontroller which lets you use   every single bit of program memory. Also,  uh, you can't overwrite the bootloader   and brick the chip, which is something  that totally happens, but never to me. So yeah, consider most of that 20  dollars a contribution to PJRC... [BOOOOO!!!!] No, not in that half-assed techno-utopian "support  the creators!" way. In a socially-acceptable   CAPITALIST way. See, Paul and the Teensysphere  are major contributors to Arduino itself,   and the work they do for Teensyduino seriously  improves mainstream Arduino. You ever plugged   in a new board and Arduino automatically  recognizes what serial port it's on? Well,   PJRC wrote that. You know how when you  have two conflicting libraries, Arduino   will use the last library it finds instead of the  compatible library and cause, like, a million bugs?   No you don't, because he fixed that. I want  to draw attention to all this stuff because   many of these contributions are just in the  unsexy low-level code that affects everyone   but are just too uncool, technically difficult,  or straight-up boring for most developers to fix.   The open-source community just needs more folks  like them, and if paying seven dollars for a   bootloader chip means contributing to that,  I have a hard time seeing that as a waste. OK, so you're sold. Or just, you know, pretend  you're sold. I'm a hardware-prototyping funny man,   not Vince the ShamWow guy. How does one  wield such power? Well, here are some ideas. My personal favorite use for the Teensy  is to make USB devices like keyboards,   mice, and MIDI instruments. You can use it to make  a joystick, a flight-sim cockpit, touchscreen,   microphone or speaker, or a combination of  those. All of these modes use standard drivers,   so the user probably has them installed already  and can use the Teensy-powered project right out   of the box. I like the Teensy 4.0 for machine  learning, as I showed in my video about gesture   recognition on a smart glove. It has enough memory  for a fairly plump TensorFlow neural network,   and its screaming-fast processor does  a pretty good job of running it, too.   Teensies are also your best choice for controlling  displays, and especially for strips of LED's.   Paul wrote extremely well-optimized  libraries for both. This makes the   Teensy a really good choice for Burning  Man-style LED and video installations,   like this persistence-of-vision sphere  I helped build at my old hackerspace. Those features and more are why my  favorite Arduino isn't an Arduino at all,   even though it kind of is, although it's not,  but it is. May your clock speeds be high and   your peripherals numerous, no matter how tight  your situation. Thank you so much for watching!   Hit Subscribe for more projects, presumably  all Teensy-based. Check the description   and my channel for more Teensy-licious  projects, and I will see YOU in the future.
Info
Channel: Zack Freedman
Views: 275,534
Rating: undefined out of 5
Keywords: arduino, teensy 3.2, teensy 3.6, teensy 4.0, teensy 4.1, electronics project, diy project, which arduino is best, which arduino has the most memory, best arduino projects, arduino uno, which arduino to buy, which arduino
Id: 75IvTqRwNsE
Channel Id: undefined
Length: 11min 12sec (672 seconds)
Published: Sat Nov 28 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.