Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Karl Söderby <[email protected]>
  • Loading branch information
Hannes7eicher and karlsoderby authored Dec 4, 2024
1 parent 0927139 commit ea7db1b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,9 @@ int servoMove(int angle) {

### RTC RPC

This example demonstrates how the RTC can be accessed from the M4:
The Real-time Clock (RTC) can be accessed from the M4 core, and using RPC, we can read the values.

In this example, we set the RTC to a specific date (can be adjusted in the example), send it to the M7 via RPC, and finally prints it out in the Serial Monitor using the M7 core.

**M4 sketch:**
```arduino
Expand All @@ -580,7 +582,7 @@ unsigned long printNow{};
void setup() {
if (RPC.begin()) {
RPC.println("M4: Reading the RTC.");
//RTCset() //Uncomment if you need to set the RTC for the first time.
RTCset(); //sets the RTC to start from a specific time & date
}
}
Expand Down Expand Up @@ -613,6 +615,8 @@ void RTCset() // Set cpu RTC
}
```

The M7 sketch is found below, and uses RPC to print out the incoming data from the M4.

**M7 sketch:**
```arduino
/**
Expand Down

0 comments on commit ea7db1b

Please sign in to comment.