File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 22#include < moonPhase.h>
33
44const char * wifissid = " networkname" ;
5- const char * wifipsk = " password" ;
5+ const char * wifipsk = " password" ;
66
7- moonPhase moonPhase; // include a MoonPhase instance
7+ moonPhase moonPhase;
88
99struct tm timeinfo = {0 };
1010
@@ -32,8 +32,7 @@ void loop() {
3232 getLocalTime ( &timeinfo );
3333 Serial.print ( asctime ( &timeinfo ) );
3434
35- moonData_t moon; // variable to receive the data
36- moon = moonPhase.getPhase ();
35+ moonData_t moon = moonPhase.getPhase ();
3736
3837 Serial.print ( " Moon phase angle: " );
3938 Serial.print ( moon.angle ); // angle is a integer between 0-360
Original file line number Diff line number Diff line change @@ -7,16 +7,15 @@ void setup() {
77 Serial.println ();
88 Serial.println ( " moonPhase simple example." );
99
10- moonData_t moon; // variable to receive the data
10+ moonData_t moon; // variable to receive the data
1111
12- moon = moonPhase.getPhase (); // gets the current moon phase (1/1/1970 at 00:00:00 UTC )
13- // Because moonPhase uses the system time, which is not set in this example
12+ moon = moonPhase.getPhase (); // gets the current moon phase ( 1/1/1970 at 00:00:00 UTC )
1413
1514 Serial.print ( " Moon phase angle: " );
16- Serial.print ( moon.angle ); // angle is a integer between 0-360
15+ Serial.print ( moon.angle ); // angle is a integer between 0-360
1716 Serial.println ( " degrees." );
1817 Serial.print ( " Moon surface lit: " );
19- Serial.print ( moon.percentLit * 100 ); // percentLit is a real between 0-1
18+ Serial.print ( moon.percentLit * 100 ); // percentLit is a real between 0-1
2019}
2120
2221void loop () {
You can’t perform that action at this time.
0 commit comments