I've used both extensively as "daughterboards" to big control circuits. The main advantage of the Teensy to me is that the hardware is better than Arduino was at the time. It is also, well, Teensy compared to most Arduinos so it takes up less real estate.
Now that Arduino is running an ESP32 or ARM chip or has FPGA acceleration and such I'd say the difference is mostly just size. I do think some of the core libraries for the Teensy are better written though, the Arduino authors don't seem to focus as much as Paul does on optimizations. Paul also frequently posts in the forums to respond to questions, which is unusual in my experience.
Edit: In response to the Raspberry Pi, it's just a totally different beast. The Teensy is probably not well suited to run much of an OS (nor is the Arduino). Both are better suited to things that require more pins available; embedded controllers rather than computer substitutes.
> Now that Arduino is running an ESP32 or ARM chip or has FPGA acceleration
I recently used a Teensy for exactly the reasons you gave, but I'm not familiar with Arduino's with ARM or FPGA. That sounds very interesting, do you have some links where we can learn more?
Arduino has had ARM-based boards for years, starting with the Arduino Due in 2012; most of their newer boards use ATSAMD MCUs rather than the AVR8 parts they started out with. There's also a pretty active community supporting STM32 ARM hardware at https://www.stm32duino.com/.
The "FPGA acceleration", on the other hand, is pretty limited. Arduino has one board -- the MKR Vidor 4000 [1] -- with an onboard FPGA. The FPGA can be configured with one of a couple prepackaged bitstreams to add I/Os or perform some specific video processing tasks; it does not accelerate processing on the Arduino MCU. The documentation for the board is minimal, and support for generating your own bitstreams is basically nonexistent. The whole thing has a half-baked feel to it; I'd avoid it.
Thanks for the link to the Vidor, unfortunate it wasn't more functional. It'll happen someday and when it does I'll be very excited, I know that there are already hybrid FPGA/microcontroller chips as an alternative to putting a softcore microcontroller on the FPGA itself (and wasting a lot more space and speed than needed).
I await the day when I can be like "nah, pin 2 will be a 16-bit 10MHz PWM output controlled by this register and pin 7 will be a frequency counter" and then access that with code on the microcontroller as if it was a built in peripheral.
I'm kind of skeptical I'll ever really get into FPGAs otherwise, my use case for them is always so simple, at the level of... well... PWM outputs and PID loops. But a microcontroller is fast enough for most PID loops so really to me the advantage is customizable function-pin mappings. I can't imagine trying to implement something like an ethernet stack on an FPGA though, although I guess you can run DOOM on one so maybe there will be a compiler from C++ to FPGA somehow that's not comically bad. ;-)
> I await the day when I can be like "nah, pin 2 will be a 16-bit 10MHz PWM output controlled by this register and pin 7 will be a frequency counter" and then access that with code on the microcontroller as if it was a built in peripheral.
Are you familiar with the Cypress PSoC line? They have that.
I do remember them coming out, I believe at the time ARM was unfamiliar to me so that half was too much to learn simultaneously and I was worried about being unable to meaningfully use it. They look more interesting now, thanks for the reminder.
There was the papilio duo too which had the Spartan 6 LX9 FPGA with an ATmega32U4 on the bottom. Not sure if they are for sale anymore though. I backed the kickstarter (and work with a company which made some of the wings for them) but I never really got into using them. I still have mine around and plan on using it for some project in the future though.
I hate to just direct you to arduino.cc, but there's so many boards I can't really answer this in a more reasonable way.
The Arduino Due has been around for probably seven years and runs on ARM. There are many other versions now that are all ARM. The FPGA coprocessor one... hmm, I don't see it so maybe I just read it in the news or got confused by the Portenta that is supposed to be released about now.
The ESP32 one... I thought Arduino was moving to that for the RF capabilities but might be wrong, I can't find one for that either anymore. I know for sure you can get a ESP32 dev board and program it with the Arduino IDE and their Arduino-IDF libraries compile nearly Arduino-identical code with a few limitations (relative to the Teensy, which I think is basically perfect library API duplication).
Now that Arduino is running an ESP32 or ARM chip or has FPGA acceleration and such I'd say the difference is mostly just size. I do think some of the core libraries for the Teensy are better written though, the Arduino authors don't seem to focus as much as Paul does on optimizations. Paul also frequently posts in the forums to respond to questions, which is unusual in my experience.
Edit: In response to the Raspberry Pi, it's just a totally different beast. The Teensy is probably not well suited to run much of an OS (nor is the Arduino). Both are better suited to things that require more pins available; embedded controllers rather than computer substitutes.