Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
v1.0.8 to update dependency
Browse files Browse the repository at this point in the history
### Releases v1.0.8

1. Update dependency on [Timezone_Generic Library](https://github.com/khoih-prog/Timezone_Generic)
2. Update examples
  • Loading branch information
khoih-prog authored Jan 21, 2022
1 parent d39db49 commit b63f66a
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ datetime_t alarmT;
volatile bool alarmTriggered = false;

#define ALARM_AT_SECONDS 5
#define ALARM_REPEAT_FOREVER false //true
#define ALARM_REPEAT_FOREVER true

// This is ISR. Be careful. No Serial.print here.
void rtcCallback()
Expand Down
72 changes: 72 additions & 0 deletions examples/Alarm/RP2040_RTC_Alarm_WiFiNINA/defines.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/****************************************************************************************************************************
defines.h
For RP2040-based boards using internal RTC
with WiFiNINA, ESP8266/ESP32 WiFi, ESP8266-AT, W5x00, ENC28J60, LAN8742A Ethernet modules/shields
Built by Khoi Hoang https://github.com/khoih-prog/RP2040_RTC
Licensed under MIT license
*****************************************************************************************************************************/

#ifndef defines_h
#define defines_h

#define DEBUG_WIFI_WEBSERVER_PORT Serial

// Debug Level from 0 to 4
#define _WIFI_LOGLEVEL_ 3
#define _WIFININA_LOGLEVEL_ 4

#define USE_WIFI_NINA true
//#define USE_WIFI_NINA false

#if USE_WIFI_NINA
#warning Using WiFiNINA using WiFiNINA_Generic Library
#define SHIELD_TYPE "WiFiNINA using WiFiNINA_Generic Library"
#endif

#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) )
#if defined(WIFININA_USE_RP2040)
#undef WIFININA_USE_RP2040
#endif
#define WIFININA_USE_RP2040 true

#if defined(ARDUINO_ARCH_MBED)

#if defined(BOARD_NAME)
#undef BOARD_NAME
#endif

#if defined(ARDUINO_NANO_RP2040_CONNECT)
#define BOARD_NAME "MBED NANO_RP2040_CONNECT"
#elif defined(ARDUINO_RASPBERRY_PI_PICO)
#define BOARD_NAME "MBED RASPBERRY_PI_PICO"
#elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
#define BOARD_NAME "MBED DAFRUIT_FEATHER_RP2040"
#elif defined(ARDUINO_GENERIC_RP2040)
#define BOARD_NAME "MBED GENERIC_RP2040"
#else
#define BOARD_NAME "MBED Unknown RP2040"
#endif

#endif

#else
#error This code is not designed to run on RP2040 platform! Please check your Tools->Board setting.
#endif

#ifndef BOARD_NAME
#if defined(ARDUINO_BOARD)
#define BOARD_NAME ARDUINO_BOARD
#else
#define BOARD_NAME BOARD_TYPE
#endif
#endif

#include <RP2040_RTC.h>
#include <WiFiNINA_Generic.h>

char ssid[] = "ssid"; // your network SSID (name)
char pass[] = "12345678"; // your network password

#endif //defines_h

0 comments on commit b63f66a

Please sign in to comment.