Search found 7 matches
- Mon Feb 16, 2015 11:42 pm
- Forum: General Discussion and Questions
- Topic: When/why did UART.send become UART.write?
- Replies: 2
- Views: 3544
When/why did UART.send become UART.write?
Was having some trouble sending data to an lcd today because of the AttributeError: 'UART' object has no attribute 'send'. Thinking that I'd screwed something up, it took me a long while to finally think to check a dir of the object I'd created: >>> import pyb >>> from pyb import UART >>> lcd = UART...
- Tue Jan 13, 2015 3:34 am
- Forum: MicroPython pyboard
- Topic: newbie needs help with wifi/wlan
- Replies: 13
- Views: 13320
Re: newbie needs help with wifi/wlan
I've found that if you pull the pins low (As shown below), the module will re-start cleanly. Without this I would get the "Could not initialize the CC3000 module" error nearly every time. <snip> pyb.Pin.board.Y3.low() pyb.Pin.board.Y4.low() pyb.Pin.board.Y5.low() nic = network.CC3K(pyb.SPI(2), pyb.P...
- Thu Nov 20, 2014 10:55 pm
- Forum: General Discussion and Questions
- Topic: Re-import module?
- Replies: 35
- Views: 40312
Re: Re-import module?
pfalcon,
It's like adding a compile/link step to an interpreted environment. Silly, when a new command ("reimport", maybe?) could be introduced if the time/date check was considered too ponderous.
OTOH, I suppose I could just read the file from disk, and eval/exec it. (Yuck!)
Oh well...
It's like adding a compile/link step to an interpreted environment. Silly, when a new command ("reimport", maybe?) could be introduced if the time/date check was considered too ponderous.
OTOH, I suppose I could just read the file from disk, and eval/exec it. (Yuck!)
Oh well...
- Thu Nov 20, 2014 7:19 pm
- Forum: General Discussion and Questions
- Topic: Re-import module?
- Replies: 35
- Views: 40312
Re: Re-import module?
(Apparently my replies are being deleted... WTF?) There's some misunderstanding here. The idea is to NOT, repeat NOT REBOOT, and be able to re-import an edited module. The steps involved should be as follows: 1. Module X gets imported. 2. A deficiency is found with module X. 3. Module X's code is ed...
- Thu Nov 20, 2014 2:09 am
- Forum: General Discussion and Questions
- Topic: Re-import module?
- Replies: 35
- Views: 40312
Re: Re-import module?
(My response obviously got lost somewhere, I'll try to re-accomplish it.)
Note I said "without rebooting". The desktop python environment does this by checking file creation time to see if it needs to re-interpret the file, perhaps micropython can do something like that.
Note I said "without rebooting". The desktop python environment does this by checking file creation time to see if it needs to re-interpret the file, perhaps micropython can do something like that.
- Wed Nov 19, 2014 9:40 pm
- Forum: General Discussion and Questions
- Topic: Re-import module?
- Replies: 35
- Views: 40312
Re: Re-import module?
That's what I've been doing, but it occurs to me that python on other systems allows modules to be re-imported (Based on timestamp), so it might be available here, too.
Or, if it isn't, perhaps it should be?
Or, if it isn't, perhaps it should be?
- Wed Nov 19, 2014 9:29 pm
- Forum: General Discussion and Questions
- Topic: Re-import module?
- Replies: 35
- Views: 40312
Re-import module?
You've written a module. You run it, and it's not quite right. Now, is there any way to re-import it instead of rebooting the board? Hmmm, the responses show a basic misunderstanding about the question, and for some reason I can't seem to post replies to this thread. Please note that the point of th...