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!
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...
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...
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...
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...
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...
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...
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...
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...
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...