File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
#include < moonPhase.h>
2
2
3
- moonPhase moonPhase; /* include a MoonPhase instance */
3
+ moonPhase moonPhase; // include a MoonPhase instance
4
4
5
5
void setup () {
6
6
Serial.begin (115200 );
7
7
Serial.println ();
8
8
Serial.println ( " moonPhase simple example." );
9
9
10
- moonData_t moon; /* variable to receive the data */
10
+ moonData_t moon; // variable to receive the data
11
11
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
13
14
14
15
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
16
17
Serial.println ( " degrees." );
17
18
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
19
20
}
20
21
21
22
void loop () {
You can’t perform that action at this time.
0 commit comments