Confused on Supported Arduino Libraries

minishcap

Member
Howdy guys, I just put an order in for a Teensy 4.1 with an ethernet adapter, but I'm a little confused on which libraries I should be using/are supported when it arrives.

For example, I want to use websockets for communication, but can I just plug-and-play a library like https://github.com/Links2004/arduinoWebSockets for the Teensy; I don't see it listed as a supported board, but a lot of the information I see surrounding libraries say that if it runs on an Arduino it'll run on a Teensy?

I could use something like https://github.com/ssilverman/QNEthernet for UDP back and forth, but that will require more setup on my end - websockets would be preferable.

Other libraries for stuff I'm interested in like HID modes seem to have good compatibility, but I'm not sure about the above solutions.

Would appreciate any insight!
 
Original Arduino doesn't have built-in Ethernet. The list of supported hardware for the Websocket library contains Arduino-compatible platforms with built-in Ethernet (ESP32) or Wifi (Pico W), but also without (ATMega), in which case a shield is required. Since Teensy 4.1 is not listed, I wouldn't expect that library to support it. QNEthernet has become the de facto standard for Ethernet on Teensy, and if you google QNEthernet Websocket, you'll get some forum hits. Maybe start there?
 
Original Arduino doesn't have built-in Ethernet. The list of supported hardware for the Websocket library contains Arduino-compatible platforms with built-in Ethernet (ESP32) or Wifi (Pico W), but also without (ATMega), in which case a shield is required. Since Teensy 4.1 is not listed, I wouldn't expect that library to support it. QNEthernet has become the de facto standard for Ethernet on Teensy, and if you google QNEthernet Websocket, you'll get some forum hits. Maybe start there?
Ahh, thanks for the background. Most of my Googling led to outdated solutions, but I searched the forums and saw another user mention https://mongoose.ws/ - looks promising, not sure why it doesn't rank higher in search.
 
QNEthernet mimics the original Arduino Ethernet library API, so there's a chance the Websocket library might "just work". Might at least be worth a try.

If it doesn't work, tell us about it here. Best to give exact code and steps to reproduce the problem.
 
QNEthernet mimics the original Arduino Ethernet library API, so there's a chance the Websocket library might "just work". Might at least be worth a try.

If it doesn't work, tell us about it here. Best to give exact code and steps to reproduce the problem.
Thanks Paul, will post an update once it arrives and I've spent some time tinkering about.
 
Back
Top