Arduino Cloud

fdu

Member
Hi ,
Are there plans to have a teensy compatible with the arduino cloud?

Thanks
 
I did about 1 minute of searching but didn’t find a spec. Do you have a link to one?
 
It appears like it can build for Teensy 4.1 with some modifications to the Arduino_ConnectionHandler library dependency. Note that I didn't test it, I just built it. I used PlatformIO and only used the Arduino_ConnectionHandler, Arduino_DebugUtils, and QNEthernet libraries as dependencies.

Here's the changes:
Git:
diff --git a/src/Arduino_ConnectionHandler.h b/src/Arduino_ConnectionHandler.h
index b4f8e31..8c89b60 100644
--- a/src/Arduino_ConnectionHandler.h
+++ b/src/Arduino_ConnectionHandler.h
@@ -179,6 +179,14 @@
   #define NETWORK_HARDWARE_ERROR
 #endif
 
+#ifdef ARDUINO_TEENSY41
+  #include <QNEthernet.h>
+
+  using namespace qindesign::network;
+
+  #define BOARD_HAS_ETHERNET
+#endif
+
 /******************************************************************************
    TYPEDEFS
  ******************************************************************************/
diff --git a/src/Arduino_EthernetConnectionHandler.cpp b/src/Arduino_EthernetConnectionHandler.cpp
index 0fa2e25..e27b094 100644
--- a/src/Arduino_EthernetConnectionHandler.cpp
+++ b/src/Arduino_EthernetConnectionHandler.cpp
@@ -87,13 +87,13 @@ NetworkConnectionState EthernetConnectionHandler::update_handleInit()
 NetworkConnectionState EthernetConnectionHandler::update_handleConnecting()
 {
   if (_ip != INADDR_NONE) {
-    if (Ethernet.begin(nullptr, _ip, _dns, _gateway, _netmask, _timeout, _response_timeout) == 0) {
+    if (Ethernet.begin(nullptr, _ip, _dns, _gateway, _netmask/*, _timeout, _response_timeout*/) == 0) {
       Debug.print(DBG_ERROR, F("Failed to configure Ethernet, check cable connection"));
       Debug.print(DBG_VERBOSE, "timeout: %d, response timeout: %d", _timeout, _response_timeout);
       return NetworkConnectionState::CONNECTING;
     }
   } else {
-    if (Ethernet.begin(nullptr, _timeout, _response_timeout) == 0) {
+    if (Ethernet.begin(nullptr, _timeout/*, _response_timeout*/) == 0) {
       Debug.print(DBG_ERROR, F("Waiting Ethernet configuration from DHCP server, check cable connection"));
       Debug.print(DBG_VERBOSE, "timeout: %d, response timeout: %d", _timeout, _response_timeout);
       return NetworkConnectionState::CONNECTING;
@@ -118,7 +118,7 @@ NetworkConnectionState EthernetConnectionHandler::update_handleConnected()
 
 NetworkConnectionState EthernetConnectionHandler::update_handleDisconnecting()
 {
-  Ethernet.disconnect();
+  // Ethernet.disconnect();
   return NetworkConnectionState::DISCONNECTED;
 }
 
Last edited:
Back
Top