Search found 9 matches

by pipponefrancone
Fri Oct 23, 2020 12:54 pm
Forum: General Discussion and Questions
Topic: Running blocking code in timers
Replies: 1
Views: 96

Running blocking code in timers

Hello everyone, Whenever I try running a timer that takes as callback a function containg blocking code in it, the whole repl freezes and does not let me enter any word. Ex.: from machine import Timer def handler(timer): time.sleep(1) print('hello') x = Timer(0) x.init(period=1000, mode=1, callback=...
by pipponefrancone
Fri Oct 23, 2020 8:53 am
Forum: General Discussion and Questions
Topic: Issue with a timer callback
Replies: 5
Views: 232

Re: Issue with a timer callback

That's very interesting, thank for your help!
I would also like to ask another question about timers, should I add it here or crate a new thread? Sorry I'm not very familiar with forums :?
by pipponefrancone
Wed Oct 21, 2020 11:32 am
Forum: General Discussion and Questions
Topic: Issue with a timer callback
Replies: 5
Views: 232

Re: Issue with a timer callback

Yes the function only takes the self parameter, I totally forgot to add one for the timer instance.
jimmo wrote:
Tue Oct 20, 2020 10:21 pm

Code: Select all

  def mymethod(self, timer):
      print('hello')
This solves it, thank you. But what if I want to pass other parameters? :)
by pipponefrancone
Tue Oct 20, 2020 9:15 pm
Forum: General Discussion and Questions
Topic: Issue with a timer callback
Replies: 5
Views: 232

Issue with a timer callback

Hello there, I am trying to use an object's method as a timer callback: #creating a new object a >>> a = test() >>> a.mymethod <bound_method> >>> timer = Timer(0) >>> timer.init(period=50, mode=1, callback=a.mymethod) At this point, each time the timer runs it gives me this error: TypeError: functio...
by pipponefrancone
Thu Sep 17, 2020 9:50 pm
Forum: General Discussion and Questions
Topic: board to board websocket communication
Replies: 0
Views: 741

board to board websocket communication

Hello (again)! I am trying to make an esp8266 talk to an esp32 using a softAP (no internet available). I am using the esp32 as the AP to wich the esp8266 connects to, and I am trying to use sockets to enstablish a fast comunication. I can successfully connect the esp8266 to the esp32 AP using those ...
by pipponefrancone
Thu Sep 17, 2020 5:32 pm
Forum: General Discussion and Questions
Topic: Some questions about micropython speed
Replies: 9
Views: 836

Re: Some questions about micropython speed

jimmo wrote:
Tue Sep 15, 2020 11:24 pm
Edit: ulab does support matrix multiply -- https://micropython-ulab.readthedocs.io ... b.html#dot it just doesn't support the @ operator.
Oh How did i miss that :? Thank you!
by pipponefrancone
Tue Sep 15, 2020 8:11 pm
Forum: General Discussion and Questions
Topic: Some questions about micropython speed
Replies: 9
Views: 836

Re: Some questions about micropython speed

Are you saying you noticed no performance difference moving from the matrix maths being implemented in Python to moving to ulab's implementation? That's surprising!! Would be interested to see measurements, but I guess that suggests that your time is entirely being spent somewhere else. I am 100% d...
by pipponefrancone
Sun Sep 13, 2020 5:12 pm
Forum: General Discussion and Questions
Topic: Some questions about micropython speed
Replies: 9
Views: 836

Re: Some questions about micropython speed

First of all I would like to thank you all for the super fast support that I received. :D - if you stick with ESP32 : * oficial MicroPython uses as default clock at 160 MHz, so change to 240 MHz -> speed increases about 50%; * use ESP32 board without PSRAM, or a MicroPython firmware without PSRAM su...
by pipponefrancone
Sat Sep 12, 2020 6:30 pm
Forum: General Discussion and Questions
Topic: Some questions about micropython speed
Replies: 9
Views: 836

Some questions about micropython speed

Hello everybody! :) I've discovered micropython a few weeks ago and I am just loving it! I've recently been working on a hexapod robot and I am currently controlling it with a rasberry pi. Since the code is writted in python and I want the robot to be wirelessly controlled, I thought that a esp32 ru...