Skip to content

Commit

Permalink
Merge pull request #105 from pennam/edge_control
Browse files Browse the repository at this point in the history
Add support to Arduino Edge Control + Portenta CAT.M1/NB IoT GNSS Shield
  • Loading branch information
pennam authored Nov 27, 2023
2 parents 63872a1 + e02e085 commit 5766962
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ jobs:
platform-name: arduino:renesas_uno
- fqbn: arduino:esp32:nano_nora
platform-name: arduino:esp32
- fqbn: arduino:mbed_edge:edge_control
platform-name: arduino:mbed_edge

# Make board type-specific customizations to the matrix jobs
include:
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ sentence=Arduino Library for network connection management (WiFi, GSM, NB, [Ethe
paragraph=Originally part of ArduinoIoTCloud
category=Communication
url=https://github.com/arduino-libraries/Arduino_ConnectionHandler
architectures=samd,esp32,esp8266,mbed,megaavr,mbed_nano,mbed_portenta,mbed_nicla,mbed_opta,mbed_giga,renesas_portenta,renesas_uno
architectures=samd,esp32,esp8266,mbed,megaavr,mbed_nano,mbed_portenta,mbed_nicla,mbed_opta,mbed_giga,renesas_portenta,renesas_uno,mbed_edge
depends=Arduino_DebugUtils, WiFi101, WiFiNINA, MKRGSM, MKRNB, MKRWAN
4 changes: 4 additions & 0 deletions src/Arduino_CatM1ConnectionHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ unsigned long CatM1ConnectionHandler::getTime()

NetworkConnectionState CatM1ConnectionHandler::update_handleInit()
{
#if defined (ARDUINO_EDGE_CONTROL)
pinMode(ON_MKR2, OUTPUT);
digitalWrite(ON_MKR2, HIGH);
#endif
return NetworkConnectionState::CONNECTING;
}

Expand Down
7 changes: 7 additions & 0 deletions src/Arduino_ConnectionHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@
#define WIFI_FIRMWARE_VERSION_REQUIRED WIFI_FIRMWARE_LATEST_VERSION
#endif

#ifdef ARDUINO_EDGE_CONTROL
#include <GSM.h>
#define BOARD_HAS_CATM1_NBIOT
#define BOARD_HAS_PORTENTA_CATM1_NBIOT_SHIELD
#define NETWORK_HARDWARE_ERROR
#endif

/******************************************************************************
TYPEDEFS
******************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/Arduino_WiFiConnectionHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class WiFiConnectionHandler : public ConnectionHandler


virtual unsigned long getTime() override;
virtual Client & getClient() override{ return _wifi_client; }
virtual Client & getClient() override { return _wifi_client; }
virtual UDP & getUDP() override { return _wifi_udp; }


Expand Down

0 comments on commit 5766962

Please sign in to comment.