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

Commit

Permalink
v1.0.1 to add mbed_nano architecture
Browse files Browse the repository at this point in the history
### Releases v1.0.1

1. Fix `library.properties` to add `mbed_nano` architecture for **NANO_RP2040_CONNECT** using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed)
  • Loading branch information
khoih-prog authored Jun 14, 2021
1 parent b2196cd commit daebd3f
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 28 deletions.
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* [Currently supported Boards](#currently-supported-boards)
* [Important Notes about ISR](#important-notes-about-isr)
* [Changelog](#changelog)
* [Releases v1.0.1](#releases-v101)
* [Initial Releases v1.0.0](#initial-releases-v100)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
Expand Down Expand Up @@ -76,7 +77,7 @@

## Features

This is an Arduino library for **RP2040-basd RTC**
This is an Arduino library for **RP2040-based RTC**

```
The RTC keeps track of time in human readable format and generates events when the time is equal to a preset value.
Expand Down Expand Up @@ -127,6 +128,10 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),

## Changelog

### Releases v1.0.1

1. Fix `library.properties` to add `mbed_nano` architecture for **NANO_RP2040_CONNECT** using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed)

### Initial Releases v1.0.0

1. Initial coding to support RP2040-based boards such as **NANO_RP2040_CONNECT, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040** using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed) or [**Earle Philhower's arduino-pico core**](https://github.com/earlephilhower/arduino-pico).
Expand Down Expand Up @@ -761,7 +766,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Tim

```
Start RP2040_RTC_Time_Ethernet on RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.0
RP2040_RTC v1.0.1
Timezone_Generic v1.5.0
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -804,7 +809,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Tim

```
Start RP2040_RTC_Time_Ethernet on RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.0
RP2040_RTC v1.0.1
Timezone_Generic v1.5.0
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -846,7 +851,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Tim

```
Start RP2040_RTC_Time_WiFiNINA on MBED NANO_RP2040_CONNECT with WiFiNINA using WiFiNINA_Generic Library
RP2040_RTC v1.0.0
RP2040_RTC v1.0.1
Timezone_Generic v1.5.0
Connecting to WPA SSID: HueNet1
You're connected to the network, IP = 192.168.2.153
Expand All @@ -872,7 +877,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Ala

```
Start RP2040_RTC_Alarm_Ethernet on RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.0
RP2040_RTC v1.0.1
Timezone_Generic v1.5.0
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -936,7 +941,7 @@ Alarm @ Saturday 14 June 6:28:05 202

```
Start RP2040_RTC_Alarm_Ethernet on RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.0
RP2040_RTC v1.0.1
Timezone_Generic v1.5.0
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -986,7 +991,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Ala

```
Start RP2040_RTC_Alarm_Ethernet on MBED RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.0
RP2040_RTC v1.0.1
Timezone_Generic v1.5.0
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -1035,7 +1040,7 @@ Alarm @ Saturday 14 June 6:51:05 2021

```
Start RP2040_RTC_Alarm_Ethernet on RASPBERRY_PI_PICO with W5x00 using EthernetLarge Library
RP2040_RTC v1.0.0
RP2040_RTC v1.0.1
Timezone_Generic v1.5.0
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
Expand Down Expand Up @@ -1085,7 +1090,7 @@ The following is the sample terminal output when running example [RP2040_RTC_Ala

```
Start RP2040_RTC_Alarm_WiFiNINA on MBED NANO_RP2040_CONNECT with WiFiNINA using WiFiNINA_Generic Library
RP2040_RTC v1.0.0
RP2040_RTC v1.0.1
Timezone_Generic v1.5.0
Connecting to WPA SSID: HueNet1
You're connected to the network, IP = 192.168.2.153
Expand All @@ -1109,7 +1114,7 @@ Alarm @ Saturday 14 June 6:38:05 2021

```
Start RP2040_RTC_Alarm_WiFiNINA on MBED NANO_RP2040_CONNECT with WiFiNINA using WiFiNINA_Generic Library
RP2040_RTC v1.0.0
RP2040_RTC v1.0.1
Timezone_Generic v1.5.0
Connecting to WPA SSID: HueNet1
You're connected to the network, IP = 192.168.2.153
Expand Down Expand Up @@ -1142,6 +1147,10 @@ Sometimes, the library will only work if you update the board core to the latest

## Releases

### Releases v1.0.1

1. Fix `library.properties` to add `mbed_nano` architecture for **NANO_RP2040_CONNECT** using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed)

### Initial Releases v1.0.0

1. Initial coding to support RP2040-based boards such as **NANO_RP2040_CONNECT, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040** using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed) or [**Earle Philhower's arduino-pico core**](https://github.com/earlephilhower/arduino-pico).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/RP2040_RTC
Licensed under MIT license
Version: 1.0.0
Version: 1.0.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 13/06/2021 Initial release to support RP2040-based boards using internal RTC
1.0.1 K Hoang 14/06/2021 Add mbed_nano architecture to library.properties
*****************************************************************************************************************************/

#include "defines.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/RP2040_RTC
Licensed under MIT license
Version: 1.0.0
Version: 1.0.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 13/06/2021 Initial release to support RP2040-based boards using internal RTC
1.0.1 K Hoang 14/06/2021 Add mbed_nano architecture to library.properties
*****************************************************************************************************************************/

#include "defines.h"
Expand Down Expand Up @@ -50,7 +51,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
5 changes: 3 additions & 2 deletions examples/Alarm/RP2040_RTC_Alarm_WiFiNINA/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@

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

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

#endif //defines_h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/RP2040_RTC
Licensed under MIT license
Version: 1.0.0
Version: 1.0.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 13/06/2021 Initial release to support RP2040-based boards using internal RTC
1.0.1 K Hoang 14/06/2021 Add mbed_nano architecture to library.properties
*****************************************************************************************************************************/

// Important notes: Currently, RP2040-based boards RTC has no battery backup. So the time will be lost when power down
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/RP2040_RTC
Licensed under MIT license
Version: 1.0.0
Version: 1.0.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 13/06/2021 Initial release to support RP2040-based boards using internal RTC
1.0.1 K Hoang 14/06/2021 Add mbed_nano architecture to library.properties
*****************************************************************************************************************************/

// Important notes: Currently, RP2040-based boards RTC has no battery backup. So the time will be lost when power down
Expand Down
4 changes: 2 additions & 2 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "RP2040_RTC",
"version": "1.0.0",
"version": "1.0.1",
"keywords": "timing, device, rtc, control, timer, interrupt, alarm, utc, ntp, isr, isr-based, hardware-timer, mission-critical, accuracy, precise, non-blocking, mbed, rpi-pico, rp2040, nano-rp2040-connect",
"description": "This library enables you to use RTC from RP2040-based boards such as Nano_RP2040_Connect, RASPBERRY_PI_PICO. This RP204-based RTC, using Interrupt, has no battery backup. Time will be lost when powered down. To need NTP-client to update RTC every start-up.",
"authors":
Expand All @@ -23,7 +23,7 @@
]
},
"frameworks": "*",
"platforms": ["rp2040", "mbed_rp2040"],
"platforms": ["rp2040", "mbed_rp2040", "mbed_nano"],
"examples": "examples/*/*/*.ino",
"license": "MIT"
}
6 changes: 3 additions & 3 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name=RP2040_RTC
version=1.0.0
version=1.0.1
author=Khoi Hoang <[email protected]>
maintainer=Khoi Hoang <[email protected]>
sentence=This library enables you to use RTC from RP2040-based boards such as Nano_RP2040_Connect, RASPBERRY_PI_PICO
paragraph=This RP204-based RTC, using Interrupt, has no battery backup. Time will be lost when powered down. To need NTP-client to update RTC every start-up.
category=Timing, Device Control, Other
category=Timing
url=https://github.com/khoih-prog/RP2040_RTC
architectures=rp2040, mbed_rp2040
architectures=rp2040, mbed_rp2040, mbed_nano
repository=https://github.com/khoih-prog/RP2040_RTC
license=MIT
includes=RP2040_RTC.h
3 changes: 2 additions & 1 deletion src/DateTime_Generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/RP2040_RTC
Licensed under MIT license
Version: 1.0.0
Version: 1.0.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 13/06/2021 Initial release to support RP2040-based boards using internal RTC
1.0.1 K Hoang 14/06/2021 Add mbed_nano architecture to library.properties
*****************************************************************************************************************************/

#pragma once
Expand Down
5 changes: 3 additions & 2 deletions src/RP2040_RTC.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
Built by Khoi Hoang https://github.com/khoih-prog/RP2040_RTC
Licensed under MIT license
Version: 1.0.0
Version: 1.0.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 13/06/2021 Initial release to support RP2040-based boards using internal RTC
1.0.1 K Hoang 14/06/2021 Add mbed_nano architecture to library.properties
*****************************************************************************************************************************/

#pragma once

#ifndef RP2040_RTC_H
#define RP2040_RTC_H

#define RP2040_RTC_VERSION "RP2040_RTC v1.0.0"
#define RP2040_RTC_VERSION "RP2040_RTC v1.0.1"

extern "C"
{
Expand Down

0 comments on commit daebd3f

Please sign in to comment.