Search found 647 matches
- Fri Oct 17, 2014 10:40 pm
- Forum: General Discussion and Questions
- Topic: OSError: [Errno 5]
- Replies: 28
- Views: 28814
Re: OSError: [Errno 5]
I've just improved the stream reading code so that it uses less RAM. Before, if you did read(2048), then it allocated 2048 bytes of RAM from the heap, read into this buffer, then allocated a new buffer of 2049 bytes (one extra for the null terminator), copied the data across, then freed the first bu...
- Thu Oct 16, 2014 10:07 pm
- Forum: General Discussion and Questions
- Topic: OSError: [Errno 5]
- Replies: 28
- Views: 28814
Re: OSError: [Errno 5]
No, unfortunatelly there is no way to defragment memory. It's designed to be ok (ie not need defragmentation) for small objects like floats, short lists and tuples, etc. But for large (kb) buffers, you are best pre-allocating them. You can see what the current state of the heap is by running: pyb.in...
- Sun Oct 05, 2014 12:36 am
- Forum: Development of MicroPython
- Topic: Build broken with MICROPY_HW_ENABLE_CC3K
- Replies: 2
- Views: 3656
Re: Build broken with MICROPY_HW_ENABLE_CC3K
CC3000 support is now in master, but you need to enable the config setting in mpconfigport.mk. There are firmware builds with network drivers available at micropython.org/download.
- Wed Oct 01, 2014 10:51 pm
- Forum: General Discussion and Questions
- Topic: Getting "disk not ejected properly" in OSX
- Replies: 33
- Views: 33095
Re: Getting "disk not ejected properly" in OSX
Thanks guys for finding and working out the cause of this bug, and Dave for fixing it.
The fix is now in the master branch, and firmware with the fix will be available from micropython.org/download, dates 2014-10-02 onwards.
The fix is now in the master branch, and firmware with the fix will be available from micropython.org/download, dates 2014-10-02 onwards.
- Tue Aug 12, 2014 10:56 am
- Forum: General Discussion and Questions
- Topic: Safe Mode always shows Internal Flash even with an SD Card
- Replies: 5
- Views: 6077
Re: Safe Mode always shows Internal Flash even with an SD Ca
I agree with Markus that it would make sense to show the SD card to the PC as the mass storage device, even in "safe mode". "Safe mode" would then mean: boot up as normal but don't execute any scripts. "Safe mode" was intended primarily so you can edit boot.py if you put something wrong in, or want ...
- Mon Aug 04, 2014 8:09 am
- Forum: Development of MicroPython
- Topic: UART Receive Problem
- Replies: 2
- Views: 4947
Re: UART Receive Problem
As dhylands say, it's timing out because 4 characters were not available. To check for a timeout you can do: try: c = uart.recv(1) except: print('timeout') This will work for getting 1 character, but if you want to get more than 1 you will need to put the above in a loop. We'll work on this problem ...
- Mon Jul 21, 2014 10:25 pm
- Forum: Kickstarter logistics for the Micro Python campaign
- Topic: PyBoards for post-kickstarter orders soon?
- Replies: 5
- Views: 75607
Re: PyBoards for post-kickstarter orders soon?
We have a large number of people interested in getting a pyboard post-KS. We have a web shop which is currently only accessible to those who signed up early on after the Kickstarter. Gradually, we are opening this shop to more and more people so that we can deal with the demand, and it is currently ...
- Wed Jun 04, 2014 3:25 pm
- Forum: General Discussion and Questions
- Topic: Other new Python implementations
- Replies: 5
- Views: 5797
Re: Other new Python implementations
The comments on Pyston announcement seem more negative than positive. People complaining that it's Python 2.7 and not Python 3; people saying that it's too difficult and been tried before; people saying they should use a different (and more easily optimised) laguage.
- Mon May 19, 2014 7:36 pm
- Forum: MicroPython pyboard
- Topic: testing pyboard DAC
- Replies: 13
- Views: 20292
Re: testing pyboard DAC
Okay, I tested using both DACs at the same time, using write_timed, and it works! The limitation is that they must run at the same frequency. For example, doing: from pyb import DAC dac1 = DAC(1) dac2 = DAC(2) buf1 = bytearray(128 + x for x in range(10)) buf2 = bytearray(128 - x for x in range(20)) ...
- Mon May 19, 2014 6:21 pm
- Forum: MicroPython pyboard
- Topic: testing pyboard DAC
- Replies: 13
- Views: 20292
Re: testing pyboard DAC
Thanks for the bug report. I have now fixed the DAC(2) problem (it was linking to the DMA incorrectly). I also fixed the documentation regarding casting to an int to store into the bytearray buffer. Re the dual-modulated-triangle output: it could be that you are doing write_timed and triangle at the...