Search found 75 matches

by rpr
Fri Oct 04, 2019 11:01 pm
Forum: General Discussion and Questions
Topic: ESP32 access via Ipad
Replies: 13
Views: 1165

Re: ESP32 access via Ipad

AFAIK, the initial install of micropython on a bare esp32 and the initial webrepl setup can only be done via a direct serial/usb connnection. On linux this is usually /dev/ttyUSB0. On a Mac it could be something like /dev/cu.SLAB_USBtoUART or such. After Micropython is installed, again over the same...
by rpr
Wed Sep 25, 2019 6:28 pm
Forum: General Discussion and Questions
Topic: Converting given Epoch / Unix timestamp to GMT
Replies: 7
Views: 645

Re: Converting given Epoch / Unix timestamp to GMT

iotmar wrote:
Wed Sep 25, 2019 4:29 pm
I had no idea you could manipulate the outcome of the timestamp this way.
With Python, you can do anything. :)

Image

https://xkcd.com/353/
by rpr
Wed Sep 25, 2019 4:01 pm
Forum: General Discussion and Questions
Topic: Converting given Epoch / Unix timestamp to GMT
Replies: 7
Views: 645

Re: Converting given Epoch / Unix timestamp to GMT

Try:

Code: Select all

x = time.localtime(data_when["request"]["datetime"] - 946684800)
by rpr
Wed Sep 25, 2019 6:22 am
Forum: General Discussion and Questions
Topic: Converting given Epoch / Unix timestamp to GMT
Replies: 7
Views: 645

Re: Converting given Epoch / Unix timestamp to GMT

Code: Select all

# Following returns the time tuple taking into account the epoch start difference 1970 vs 2000
>>> x = time.localtime(isstime)
>>> print("%4d/%02d/%02d %02d:%02d:%02d " % x[:6])
2019/09/25 06:21:06
Not exactly your requested format but you could slice the tuple to achieve your desired print.
by rpr
Tue Sep 24, 2019 10:42 pm
Forum: General Discussion and Questions
Topic: Converting given Epoch / Unix timestamp to GMT
Replies: 7
Views: 645

Re: Converting given Epoch / Unix timestamp to GMT

From what I see there is no strftime in the libs that come with the default firmware. http://docs.micropython.org/en/latest/library/utime.html However, there is a separate micropython-lib called time which has the strftime which presumably can be installed via upip. https://github.com/micropython/mi...
by rpr
Mon Sep 23, 2019 12:08 am
Forum: General Discussion and Questions
Topic: Phase Mesurement with Pyboard up to 100 kHz
Replies: 5
Views: 447

Re: Phase Mesurement with Pyboard up to 100 kHz

There is the following article on the MicroPython Wiki:

https://github.com/peterhinch/micropyth ... /README.md

Maybe @pythoncoder (Peter Hinch) can add more information.
by rpr
Sat Sep 21, 2019 9:46 pm
Forum: ESP32 boards
Topic: Using BASH script to upload files
Replies: 27
Views: 1535

Re: Using BASH script to upload files

Does rshell work for you Ok running directly from the linux shell prompt?
by rpr
Sat Sep 21, 2019 7:18 am
Forum: ESP8266 boards
Topic: rshell not working on Mac OS
Replies: 8
Views: 507

Re: rshell not working on Mac OS

Can you see what is in your boot.py and main.py?
by rpr
Fri Sep 20, 2019 8:05 pm
Forum: General Discussion and Questions
Topic: A call to help me learn code the right way on MicroPhyton
Replies: 10
Views: 832

Re: A call to help me learn code the right way on MicroPhyton

One small step... :-) This small step is very important ! Congratulations... Python/MicroPython is a very powerful tool. It does have a small learning curve but once you get past you realize you can do a lot with it. Being able to just do prototype development interactively is a huge plus since you...
by rpr
Thu Sep 19, 2019 8:00 am
Forum: General Discussion and Questions
Topic: A call to help me learn code the right way on MicroPhyton
Replies: 10
Views: 832

Re: A call to help me learn code the right way on MicroPhyton

Hi Martin, Welcome!! I am enjoying my journey with MicroPython. Sure it is challenging but you can do a lot. To get started here is some code that I just wrote in MicroPython. File is called whereisiss.py # Make sure you have installed urllib.urequest as follows from within Micropython # >>> import ...