Problem in getting Weather Station to work

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
MrBean14
 
Posts: 20
Joined: Mon Sep 03, 2018 5:07 pm

Problem in getting Weather Station to work

Post by MrBean14 »

Dear,

After buying the items discussed in the tutorial (https://learn.adafruit.com/wifi-weather ... ft-display), I started following the description.

I have connected the Adafruit Feather HUZZAH ESP8266 and the drivers were installed automatically.

I then installed the following list of libraries via the Tools and Library Manager :

Adafruit GFX Library
Adafruit ILI9341 Library
Adafruit STMPE610
WiFiManager for ESP8266
ESP8266 Weather Station Library
JSON Streaming Parser

[img]ada.png[/img]

After changing the setup.h, I open the "esp8266-weather-station-color" file and try to verify and upload.

I did get an error about not finding the "simpleDSTadjust.h" could not be found.
After some searching I installed the "SimpleDSTAdjust" library and this error was gone.

Unfortunately, after this I keep on getting errors :

Code: Select all

Arduino: 1.8.6 (Windows 7), Board:"Adafruit Feather HUZZAH ESP8266, 80 MHz, Flash, 4M (3M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

Build-opties gewijzigd, alles wordt opnieuw gebuild
esp8266-weather-station-color:48:23: error: MiniGrafx.h: No such file or directory

 #include <MiniGrafx.h>

                       ^

compilation terminated.

exit status 1
MiniGrafx.h: No such file or directory
It looks like it is not looking into the installed libraries.

How could I solve this ?

Best regards and thanks in advance.

Davy
Attachments
ada.png
ada.png (39.81 KiB) Viewed 1748 times

User avatar
oesterle
 
Posts: 806
Joined: Tue Sep 17, 2013 11:32 pm

Re: Problem in getting Weather Station to work

Post by oesterle »

Hi, MrBean14!

Searching GitHub for MiniGrafx, I see one hit, the ThingPulse MiniGrafx Library.

This library hasn't been added to Arduino's Library Manager, but you can add it manually, by following the guide All About Arduino Libraries in the Adafruit Learning System.

Cheers,

Eric

User avatar
MrBean14
 
Posts: 20
Joined: Mon Sep 03, 2018 5:07 pm

Re: Problem in getting Weather Station to work

Post by MrBean14 »

Eric,

thank you very much for this help.
I was so into the problem that simply searching for MiniGrafx did not work out.
With your help I was able to download and install the library.

I have now been able to upload it succesfully.

But, still having an issue (I think).

After the succesfull upload, the Huzzah Feather keeps on blinking with the red LED. Any idea if this is correct ?
In the manual it shows that now the weather station should work. But it is not the case, connecting it to the screen keeps on giving a grey screen and nothing jumps on.

How can I check if all went ok ?

Or does the flashing red LED mean it is trying to download the files for the weatherstation ? How long can it take (if this is indeed the case) ? I have been waiting for 15 mins at least and nothing changes.

https://youtu.be/zWooDw05UzM

[img]4-09-2018%2017-57-31.png[/img]

Best regards,

Davy
Attachments
4-09-2018 17-57-31.png
4-09-2018 17-57-31.png (77.44 KiB) Viewed 1720 times

User avatar
MrBean14
 
Posts: 20
Joined: Mon Sep 03, 2018 5:07 pm

Re: Problem in getting Weather Station to work

Post by MrBean14 »

Very sorry guys, I might have been a bit too fast.
I forgot to request an OpenWeathermap API key. I now did and ran the Serial monitor.

It updates like follows :

Code: Select all

...Connected...Mounting file system...

DST Rules Updated:
DST Start: Sun Mar 25 02:00:00 2018
DST End:   Sun Oct 28 02:00:00 2018

Time difference for DST: 7200Getting url: http://api.openweathermap.org/data/2.5/weather?q=Herk-de-Stad,BE&appid=MYAPPID&units=metric&lang=en
[HTTP] GET...
[HTTP] GET... code: 200
start document
Getting url: http://api.openweathermap.org/data/2.5/forecast?q=Herk-de-Stad,BE&appid=MYAPPID&units=metric&lang=en
[HTTP] GET...
[HTTP] GET... code: 200
start document
I thought all is looking ok now, so I put the Feather on my screen and boot up.

Unfortunately the screen stays white and the red LED keeps on blinking.

Best regards

Davy

User avatar
MrBean14
 
Posts: 20
Joined: Mon Sep 03, 2018 5:07 pm

Re: Problem in getting Weather Station to work

Post by MrBean14 »

Well, the story continues and slowly I'm learning from my beginner's mistakes.

I found that I did not define the "touchscreen" in my settings. Once I took away the remarks, I got an error about the "XPT2046_Touchscreen" library.
Searched it on Github and installed it.

Unfortunately, it did not close my frustration !

Now it took quite a while for verification but at the end, no success.

I get this now:

Code: Select all

Arduino: 1.8.6 (Windows 7), Board:"Adafruit Feather HUZZAH ESP8266, 80 MHz, Flash, 4M (3M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

sketch\esp8266-weather-station-color.ino.cpp.o: In function `updateData()':

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:308: undefined reference to `TouchControllerWS::loadCalibration()'

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:308: undefined reference to `TouchControllerWS::startCalibration(void (**)(short, short))'

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:309: undefined reference to `TouchControllerWS::continueCalibration()'

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:309: undefined reference to `TouchControllerWS::isCalibrationFinished()'

sketch\esp8266-weather-station-color.ino.cpp.o: In function `OpenWeatherMapForecast::setAllowedHours(unsigned char*, unsigned char)':

C:\Users\MrBean\Documents\Arduino\libraries\ESP8266_Weather_Station\src/OpenWeatherMapForecast.h:100: undefined reference to `TouchControllerWS::saveCalibration()'

sketch\esp8266-weather-station-color.ino.cpp.o: In function `setup':

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:317: undefined reference to `TouchControllerWS::loadCalibration()'

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:319: undefined reference to `TouchControllerWS::startCalibration(void (**)(short, short))'

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:319: undefined reference to `TouchControllerWS::continueCalibration()'

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:320: undefined reference to `TouchControllerWS::isCalibrationFinished()'

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:320: undefined reference to `TouchControllerWS::saveCalibration()'

sketch\esp8266-weather-station-color.ino.cpp.o: In function `drawAstronomy()':

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:640: undefined reference to `TouchControllerWS::isTouched(short)'

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:462: undefined reference to `TouchControllerWS::getPoint()'

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:464: undefined reference to `TouchControllerWS::isTouched(short)'

C:\Users\MrBean\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino:464: undefined reference to `TouchControllerWS::getPoint()'

sketch\esp8266-weather-station-color.ino.cpp.o:(.text.startup._GLOBAL__sub_I_OPEN_WEATHER_MAP_APP_ID+0x108): undefined reference to `TouchControllerWS::TouchControllerWS(XPT2046_Touchscreen*)'

sketch\esp8266-weather-station-color.ino.cpp.o: In function `__static_initialization_and_destruction_0':

sketch/settings.h:63: undefined reference to `TouchControllerWS::TouchControllerWS(XPT2046_Touchscreen*)'

collect2.exe: error: ld returned 1 exit status

exit status 1
I can clearly see the "TouchControllerWS.cpp" and "TouchControllerWS.h" files in my header...
Why this now ? Any idea ?



Best regards,

Davy
Attachments
4-09-2018 21-04-17.png
4-09-2018 21-04-17.png (13.15 KiB) Viewed 1712 times

User avatar
MrBean14
 
Posts: 20
Joined: Mon Sep 03, 2018 5:07 pm

Re: Problem in getting Weather Station to work

Post by MrBean14 »

Any idea why I'm getting this issue with the code please ?

User avatar
oesterle
 
Posts: 806
Joined: Tue Sep 17, 2013 11:32 pm

Re: Problem in getting Weather Station to work

Post by oesterle »

Hey, MrBean!


Hmm.

I think maybe your touchpad code isn't being included. Check out this section of the esp8266-weather-station-color.ino code:

Code: Select all

#ifdef HAVE_TOUCHPAD
  #include <XPT2046_Touchscreen.h>
  #include "TouchControllerWS.h"
#endif
Note that TouchControllerWS.h will only be included if HAVE_TOUCHPAD is defined. That's done in settings.h, in this section of the code:

Code: Select all

/* Feather Huzzah + 2.4" TFT wing */
// Pins for the ILI9341
#define TFT_DC 15
#define TFT_CS 0
#define TFT_LED 5
//#define HAVE_TOUCHPAD
#define TOUCH_CS 16
#define TOUCH_IRQ  4
Unless you uncomment #define HAVE_TOUCHPAD, it won't get included properly.

It might be something else that's preventing the touchpad calls to be undefined, but this is where I'd start.

Cheers,

Eric

User avatar
MrBean14
 
Posts: 20
Joined: Mon Sep 03, 2018 5:07 pm

Re: Problem in getting Weather Station to work

Post by MrBean14 »

Eric,

thanks again for the effort to try to help.
Maybe you missed it somewhere above in the thread, but yes, I did uncomment the "#define HAVE_TOUCHPAD".

Best regards,

Davy

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Problem in getting Weather Station to work

Post by adafruit_support_carter »

It's still acting like it's not including the files. As a test, try just removing the pre-processor logic around the includes. Turn this:

Code: Select all

#ifdef HAVE_TOUCHPAD
  #include <XPT2046_Touchscreen.h>
  #include "TouchControllerWS.h"
#endif
into this:

Code: Select all

#include <XPT2046_Touchscreen.h>
#include "TouchControllerWS.h"

User avatar
MrBean14
 
Posts: 20
Joined: Mon Sep 03, 2018 5:07 pm

Re: Problem in getting Weather Station to work

Post by MrBean14 »

Carter,

changed it to :

Code: Select all

//#ifdef HAVE_TOUCHPAD
  #include <XPT2046_Touchscreen.h>
  #include "TouchControllerWS.h"
//#endif
Still same issue :-(

The last error worries me...

Code: Select all

exit status 1
Fout bij het compileren voor board Adafruit Feather HUZZAH ESP8266
I did start the example sketch "graphicstest_featherwing" under the "Adafruit ILI9341" examples folder. This works fine.

But it is only using these libraries.

Code: Select all

#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
What concerns me in the blog description is that I exactly bought what was mentiond and hoped it would work "out-of-the-box".

Best regards,

Davy

User avatar
oesterle
 
Posts: 806
Joined: Tue Sep 17, 2013 11:32 pm

Re: Problem in getting Weather Station to work

Post by oesterle »

Hi again, Mr Bean!

To see if I could track down the problem, I downloaded the latest version from ESP8266 WiFi Weather Station with Color TFT Display: Software.

Have you installed the required libraries, as mentioned in the esp8266-weather-station-color.ino file?

Code: Select all

/***
 * Install the following libraries through Arduino Library Manager
 * - Mini Grafx by Daniel Eichhorn
 * - ESP8266 WeatherStation by Daniel Eichhorn
 * - Json Streaming Parser by Daniel Eichhorn
 * - simpleDSTadjust by neptune2
 ***/
Having installed these, the code compiles successfully on my machine:

Code: Select all

Sketch uses 424604 bytes (40%) of program storage space. Maximum is 1044464 bytes.
Global variables use 34344 bytes (41%) of dynamic memory, leaving 47576 bytes for local variables. Maximum is 81920 bytes.
Cheers,

Eric

User avatar
MrBean14
 
Posts: 20
Joined: Mon Sep 03, 2018 5:07 pm

Re: Problem in getting Weather Station to work

Post by MrBean14 »

Hi Eric,

if you look at the manual only, it asks you to install all the libraries as shown in my picture
I have installed them all.

[img]ada.png[/img]

Then you gave me the good advice to install the "MiniGrafx" library which was not described on the blog.

At that moment the compiling worked fine but the device was not showing something.

At that time I discovered the rule with the "#ifdef HAVE_TOUCHPAD" and took away the comment.

Since that moment, it did not compile anymore at all, based on the "TouchControllerWS.h" issues. :-(

So no idea why it is compiling fine with you.

P.S. Just to be sure : you're talking about downloading the "latest" version of the weatherstation code. If correct, that is the one by clicking the green button on the page you're linking to. To be sure, it is this one, right ? https://github.com/adafruit/esp8266-wea ... master.zip

Best regards,

Davy

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Problem in getting Weather Station to work

Post by adafruit_support_carter »

I just ran through the guide and tried a test build. There are a couple of issues that need to be fixed. I was working with the .zip file linked from the learn guide. I needed to additionally install these two libraries which are not mentioned in the guide:
  • Mini Grafx by Daniel Eichhorn
  • simpleDSTadjust by neptune2
I then uncommented the #define HAVE_TOUCHPAD in settings.h and had to install this additional library:
  • XPT2046 TouchScreen by Paul Stoffregen
I was able to install all of those via the Library Manager. Once installed, it compiled fine for me.

I will send word to have the guide looked at.

User avatar
MrBean14
 
Posts: 20
Joined: Mon Sep 03, 2018 5:07 pm

Re: Problem in getting Weather Station to work

Post by MrBean14 »

Dear,

thanks for your time.
Then I don't understand what can still be wrong from my side :-(

What version of Arduino IDE are you using ?

Best regards,

Davy

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Problem in getting Weather Station to work

Post by adafruit_support_carter »

I was using Arduino IDE version 1.8.6.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”