Search found 36 matches

by Lornioiz
Thu May 11, 2017 9:11 am
Forum: ESP8266 boards
Topic: Can't get the servo SG90 working
Replies: 8
Views: 9072

Re: Can't get the servo SG90 working

Thank you all, that was the problem indeed. As I said, first time with servos.
I'm now using the great servo D1 mini shield from Deshipu... I'm now looking for a simple idea that can make use of a bunch of servos! ;)
by Lornioiz
Wed May 03, 2017 11:05 am
Forum: ESP8266 boards
Topic: Can't get the servo SG90 working
Replies: 8
Views: 9072

Can't get the servo SG90 working

Hi all, I dismantled a (working) SG90 servo from an old Arduino project and I tried to test it with Micropython. With the code provided in the website I was not able to make it work. Once I write these lines: from machine import Pin, PWM servo = PWM(Pin(14), freq=50, duty=77) servo.duty(30) servo.du...
by Lornioiz
Tue Apr 04, 2017 10:38 am
Forum: ESP8266 boards
Topic: MQTT and Timers exceptions
Replies: 3
Views: 4909

Re: MQTT and Timers exceptions

Would be nice if MQTT library included a timeout value. I do monkey patching: This code implements a 5 seconds timeout. Somebody should do a pull request for micropython-lib... Thank you for your answer. However, it may seems dumb to you as I'm just a beginner, but I thought that the problem was th...
by Lornioiz
Fri Mar 31, 2017 1:16 pm
Forum: ESP8266 boards
Topic: MQTT and Timers exceptions
Replies: 3
Views: 4909

MQTT and Timers exceptions

Hello, I was toying with mqtt and I got stuck when I introduced a timer to call the mqtt connection. This is what happens: if I call the mqtt object connect() method while the broker server is offline, I get an OSError exception. So far so good. However, I need my mcu to send a data report every fix...
by Lornioiz
Thu Jan 19, 2017 2:55 pm
Forum: ESP8266 boards
Topic: RuntimeError: maximum recursion depth exceeded
Replies: 11
Views: 12418

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 Lornioiz
Thu Jan 19, 2017 2:52 pm
Forum: ESP8266 boards
Topic: RuntimeError: maximum recursion depth exceeded
Replies: 11
Views: 12418

Re: RuntimeError: maximum recursion depth exceeded

I'd still be wary of file reads in an ISR. Rather than storing multiple files, have you considered storing a python object such as a dict or list in a single file using pickle or ujson? That way you can read the file once at the start and close it, accessing the various elements as required. This i...
by Lornioiz
Thu Jan 19, 2017 11:55 am
Forum: ESP8266 boards
Topic: RuntimeError: maximum recursion depth exceeded
Replies: 11
Views: 12418

Re: RuntimeError: maximum recursion depth exceeded

just another thing: do you know why the filesystem gets corrupted so easily if there are a lot of file in the root? last time it worked for 15 minutes... I think i found the reason why the filesystem was getting corrupted so easily. I have a couple of function that write on the filesystem, and I fo...
by Lornioiz
Thu Jan 19, 2017 11:10 am
Forum: ESP8266 boards
Topic: RuntimeError: maximum recursion depth exceeded
Replies: 11
Views: 12418

Re: RuntimeError: maximum recursion depth exceeded

I would probably avoid using a timer and just run a loop which achieves its timing like this: import utime while True: tstart = utime.ticks_ms() # do all your stuff delta = 150 - utime.ticks_diff(utime.ticks_ms(), tstart) if delta > 0: utime.sleep_ms(delta) Note I haven't actually tested this ;) Ma...
by Lornioiz
Thu Jan 19, 2017 9:39 am
Forum: ESP8266 boards
Topic: RuntimeError: maximum recursion depth exceeded
Replies: 11
Views: 12418

Re: RuntimeError: maximum recursion depth exceeded

You'll find flashbdev.py in the source tree esp826/modules. It would seem to be the low level driver for the flash memory - my guess is that the readblocks method is being called recursively perhaps owing to re-entrant code. When you change parameters is there a situation where a timer callback exe...
by Lornioiz
Wed Jan 18, 2017 4:13 pm
Forum: ESP8266 boards
Topic: RuntimeError: maximum recursion depth exceeded
Replies: 11
Views: 12418

RuntimeError: maximum recursion depth exceeded

Hello everyone, I keep having this error while I'm not using a recursive function (meaning that is not using recursion a function that I wrote myself, mybe I'm using some fuction that is recursive and I don't know). What my program does is as follow: every 150ms a timer calls a function. Everytime t...