General area when it fits no where else

Moderator: Mmiscool

User avatar
By Oldbod
#55153 Hi Ryan

I'm wondering if you extended the delay statements to 2000 and perhaps added one after the wget ifthis would make any difference. Possibly you might put a wprint statement like wprint "screen cleared. :" after your cls.

I may be wrong, but i look on wprint and cls as doing things to a buffer inside tbe esp, and wait or returngui as pushing them to the browser. If that were so, then you issue a cls, followed bh a wait, screen clears. Issue wprint, commanx is stacked. A new cls is issued before that is printed. And so on. Serialprint is simpler , i think that just goes as soon as you issje the command.

For debugging, if youre doing it using some form of command the displays data, i've found ituseful to display each steps variables and also put smething either side to show blank values....
User avatar
By RyanC
#55172 Thank you all very much for your support. I have tried both of the codes you gentlemen have provided. The first one, unfortunately, had similar problems to the first. mmiscool's seemed to be more or less working for me. I extended the delay to 5000 for debugging purposes, and it seemed stable-ish before I went to bed. However, between now and then, it seems the webpage it was looking at has been disconnected, at least for now. I would like to change the webpage to api.wheretheiss.at/v1/satellites/25544.json , which is not only working, but is seemingly more accurate than the other.
However, when I do this, despite them having the same variables, I get a "not found" message from the chip. Just doesn't end, does it?
Edit: original site is back up. Kind of annoying that it went down, but it's now back. I still like the second one better. Seems to be more reliable and gives more of the information I would like. Still no idea why it won't connect.
User avatar
By Oldbod
#55217 Don't know where the 'not found' is issued, but if you display the response from the wget you'll know if its to do with the response from the site or the processing done inside espbasic's json handling. or I suppose using debug should give you the same information with much less effort :)

The format returned by the two sites is different. Without reading the source code for espbasic (and I don't speak c++, so element of guesswork there!) I don't see why you should have an issue if that's what's causing it, but if you could try feeding the response in as a copy and paste to a variable rather than a wget, if you see what I mean....