Search found 317 matches

by kevinkk525
Sun Feb 24, 2019 4:49 pm
Forum: ESP8266 boards
Topic: How to disable autoconnect ("no ap found, reconnect after 1s")?
Replies: 1
Views: 118

Re: How to disable autoconnect ("no ap found, reconnect after 1s")?

Just disable the wifi interface completely.
by kevinkk525
Sun Feb 24, 2019 4:49 pm
Forum: General Discussion and Questions
Topic: uasyncio enhancement
Replies: 3
Views: 155

Re: uasyncio enhancement

Thanks for your work Peter, this looks awesome!

If I understand it correctly, the cancel works immediately now but the coro stays in the waitq until it is scheduled and will then be ignored.
by kevinkk525
Fri Feb 22, 2019 10:01 pm
Forum: General Discussion and Questions
Topic: Wanting to send data with different intervals
Replies: 10
Views: 238

Re: Wanting to send data with different intervals

Yeah sorry about that, forgot to reset the timers. You need the last sleep statement to prevent a "buys loop" (look it up) that uses all CPU time. Of course the pi only supports time.sleep, not time.sleep_ms. Re internet: If you run a mqtt broker like mosquitto on your raspberry pi, you don't need t...
by kevinkk525
Fri Feb 22, 2019 8:59 pm
Forum: General Discussion and Questions
Topic: Wanting to send data with different intervals
Replies: 10
Views: 238

Re: Wanting to send data with different intervals

time.ticks_ms is a method only available in micropython, not on your pi. on your pi you can use time.time() which returns seconds so you have to replace the 3000ms in my example with 3s. I would not disconnect because this way you could keep track of whether the device is still connected or not. You...
by kevinkk525
Fri Feb 22, 2019 7:30 pm
Forum: General Discussion and Questions
Topic: Wanting to send data with different intervals
Replies: 10
Views: 238

Re: Wanting to send data with different intervals

You might be right. You can do something like this: last_task1=time.ticks_ms() last_task2=time.ticks_ms() while True: if time.ticks_ms()-last_task1>=3000: # publish data of task1 every 3 seconds c.publish(...) if time.ticks_ms()-last_task2>=8000: # publish data of task2 every 8 seconds c.publish(......
by kevinkk525
Fri Feb 22, 2019 5:56 pm
Forum: General Discussion and Questions
Topic: Wanting to send data with different intervals
Replies: 10
Views: 238

Re: Wanting to send data with different intervals

You could learn about using the uasyncio module in micropython for asnyc programming. A CPython tutorial can be found here https://realpython.com/async-io-python/ An awesome tutorial for the corresponding uasyncio module on micropython can be found here: https://github.com/peterhinch/micropython-asy...
by kevinkk525
Tue Feb 19, 2019 1:33 pm
Forum: ESP8266 boards
Topic: Designing resilient IOT applications
Replies: 8
Views: 539

Re: Designing resilient IOT applications

As the server is designed to run on micropython too, it should be possible to run the server on the es8266. You would however have to make sure that the connection to the Wifi is handled. I could imagine that it works if you run the client application on it too but connected to the server running on...
by kevinkk525
Mon Feb 18, 2019 9:35 am
Forum: ESP8266 boards
Topic: ESP8266/MicroPython-Copy data from terminal to file
Replies: 7
Views: 423

Re: ESP8266/MicroPython-Copy data from terminal to file

I created a little logging program that puts the time in front of the device output. If you are interest I can post it. Or actually it is already here: https://github.com/kevinkk525/micropython_iot_generic/blob/master/_testing/cpython/client_logger.py Just have to adapt it to not write something to ...
by kevinkk525
Sat Feb 16, 2019 8:45 am
Forum: ESP8266 boards
Topic: [Solved] NodeMCU boot loop after fresh install
Replies: 8
Views: 231

Re: [Solved] NodeMCU boot loop after fresh install

I did see the same error messages on my boards under certain circumstances but can't remember when. When I do, I'll tell you.

As it is the same with lua it might be a faulty batch or some electrical problem.