Skip to content

Commit 4b3f5d4

Browse files
Updated the simple example.
1 parent 6bb1656 commit 4b3f5d4

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

examples/simple/simple.ino

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
#include "MoonPhase.h"
1+
#include <moonPhase.h>
22

3-
const int year = 2018;
4-
const int month = 4;
5-
const int day = 12;
6-
const double hour = 22.50; /* 22:30 */
7-
8-
MoonPhase MoonPhase; /* include a MoonPhase instance */
3+
moonPhase moonPhase; /* include a MoonPhase instance */
94

105
void setup() {
116
Serial.begin(115200);
127
Serial.println();
13-
Serial.println( "MoonPhase simple example." );
8+
Serial.println( "moonPhase simple example." );
149

15-
MoonPhase::moonData moon; /* variable to receive the data */
10+
moonData_t moon; /* variable to receive the data */
1611

17-
moon = MoonPhase.getInfo( year, month, day, hour );
12+
moon = moonPhase.getInfo(); //get the current moon phase (1/1/1970 at about 00:00:00 UTC )
1813

1914
Serial.print( "Moon phase angle: " );
2015
Serial.print( moon.angle ); /* angle is a integer between 0-360 */

0 commit comments

Comments
 (0)