Search found 39 matches

by lazarvgd
Sat Nov 03, 2018 10:48 am
Forum: ESP8266 boards
Topic: Strange behavior of time on ESP8266
Replies: 24
Views: 12383

Re: Strange behavior of time on ESP8266

@kevinkk525 I will add more prints in order to figure out how it behaves. @deonis I have used file named esp8266-20180511-v1.9.4.bin , downloaded from http://micropython.org/download . I cannot tell the uptime of the board since I did not observed that, but I have rebooted manually 2 times a day. So...
by lazarvgd
Fri Nov 02, 2018 5:50 pm
Forum: ESP8266 boards
Topic: Strange behavior of time on ESP8266
Replies: 24
Views: 12383

Re: Strange behavior of time on ESP8266

Here is the updated code, but still it doesn't work as expected. Please take a look at the code and tell me what am I doing wrong? import machine import network import time import ntptime import utime sta_if = network.WLAN(network.STA_IF) led = machine.Pin(2, machine.Pin.OUT) led.on() isupdated = Fa...
by lazarvgd
Wed Oct 31, 2018 9:46 am
Forum: ESP8266 boards
Topic: Strange behavior of time on ESP8266
Replies: 24
Views: 12383

Re: Strange behavior of time on ESP8266

I just added the if statement to polling time from NTP every hour, probably this will solve the problem.

Thanks for quick response. :)
by lazarvgd
Wed Oct 31, 2018 8:59 am
Forum: ESP8266 boards
Topic: Strange behavior of time on ESP8266
Replies: 24
Views: 12383

Strange behavior of time on ESP8266

Hi, I am using LoLin board in order to turn on/off my boiler, so that I can heat the water between 0000h and 0800h. The board is connected to wifi router. I am using ntptime library to obtain correct time and switching off and on pin is going ok when I want to control on minute base, for sake of tes...
by lazarvgd
Tue May 29, 2018 9:34 am
Forum: ESP8266 boards
Topic: Help to understand docs
Replies: 1
Views: 1768

Help to understand docs

Hi there, I have problem with docs, due to my misunderstanding or lack of information. The problem: I am reading this article http://micropython-iot-hackathon.readthedocs.io/en/latest/mqtt.html about setting up mqtt on esp8266, but what am I missing is the part when i need to upload wifi.py and mqtt...
by lazarvgd
Mon May 21, 2018 7:23 pm
Forum: ESP8266 boards
Topic: Is it possible to read current pin state
Replies: 1
Views: 2600

Is it possible to read current pin state

Hi there,

I am looking for feature in micropython so I can track output pins on esp8266 boards.

According to this answer it is possible to achieve in Arduino C, but does it work for mycropython? https://arduino.stackexchange.com/a/36350/34626

Thanks :)
by lazarvgd
Mon May 21, 2018 2:51 pm
Forum: ESP8266 boards
Topic: ESP8266 - micropython global variable does not work
Replies: 7
Views: 12784

Re: ESP8266 - micropython global variable does not work

the easy ways was to add global keyword in front of isLedOn variables inside onMessage method.
by lazarvgd
Mon May 21, 2018 7:31 am
Forum: ESP8266 boards
Topic: ESP8266 - micropython global variable does not work
Replies: 7
Views: 12784

Re: ESP8266 - micropython global variable does not work

[quote=torwag post_id=27751 time=1526827309 user_id=48] Hi, the problem is namespacing. The isledOn variable is defined once in the root name space and in functions. Thus, you actually have two different variables here, which simply have the same name. What you want to do, is to create a global vari...
by lazarvgd
Sun May 20, 2018 9:07 am
Forum: ESP8266 boards
Topic: ESP8266 - micropython global variable does not work
Replies: 7
Views: 12784

ESP8266 - micropython global variable does not work

Hi there, A few days ago I have flashed my ESP board and set up micropython. The first thing I have setup is temperature/humidity monitoring and led strip control over mqtt protocol. The problem for me was that I did not know whether am I leave led strip turned on or off, so I added flag(boolean) in...