Who has ESP8266 (WiFi) working with Teensy 4.0?

Andy Belov

Well-known member
I did search this forum for this, but didn't see any definitive guide or results.

Looks like for a few dollars more I can add a WiFi to my setup.
If anybody has it working with Teensy 4.0, please share your experience: your diagram, libraries, power consumption, noise interference, general experience.

Thanks.
 
Some time ago I just connected them via serial and flashed the AT-Firmware (a modem emulation) to the ESP.
 
More important than firmware is a nice T4 add-on board that attaches cleanly without wires. But I'd favor the ESP32 or maybe the ESP32-S2.
 
Ok, thanks. I guess I'll just connect it and see how it goes. It it works, I may ditch the Bluetooth in favor of WiFi.
 
Wow - so long ago ... Latest commit on Dec 11, 2016

This was used to use Teensy to pass through Serial as Arduino programmer for the ESP8266 - then share data with ESP over serial when running: github.com/Defragster/ArduinoTeensyESP8266

Make sure the ESP has good power or it can't program if its input voltage drops.
 
More important than firmware is a nice T4 add-on board that attaches cleanly without wires. But I'd favor the ESP32 or maybe the ESP32-S2.

Well one possibility is the Adafruit Airlift featherwing + Adafruit Teensy->Feather adapter. Note, I haven't used the Airlift, but I have used the feather adapter. You would have to do basic through hole soldering to join the pins.

From the example page, it looks like it uses the following Teensy pins:
  • VUSB -- USB power
  • 3.3v -- Normal 3.3v power
  • Ground -- Ground pin
  • Pin 0 (RX1) -- AirLift firmware upload (must join a solder jumper to use)
  • Pin 1 (TX1) -- AirLift firmware upload (must join a solder jumper to use)
  • Pin 5 -- AirLift CS pin
  • Pin 6 -- AirLift Reset pin
  • Pin 9 -- AirLift busy pin
  • Pin 10 -- AirLift GPIO 0 pin (used to put the ESP32 into bootloading mode if you soldered the jumper)
  • Pin 11 -- SPI MOSI
  • Pin 12 -- SPI MISO
  • Pin 13 -- SPI SCLK
 
I think I'll try what @MichaelMeissner suggested. I didn't know that ESP32 had both WiFi and Bluetooth.
I'll get this: https://learn.adafruit.com/adafruit-airlift-featherwing-esp32-wifi-co-processor-featherwing/arduino
It mentions Teensy pins there, hope it works.

There is no mentioning of Bluetooth, though. I'll see if I can make it work too.
The good thing is that I can get the module here for $3.80: https://www.digikey.com/product-detail/en/espressif-systems/ESP32-WROOM-32/1904-1010-1-ND/8544305
I need the WiFi to be as cheap and small as possible.

Hope it all works.
 
I think I'll try what @MichaelMeissner suggested. I didn't know that ESP32 had both WiFi and Bluetooth.
I'll get this: https://learn.adafruit.com/adafruit-airlift-featherwing-esp32-wifi-co-processor-featherwing/arduino
It mentions Teensy pins there, hope it works.

There is no mentioning of Bluetooth, though. I'll see if I can make it work too.
The good thing is that I can get the module here for $3.80: https://www.digikey.com/product-detail/en/espressif-systems/ESP32-WROOM-32/1904-1010-1-ND/8544305
I need the WiFi to be as cheap and small as possible.

Hope it all works.

Here is something that I was using with the T36 and ESP8266. Not Sure if it can be adapted to to the T4 or ESP32. It is old and I am not sure if it is still being supported.
It worked with NTP and FTP Server/Client that I was playing around with. Admittedly slow but that could have been because of my hardware setup.
Adafruit's ESP8266 Feather.

LInks:
https://github.com/JiriBilek/WiFiSpi/tree/development
And:
https://github.com/JiriBilek/WiFiSpiESP

I was in the process of trying to port it to the ESP32 and ran into issues with ESP32 SPI slave mode. Have not pursued it further.
Will be interesting to what you come up with.
 
