Search found 1213 matches

by Roberthh
Tue Jan 24, 2017 7:59 pm
Forum: ESP8266 boards
Topic: LCD 1602 - Library
Replies: 26
Views: 14769

Re: LCD 1602 - Library

Just since that effect caused me some minutes of head scratching: if the device ha a reset input - is that pulled high?
by Roberthh
Mon Jan 23, 2017 6:12 am
Forum: General Discussion and Questions
Topic: str.splitlines() with MicroPython?
Replies: 5
Views: 1905

Re: str.splitlines() with MicroPython?

Whether splitlines is supported depend on the platform. Splitlines works in the Unix and PyBoard version, but not in the esp8266 build. It depends on the setting of MICROPY_PY_BUILTINS_STR_SPLITLINES, which has to be enabled in the build configuration.
by Roberthh
Sun Jan 22, 2017 7:24 pm
Forum: Programs, Libraries and Tools
Topic: Getting a REPL prompt via UART instead of via USB
Replies: 5
Views: 2011

Re: Getting a REPL prompt via UART instead of via USB

For PyBoard, use pyb.repl_uart. An example is here: http://docs.micropython.org/en/latest/p ... =repl_uart

or os.dupterm()

Code: Select all

from pyb import UART
import os

uart = UART(0, baudrate=115200)
os.dupterm(uart)
by Roberthh
Sun Jan 22, 2017 3:42 pm
Forum: General Discussion and Questions
Topic: str.splitlines() with MicroPython?
Replies: 5
Views: 1905

Re: str.splitlines() with MicroPython?

Code: Select all

[b'\n1000\n999\n'.split(b'\n')
reveals

Code: Select all

[b'', b'1000', b'999', b'']
by Roberthh
Sun Jan 22, 2017 12:16 pm
Forum: General Discussion and Questions
Topic: Filesystem and write durability
Replies: 6
Views: 1702

Re: Filesystem and write durability

A quick look in the docs reveals the appropriate methods of the esp module:
http://docs.micropython.org/en/latest/e ... hlight=esp
by Roberthh
Thu Jan 19, 2017 4:26 pm
Forum: ESP8266 boards
Topic: RuntimeError: maximum recursion depth exceeded
Replies: 11
Views: 3601

Re: RuntimeError: maximum recursion depth exceeded

that means that once one operation (like writing a file) is interrupted by, let's say, a read operation, it cannot be resumed and therefore the filesistem gets corrupted? Yes, that's what I have seen. If one call changes global data of the FAT file system, it will be efective also for the interrute...
by Roberthh
Thu Jan 19, 2017 12:25 pm
Forum: ESP8266 boards
Topic: RuntimeError: maximum recursion depth exceeded
Replies: 11
Views: 3601

Re: RuntimeError: maximum recursion depth exceeded

What I said above makes any sense to you? It does. During my work on the ftp server I oberved that concurrent system calls, especially on the filesystem, brings trouble. You situation is similar. The firmware does not seem to be reentrant. The is a compiler switch in the FAT module, but as far as I...
by Roberthh
Thu Jan 19, 2017 8:01 am
Forum: ESP8266 boards
Topic: μs timing for pins
Replies: 6
Views: 1627

Re: μs timing for pins

In my previous test on Pyboard, viper took about two times longer than assembler, mostly becaus it does not keep local values in registers. That is still very good. In this example I guess that the limiting factor is the port access, which seems to be timed to ensure proper signals.
by Roberthh
Wed Jan 18, 2017 7:35 pm
Forum: ESP8266 boards
Topic: μs timing for pins
Replies: 6
Views: 1627

Re: μs timing for pins

In this toggle test i used also an assembler version, which was not faster, but far less readable. def loop(): import machine machine.Pin(4, machine.Pin.OUT, value=0) do_loop() print("loop done") @micropython.asm_xtensa def do_loop(): movi(a2, 0x60000300) # GPIO Base address movi(a5, 0x10) # set/cle...
by Roberthh
Wed Jan 18, 2017 6:19 am
Forum: ESP8266 boards
Topic: Flashing micropython on Wemos D1 Mini Pro
Replies: 33
Views: 22755

Re: Flashing micropython on Wemos D1 Mini Pro

For what I've found, esptool is not the problem. It's Python code, and can easily be extended to support 16MByte flash size. I did that for trial. The problem is the espressif library code, which is part of the firmware, and refuses to deal with the larger flash size & setting. Th esource it not ava...