Search found 17 matches

by ikkeT
Sun Jun 20, 2021 11:42 am
Forum: General Discussion and Questions
Topic: unregister interrupt handler (callback)?
Replies: 1
Views: 879

unregister interrupt handler (callback)?

Hi,

I was wondering if I know there is surge of interrupts coming due edge triggering, and I'd like to ignore those for the time being, could I somehow unregister the callback, end register it back later?

So far I only found a way to register callback.

BR,
ikke
by ikkeT
Sun Apr 25, 2021 7:15 pm
Forum: General Discussion and Questions
Topic: Help needed for beginner - memory alloc and classes
Replies: 12
Views: 4387

Re: Help needed for beginner - memory alloc and classes

Whoa, I cross compiled mpy-cross, and converted fonts and mopo.py into mpy, and now it starts with bigger font too! Progress, still wondering if I do something wrong adding the two instances of Writer with different fonts at here: https://github.com/ikke-t/mopo/blob/510456a6761e4d6d6a8843f7761d52626...
by ikkeT
Sun Apr 25, 2021 5:17 pm
Forum: General Discussion and Questions
Topic: Help needed for beginner - memory alloc and classes
Replies: 12
Views: 4387

Re: Help needed for beginner - memory alloc and classes

Thanks, moving imports into Display.__init__() seems to be the right place. I also added the memory debugs. Seems that there is roughly 37kB of memory on the the device, adding together the gc.mem_alloc and gc.mem_free. It loads now if I don't load in the the second font. As soon if I import either ...
by ikkeT
Mon Apr 19, 2021 6:41 pm
Forum: General Discussion and Questions
Topic: Help needed for beginner - memory alloc and classes
Replies: 12
Views: 4387

Re: Help needed for beginner - memory alloc and classes

I got error saying ssd1306 is unknown variable when I had the import at the beginning of class Display(). Once I moved the imports to beginning of the file, the ssd1306 complaint went away. So it didn't work until I removed from import from: class Display(): """Output information on SSd1306 oled dis...
by ikkeT
Mon Apr 19, 2021 6:16 pm
Forum: General Discussion and Questions
Topic: Help needed for beginner - memory alloc and classes
Replies: 12
Views: 4387

Re: Help needed for beginner - memory alloc and classes

thanks stijn, same thing I didn't notice your tip as I had not refreshed the screen. Good point about measuring the mem once in a while. I try.
by ikkeT
Mon Apr 19, 2021 6:15 pm
Forum: General Discussion and Questions
Topic: Help needed for beginner - memory alloc and classes
Replies: 12
Views: 4387

Re: Help needed for beginner - memory alloc and classes

probably found the reason by commenting out bit by bit. Is it so that one can't do the import from within the class?
by ikkeT
Mon Apr 19, 2021 5:55 pm
Forum: General Discussion and Questions
Topic: Help needed for beginner - memory alloc and classes
Replies: 12
Views: 4387

Re: Help needed for beginner - memory alloc and classes

The error is somehow related to Display class. If I comment those parts out, and use print() instead, it won't crash.
by ikkeT
Mon Apr 19, 2021 5:03 pm
Forum: General Discussion and Questions
Topic: Help needed for beginner - memory alloc and classes
Replies: 12
Views: 4387

Help needed for beginner - memory alloc and classes

Hi, I wrote this piece of code that implements small driving computer for moped with originally broken display. It get's speed from hall sensor, and ignition from capacitive wire from spark plug. Before I refactored from my scratch code into cleaner python class code it worked somewhat. But now afte...
by ikkeT
Sat Apr 03, 2021 9:14 pm
Forum: General Discussion and Questions
Topic: web page with cauges and info
Replies: 0
Views: 826

web page with cauges and info

Hi, I have been building simple moped computer with my son using micropython on NodeMCU. One of the old boards I had in my box, with esp8266. I had small display on it. But now we'd like to get rid of the display, and use mobile instead. Any recommendations how to create a web page that would pull s...
by ikkeT
Wed Mar 24, 2021 7:09 pm
Forum: General Discussion and Questions
Topic: array not supporting item assignment - pylint
Replies: 5
Views: 2197

Re: array not supporting item assignment - pylint

thanks for confirmation, then I know it's just pylint detecting false errors.