Search found 81 matches

by guyd
Sun Aug 26, 2018 7:41 am
Forum: Programs, Libraries and Tools
Topic: update NTP to timezone
Replies: 7
Views: 18480

Re: update NTP to timezone

Hi,

thank you for pointing it out ( earlier ) - Since ESP has scheduled tasks, I altered the design that a main RPI send MQTT commands ( on schedule ) to activate ESP clients.

Guy
by guyd
Sat Aug 25, 2018 10:27 am
Forum: Programs, Libraries and Tools
Topic: update NTP to timezone
Replies: 7
Views: 18480

Re: update NTP to timezone

thank you. I understand what you did different than me, but this why ( without updating "RTC" )- I'll need to convert time every time I need. I wrote this : import ntptime import machine import utime ntptime.settime() rtc = machine.RTC() utc_shift = 3 tm = utime.localtime(utime.mktime(utime.localtim...
by guyd
Thu Aug 16, 2018 12:40 pm
Forum: Programs, Libraries and Tools
Topic: update NTP to timezone
Replies: 7
Views: 18480

Re: update NTP to timezone

Hi
That was my first try... but since I need utc +3, adding 3*3600 to given time, I get hour 24, 25 when day changes ( and without date update)
by guyd
Tue Aug 14, 2018 5:02 am
Forum: Programs, Libraries and Tools
Topic: update NTP to timezone
Replies: 7
Views: 18480

update NTP to timezone

Hi,
I'm using micropython on ESP32, and during boot ( main.py ), and enabling wifi connection, I use the following code to update time

Code: Select all

impoty ntptime
ntptime.settime()
How do I fix it to UTC+3 ?

Guy
by guyd
Sat Aug 04, 2018 2:59 pm
Forum: ESP32 boards
Topic: Connection fails to ESP32, with MicroPython 1.9.4 after uploading python code
Replies: 13
Views: 9121

Re: Connection fails to ESP32, with MicroPython 1.9.4 after uploading python code

perhaps I don't understand you answer- but I don't see how it is relevant for what I asked ( my english ? ;) ) If I am understanding your problem it is that your ESP32 is crashing during boot up and not getting a repl. Is this correct???? When Micro-Python starts up it executes boot.py during boot ...
by guyd
Sat Aug 04, 2018 6:39 am
Forum: ESP32 boards
Topic: Connection fails to ESP32, with MicroPython 1.9.4 after uploading python code
Replies: 13
Views: 9121

Re: Connection fails to ESP32, with MicroPython 1.9.4 after uploading python code

This how I do auto booting code. I only have a few things in boot.py that I have tested a lot and know work properly and I always want on all my boards. This is important because you can't control-C out of boot.py or if there is an error while running boot.py Micro-Python will crash. I put other co...
by guyd
Sat Aug 04, 2018 6:37 am
Forum: ESP32 boards
Topic: Connection fails to ESP32, with MicroPython 1.9.4 after uploading python code
Replies: 13
Views: 9121

Re: Connection fails to ESP32, with MicroPython 1.9.4 after uploading python code

Would it be feasible to have a means of making your code quit? Maybe poll a pin (defined as an input with a pull-up). If you ground the pin, the code performs a tidy shutdown and returns to the REPL. Another approach I have used is to detect the presence of a USB connection, with main.py running th...
by guyd
Sat Aug 04, 2018 3:57 am
Forum: ESP32 boards
Topic: Connection fails to ESP32, with MicroPython 1.9.4 after uploading python code
Replies: 13
Views: 9121

Re: Connection fails to ESP32, with MicroPython 1.9.4 after uploading python code

I don't understand your code. Unfortunately nobody else has responded. One thing I do remember seeing was along this line a while ago: don't add your code in boot.py. Add your code in main.py. Can you re-flash your dev board? the pupose of code is to switch up/down and electric window shade ( 3 sta...
by guyd
Fri Aug 03, 2018 6:01 pm
Forum: ESP8266 boards
Topic: Static IP
Replies: 4
Views: 4974

Re: Static IP

in station mode you can call ifconfig() to assign a static IP address. You can do that before calling connect(). So a suitable sequence of commands could be: wlan = network.WLAN(network.STA_IF) # create station interface wlan.active(True) # activate the interface wlan.ifconfig(("my_ip_address", "25...
by guyd
Fri Aug 03, 2018 10:13 am
Forum: ESP32 boards
Topic: MicroPython - ESP32 - Is is possible to update files?
Replies: 15
Views: 10021

Re: MicroPython - ESP32 - Is is possible to update files?

and after reflashing again ( other reasons :) ): got this" >>> import utelnetserver >>> utelnetserver.start() Telnet server started on 192.168.2.150:23 >>> Telnet connection from: ('192.168.2.101', 36718) Traceback (most recent call last): File "utelnetserver.py", line 81, in accept_telnet_connect O...