File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 11#include < moonPhase.h>
22
3- moonPhase moonPhase; /* include a MoonPhase instance */
3+ moonPhase moonPhase; // include a MoonPhase instance
44
55void setup () {
66 Serial.begin (115200 );
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.getInfo (); // get the current moon phase (1/1/1970 at about 00:00:00 UTC )
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
1314
1415 Serial.print ( " Moon phase angle: " );
15- Serial.print ( moon.angle ); /* angle is a integer between 0-360 */
16+ Serial.print ( moon.angle ); // angle is a integer between 0-360
1617 Serial.println ( " degrees." );
1718 Serial.print ( " Moon surface lit: " );
18- Serial.printf ( " %.0f%% " , moon.percentLit * 100 ); /* percentLit is a real between 0-1 */
19+ Serial.print ( moon.percentLit * 100 ); // percentLit is a real between 0-1
1920}
2021
2122void loop () {
You can’t perform that action at this time.
0 commit comments