Search found 55 matches

by Christian Walther
Sun May 19, 2019 12:48 pm
Forum: ESP8266 boards
Topic: how to plot?
Replies: 7
Views: 349

Re: how to plot?

Any reason why you need to use MicroPython rather than CPython (“real Python” as you call it) on the laptop? And if you do, then there is no ESP8266 involved, so why are you posting in the ESP8266 forum? I suspect this is not what you want to do at all. Rather, I guess what you want to do is somethi...
by Christian Walther
Sat May 18, 2019 7:21 pm
Forum: ESP8266 boards
Topic: send HTTP Request ESP8266
Replies: 16
Views: 889

Re: send HTTP Request ESP8266

Now there’s one slash too many in the other place, maybe your browser is smart enough to strip that but urequests isn’t? Try urequests.get('http://192.168.137.1:80/info.php?request=sam') Since it looks like this is a web server running on your local network, you could also take a look at its logs an...
by Christian Walther
Sat May 18, 2019 5:38 pm
Forum: ESP8266 boards
Topic: send HTTP Request ESP8266
Replies: 16
Views: 889

Re: send HTTP Request ESP8266

I flashed my esp8266 and now I can see urequests there with the get function : Glad we got that one solved! >>> response = urequests.get('http:/192.168.137.1:80/info.php?requests=sam') I don’t know if that’s the source of the error, but you’re missing a slash in that URL. Should be http://192... . ...
by Christian Walther
Sat May 18, 2019 9:29 am
Forum: ESP8266 boards
Topic: send HTTP Request ESP8266
Replies: 16
Views: 889

Re: send HTTP Request ESP8266

>>> help(urequests) object <module 'urequests'> is of type module __name__ -- urequests __path__ -- /lib/urequests >>> So you’re not getting the built-in module, but one from the filesystem. I can think of two possible reasons for that. 1. You don’t have the built-in module, so you must be running ...
by Christian Walther
Fri May 17, 2019 9:34 pm
Forum: ESP8266 boards
Topic: send HTTP Request ESP8266
Replies: 16
Views: 889

Re: send HTTP Request ESP8266

Note that in the stable release esp8266-20190125-v1.10.bin , urequests is built-in, so when you say import urequests , you are getting that one, not the one on the filesystem, unless you changed sys.path . I don’t know why it doesn’t have a get function for you though, it does for me. What does help...
by Christian Walther
Sun Mar 24, 2019 10:02 pm
Forum: ESP8266 boards
Topic: Yielding control - WDT
Replies: 2
Views: 217

Re: Yielding control - WDT

None is needed. MicroPython does that automatically in between executing Python instructions.

Are you having a specific problem that is triggering the WDT, or are you just asking out of curiosity?
by Christian Walther
Tue Mar 19, 2019 12:24 pm
Forum: ESP8266 boards
Topic: thingSpeak/ESP8266_convert Str=> Int
Replies: 2
Views: 287

Re: thingSpeak/ESP8266_convert Str=> Int

"field1={:.1f}\n" + int(k) You are trying to add a string and an integer here, which does not work (it can’t tell whether you mean string concatenation or number addition). Judging from the format placeholder in the string, what you probably meant is "field1={:.1f}\n".format(int(k)) To find such pr...
by Christian Walther
Sun Mar 10, 2019 12:54 pm
Forum: General Discussion and Questions
Topic: esp8266 not booting
Replies: 18
Views: 694

Re: esp8266 not booting

Glad you got it solved! :)
by Christian Walther
Sun Mar 10, 2019 11:32 am
Forum: General Discussion and Questions
Topic: esp8266 not booting
Replies: 18
Views: 694

Re: esp8266 not booting

nagylzs wrote:
Sun Mar 10, 2019 11:17 am
It is never executed by the interpreter

this main.py file
You are contradicting yourself here. If the file is named main.py, then it is executed by the interpreter. Which of the two is it?