File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Weather_Shield_Weather_Station_V12
Weather_Shield_with_GPS_V12 Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ void loop()
182182
183183 // Calc the wind speed and direction every second for 120 second to get 2 minute average
184184 float currentSpeed = get_wind_speed ();
185+ windspeedmph = currentSpeed;// update global variable for windspeed when using the printWeather() function
185186 // float currentSpeed = random(5); //For testing
186187 int currentDirection = get_wind_direction ();
187188 windspdavg[seconds_2m] = (int )currentSpeed;
@@ -229,7 +230,7 @@ void calcWeather()
229230 winddir = get_wind_direction ();
230231
231232 // Calc windspeed
232- // windspeedmph = get_wind_speed(); //This is calculated in the main loop
233+ // windspeedmph = get_wind_speed(); //This is calculated in the main loop on line 185
233234
234235 // Calc windgustmph
235236 // Calc windgustdir
Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ void loop()
193193
194194 // Calc the wind speed and direction every second for 120 second to get 2 minute average
195195 float currentSpeed = get_wind_speed ();
196+ windspeedmph = currentSpeed; // update global variable for windspeed when using the printWeather() function
196197 // float currentSpeed = random(5); //For testing
197198 int currentDirection = get_wind_direction ();
198199 windspdavg[seconds_2m] = (int )currentSpeed;
@@ -252,7 +253,7 @@ void calcWeather()
252253 winddir = get_wind_direction ();
253254
254255 // Calc windspeed
255- // windspeedmph = get_wind_speed(); //This is calculated in the main loop
256+ // windspeedmph = get_wind_speed(); //This is calculated in the main loop on line 195
256257
257258 // Calc windgustmph
258259 // Calc windgustdir
@@ -445,7 +446,7 @@ void printWeather()
445446
446447 Serial.print (" ,lat=" );
447448 Serial.print (gps.location .lat (), 6 );
448- Serial.print (" ,lat =" );
449+ Serial.print (" ,lng =" );
449450 Serial.print (gps.location .lng (), 6 );
450451 Serial.print (" ,altitude=" );
451452 Serial.print (gps.altitude .meters ());
You can’t perform that action at this time.
0 commit comments