Search found 7 matches

by tallyboy91
Wed Aug 31, 2016 2:39 pm
Forum: WiPy and CC3200 boards
Topic: Losing the REPL when an IRQ is triggered
Replies: 49
Views: 51667

Re: Losing the REPL when an IRQ is triggered

This is exhibiting the same behavior: from machine import Pin led=Pin('GP16', Pin.OUT) pin_int = Pin('GP17', Pin.IN, Pin.PULL_UP) def pincb(pin): global led led.toggle() pin_int.irq(trigger=Pin.IRQ_FALLING, handler=pincb) I also tried a return in pincb but that did not work either. Thanks, aw
by tallyboy91
Wed Aug 31, 2016 1:21 pm
Forum: WiPy and CC3200 boards
Topic: Pre-Compiled files using more memory?
Replies: 11
Views: 13220

Re: Pre-Compiled files using more memory?

Great information! I need to start compiling a list of these kind of tips/optimizations.
by tallyboy91
Wed Aug 31, 2016 2:58 am
Forum: WiPy and CC3200 boards
Topic: Losing the REPL when an IRQ is triggered
Replies: 49
Views: 51667

Re: Losing the REPL when an IRQ is triggered

Has anyone definitively gotten this to work on the WiPy? I'm using the expansion board with this code: from machine import Pin def pincb(pin): print("callback") return pin_int = Pin('GP17', Pin.IN, Pin.PULL_UP) pin_int.irq(trigger=Pin.IRQ_FALLING, handler=pincb) What's weird is that about 1 out of e...
by tallyboy91
Tue Aug 30, 2016 6:09 pm
Forum: Development of MicroPython
Topic: How do I load precompiled python scripts?
Replies: 4
Views: 11170

Re: How do I load precompiled python scripts?

I'm certainly not an expert but have gotten this to work. Basically need the micropython source code https://github.com/micropython/micropython and compile mpy-cross - https://github.com/micropython/micropython/tree/master/mpy-cross You'll also need to recompile MP and flash to your device; for the ...
by tallyboy91
Tue Aug 30, 2016 1:02 pm
Forum: WiPy and CC3200 boards
Topic: Pre-Compiled files using more memory?
Replies: 11
Views: 13220

Re: Pre-Compiled files using more memory?

@Roberthh Thanks! This is great information and completely makes sense. Currently, I'm using code for weather related sensors that has been ported over from the AdaFruit python code. It seems to me that the way to go is to first make sure that code works correctly. Then "optimize" it by removing any...
by tallyboy91
Mon Aug 29, 2016 11:46 pm
Forum: WiPy and CC3200 boards
Topic: Pre-Compiled files using more memory?
Replies: 11
Views: 13220

Re: Pre-Compiled files using more memory?

It's been one of those days... I wanted to get some concrete numbers on the differences and ran into problems where importing a module would only show module.__name__. Then I wasn't paying attention and blew away my main.py file without a backup of course :evil: Anyway, to answer your question, I ha...
by tallyboy91
Sun Aug 28, 2016 9:30 pm
Forum: WiPy and CC3200 boards
Topic: Pre-Compiled files using more memory?
Replies: 11
Views: 13220

Pre-Compiled files using more memory?

Yesterday I ran into memory allocation failed issues. My understanding is that pre-compiling the modules would help alleviate those issues. So, I made the modifications to the code as mentioned here (https://forum.micropython.org/viewtopic.php?t=1962 ), compiled and flashed the WiPy successfully. I ...