I have an AT firmware flashed ESP8266, coupled to a Teensy 4 over serial as part of a DAB+/webradio boombox conversion, partly based off Frank B's work he mentioned above. I can confirm this setup works very well, filling the buffer can easily max out our crap aussie 5Mbps ADSL. Speed is no issue, I think an ESP32 is not needed for this.

I did need to add 100 ohm resistors on TxD and RxD to have them work between the T4 and ESP at 2,304,000 baud. That might not be necessary with more recent Teensyduino? I think the T4 pin drive strength or slew rate was changed. But it probably wouldn't hurt.
 
Thanks @prickle. Those little invisible to me things would be killing me. Never in my life I'd figure out that the damn thing doesn't work just because I need 100 Ohm resistor here or there.
Well, I'm sure that the good people at Adafruit are packing my 2 ESP32's. Will let you know how it goes.
 
Got this: https://learn.adafruit.com/adafruit-airlift-featherwing-esp32-wifi-co-processor-featherwing/overview
Giving up after a few hours.
Getting "Communication with WiFi module failed!" in C:\Users\Homer\Documents\Arduino\libraries\WiFiNINA-master\examples\ScanNetworks\ScanNetworks.ino
Had to modify this: C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4\Printable.h
It needs this: #include <stdlib.h>

My connection:
VUSB -- USB power
3.3v -- Normal 3.3v power
Ground -- Ground pin
Pin 5 -- AirLift CS pin
Pin 6 -- AirLift Reset pin
Pin 9 -- AirLift busy pin
Pin 10 -- AirLift GPIO 0 pin (used to put the ESP32 into bootloading mode if you soldered the jumper)
Pin 11 -- SPI MOSI
Pin 12 -- SPI MISO
Pin 13 -- SPI SCLK

These are not connected. As I understand, they are needed for firmware upload only:
Pin 0 (RX1) -- AirLift firmware upload (must join a solder jumper to use)
Pin 1 (TX1) -- AirLift firmware upload (must join a solder jumper to use)

Have the "3.3" jumper on the top soldered.
If anybody has it working, please share your wiring and the rest.
 
Well one possibility is the Adafruit Airlift featherwing + Adafruit Teensy->Feather adapter. Note, I haven't used the Airlift, but I have used the feather adapter. You would have to do basic through hole soldering to join the pins.

From the example page, it looks like it uses the following Teensy pins:
  • VUSB -- USB power
  • 3.3v -- Normal 3.3v power
  • Ground -- Ground pin
  • Pin 0 (RX1) -- AirLift firmware upload (must join a solder jumper to use)
  • Pin 1 (TX1) -- AirLift firmware upload (must join a solder jumper to use)
  • Pin 5 -- AirLift CS pin
  • Pin 6 -- AirLift Reset pin
  • Pin 9 -- AirLift busy pin
  • Pin 10 -- AirLift GPIO 0 pin (used to put the ESP32 into bootloading mode if you soldered the jumper)
  • Pin 11 -- SPI MOSI
  • Pin 12 -- SPI MISO
  • Pin 13 -- SPI SCLK

Ahh, this was going to make my life easy. But no because I'm connecting an ESP32 for AUDIO (I2S). The pins they use take too many of the I2S lines. Has anyone mentioned blackketter's board? You can connect a 4.0 to an ESP32 with the following.

 
I posted a more or less guide these days:

https://forum.pjrc.com/threads/61297-Teensy-4-1-WiFi-(Howto)

Actually it is now even easier, as you can just use the Adafruit WifiNINA repo if you use master. That one scan networks sketch should work,
if not i can assist. I have it running now for some days. There are some quirks like you need to use a small delay between handling packets but if you do this it works quite stable. Currently implementing an tftpservice to easy put files on the sdcard. This already works but is in the progress of rewriting. Current hardware used:

Teensy 4.1
Adafruit Feather Adapter
Adafruit AirLift Feather
Adafruit Double Proto board.
 
Back
Top