Hello!
I have finished the tutorial. The Problem: The Charts don’t show up.
Same with the tutorial on your website. Maybe I have to fix my browser? Any settings needed?
Thanks for answering in advance :-).
Andreas 🙂
Additionally, double-check that you didn’t delete any important line from the sketch while modifying it to use the BMP sensor.
Hi Andreas.
Do you have all the files necessary to build the charts in your project folder?
Open the JavaScript console on your web browser and tell me if you have any errors.
You may also need to hard refresh your web browser so that it loads the most recent files.
Regards,
Sara
Hi Sara,
there is a warning:
Highcharts warning: Consider including the “accessibility.js” module to make your chart more usable for people with disabilities. Set the “accessibility.enabled” option to false to remove this warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.
Best :-),
Andreas
Hi.
You can ignore that warning. That’s not what’s causing the issue.
Also, ignore the desktop.ini file. It shows up in my folder because I save my folders on google drive, and it creates that file in all folders.
If you refresh the web browse what happens? The same thing, or do you get something different?
Which web browser are you using?
Regards,
Sara
Hi Sara,
I use Edge and Firefox on my desktop. And Chrome on the mobile.
Refreshing doesn’t make a difference.
I use a BMP280 (sic!) Sensor and Humidity is set on 50.
So this is the only difference. I think I will create an WebApp just fro showing a chart. At the moment charts are not important for my project. It’s just nice to have.
How can I debug any project in a better way? How do you do it? Do you have other, better developement tools? 🙂
Best :-),
Andreas
Hi.
If you get NaN, the chart may not show up because it doesn’t have a valid reading?
I use the web browser console for debugging these projects.
When you open the console there are several tabs.
There is one called sources. And it shows the files to build the web page. Check that it is using all the required files and that all files have the proper content.
The sensor updates in Realtime Database. And the previous program without charts worked well. So it is a charts issue, as I had the same problem with the charts in the “not premium content” (still great) area.
Hello Sara!
“If you get NaN, the chart may not show up because it doesn’t have a valid reading?”
It must have been a BMP280 BME280 issue. I think it has not accepted my dummy-value I had before (typecasting error, I think). I have done everything again and now it works!
Thanks for explaining the debugging methods. It has not been a JavaScript issue or a browser issue.
Thank you very much 🙂 !
Andreas 🙂
Great!
So, is everything working as expected now?
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara
Dear Sara!
I thank you so much for your support.
The workaround to include the BMP280 is a dummy-number to feed the humidity chart in main.h:
//json.set(humPath.c_str(), String(bme.readHumidity()));
//#include <Adafruit_BME280.h>
//Adafruit_BME280 bme;
#include <Adafruit_BMP280.h>
Adafruit_BMP280 bmp;
json.set(humPath.c_str(), String(50)); // 50 is a dummy number…
You can mark the issue as solved and I thank you 🙂 !
Maybe others with a BMP280 will be happy too
(https://randomnerdtutorials.com/solved-could-not-find-a-valid-bme280-sensor/#more-108681)!
All the best!
Andreas 🙂