Search found 11 matches
- Tue Apr 10, 2018 11:41 am
- Forum: General Discussion and Questions
- Topic: CPython/MicroPython returns different result of time.localtime()
- Replies: 2
- Views: 2441
Re: CPython/MicroPython returns different result of time.localtime()
Thanks for your reply. It is very interesting to know that differences. However I got Exceptions from REPL console by ESP8266 and Pyboard. PYB: soft reboot MicroPython v1.9.3-500-gbc3a5f19 on 2018-03-30; ESP module with ESP8266 Type "help()" for more information. >>> import time >>> time.UNIX_TIME T...
- Tue Apr 10, 2018 7:12 am
- Forum: General Discussion and Questions
- Topic: CPython/MicroPython returns different result of time.localtime()
- Replies: 2
- Views: 2441
CPython/MicroPython returns different result of time.localtime()
I am trying to make a NTP clock with MicroPython. And I ported Arduino's NTP library to MicroPython, since it returns identical timestamp as CPython does. Now I find CPython and MicroPython on ESP8266 returns different result when I try to convert timestamp into time strings. > python Python 3.6.5 (...
- Sun Apr 08, 2018 8:23 am
- Forum: MicroPython pyboard
- Topic: machine.Pin , pyb.Pin and pyb.ExtInt changes ?
- Replies: 2
- Views: 2393
- Sun Apr 08, 2018 2:31 am
- Forum: ESP8266 boards
- Topic: webrepl_setp throws OSError: [Errno 2] ENOENT
- Replies: 6
- Views: 5546
- Sun Apr 08, 2018 2:29 am
- Forum: MicroPython pyboard
- Topic: machine.Pin , pyb.Pin and pyb.ExtInt changes ?
- Replies: 2
- Views: 2393
machine.Pin , pyb.Pin and pyb.ExtInt changes ?
I browsed micropython's document http://docs.micropython.org/en/latest/pyboard/library/machine.Pin.html?highlight=irq#machine.Pin.irq . And I modified the code to run my pyboard. from machine import Pin p0 = Pin('X0', Pin.OUT) print("p0 = 0") p0.value(0) print("p0 = 1") p0.value(1) p2 = Pin('Y0', Pi...
- Mon Apr 02, 2018 2:12 am
- Forum: ESP8266 boards
- Topic: Simple_web_server.py can not get remote request
- Replies: 1
- Views: 1819
Simple_web_server.py can not get remote request
I tried two codebase, one from MicroPython's tutorial, called simple_web_server.py, with small modification for sta mode. import socket addr = socket.getaddrinfo('0.0.0.0', 80)[0][-1] def do_connect(): import network sta_if = network.WLAN(network.STA_IF) if not sta_if.isconnected(): print('connectin...
- Mon Apr 02, 2018 1:07 am
- Forum: ESP8266 boards
- Topic: webrepl_setp throws OSError: [Errno 2] ENOENT
- Replies: 6
- Views: 5546
Re: webrepl_setp throws OSError: [Errno 2] ENOENT
I got similar error report on a NodeMCU (ESP-12F) with 4MB. PYB: soft reboot #6 ets_task(40100130, 3, 3fff838c, 4) OSError: [Errno 2] ENOENT OSError: [Errno 2] ENOENT MicroPython v1.9.3-500-gbc3a5f19 on 2018-03-30; ESP module with ESP8266 Type "help()" for more information. >>> import webrepl >>> we...
- Mon Apr 02, 2018 1:00 am
- Forum: ESP8266 boards
- Topic: NodeMCU WebREPL doesn't work any more
- Replies: 2
- Views: 3274
Re: NodeMCU WebREPL doesn't work any more
Hi, Henrique, After erasing Flash with esp tool, the boot code is: # This file is executed on every boot (including wake-boot from deepsleep) #import esp #esp.osdebug(None) import gc import webrepl webrepl.start() gc.collect() And then I tried to entery >>> import webrepl_setup >>> webrepl.start() S...
- Mon Apr 02, 2018 12:48 am
- Forum: General Discussion and Questions
- Topic: How to transfer code properly via REPL paste mode?
- Replies: 3
- Views: 4972
Re: How to transfer code properly via REPL paste mode?
Thanks, @pythoncoder, Your answer is very helpful, I can not wait to try out rshell. Actually I tried WebREPL and command line at first, but for some unknown reason, now WebREPL keeps me trying to "import webreply_setup", and refuse to start webrepl anyway. So that's why I tried to use Ctrl-E, to pa...
- Fri Mar 30, 2018 11:45 am
- Forum: General Discussion and Questions
- Topic: How to transfer code properly via REPL paste mode?
- Replies: 3
- Views: 4972
How to transfer code properly via REPL paste mode?
MicroPython code deployment is different in various boards. For some reason, My ESP8266 doesn't work any more for webREPL, even I reflash the stable firmware time by time. And I have to test the code via serial. It is possible to paste the code via REPL, and save the pasted code string into a file i...