Search found 37 matches

by Christian Walther
Tue May 21, 2019 8:54 pm
Forum: Other Boards
Topic: STM32L476: can´t convert int object to str implicitly
Replies: 3
Views: 64

Re: STM32L476: can´t convert int object to str implicitly

I’m not totally sure because my experience with them is limited, but it would seem that on STM32 platforms, the pins are named by strings like "A0", not by numbers like on the ESP platforms. See http://docs.micropython.org/en/latest/pyboard/quickref.html , and pin9 = Pin('B1', Pin.IN) works on my Py...
by Christian Walther
Sun May 19, 2019 12:48 pm
Forum: ESP8266 boards
Topic: how to plot?
Replies: 6
Views: 125

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: 314

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: 314

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: 314

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: 314

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: 120

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: 185

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...