Search found 42 matches
- Sat Jul 23, 2016 8:16 am
- Forum: MicroPython pyboard
- Topic: Can be stored data inside non volative memory ?
- Replies: 35
- Views: 34976
Re: Can be stored data inside non volative memory ?
bram[0] = len(inBuffer) ba[4: 4+len(inBuffer)] = inBuffer # To retrieve bt = bytes(ba[4:4+bram[0]]) Sorry if this is a silly question but I was reading the documentation for your micropower module because I'm interested in being able to store a few strings into the 4kb RAM and there's one thing tha...
- Fri Jul 22, 2016 1:33 pm
- Forum: MicroPython pyboard
- Topic: New build seems to have killed my Pyboard (now fixed)
- Replies: 23
- Views: 17788
Re: New build seems to have killed my Pyboard (now fixed)
I was having the same problem when I tried to update my Pyboard: the red, orange and blue LEDs were faintly lit and it was unresponsive. Turns out I download firmware for the Pyboard and not the PYBLITE, the PYBLITE being the one I own :lol: Thankfully I had made a backup of my previous firmware: I ...
- Wed Jul 13, 2016 11:11 am
- Forum: General Discussion and Questions
- Topic: MicroPython round() Function
- Replies: 20
- Views: 26274
Re: MicroPython round() Function
pythoncoder you're absolutely right, you're missing nothing here. I made a horrible mistake in my post, thanks for correcting it.
- Tue Jul 12, 2016 5:06 pm
- Forum: MicroPython pyboard
- Topic: Converting a byte_array to signed int
- Replies: 2
- Views: 8641
Re: Converting a byte_array to signed int
Sorry for the late reply, Internet was down. Thanks that did the job perfectly!
- Sun Jul 10, 2016 9:26 am
- Forum: MicroPython pyboard
- Topic: Converting a byte_array to signed int
- Replies: 2
- Views: 8641
Converting a byte_array to signed int
Hello, I'm reading a 16-bit value from two consecutive registers on a sensor and I've put them into one variable by typing data = bytearray(i2c.mem_read(2, addr, mem_addr)) and I want to turn this into a signed integer. The order in which I'm reading the values defines data's endianness as little. S...
- Sat Jul 02, 2016 8:29 pm
- Forum: MicroPython pyboard
- Topic: Setting the sys.stdout to a text file
- Replies: 7
- Views: 9001
Re: Setting the sys.stdout to a text file
No worries. I figured it out at the end. I'm sorry but I forgot to mention that the code was inside a file other than my main.py file, a sort of initialization file if you will. As a first fix-around I decided to open the file in both my main.py and initialization.py files, but that didn't work. The...
- Sat Jul 02, 2016 10:48 am
- Forum: MicroPython pyboard
- Topic: Setting the sys.stdout to a text file
- Replies: 7
- Views: 9001
Re: Setting the sys.stdout to a text file
My Pyboard has 48kb of flash which is why I'm using a 1GB SD card. Do I have to specify the output.txt file's location as being "/sd/output.txt"? When I got my Pyboard I wrote a small program that turned the LEDs on and off. Later when I needed to expand my storage, I backed up all of the files on m...
- Sat Jul 02, 2016 9:27 am
- Forum: MicroPython pyboard
- Topic: Setting the sys.stdout to a text file
- Replies: 7
- Views: 9001
Re: Setting the sys.stdout to a text file
Ok. I wrote: output = open("output.txt", "w") and replaced every print() statement with output.write() My program runs into OSError 22 at line 156 where I wrote: output.write("\n") I tried specifying that the newline is '\n' by writing: output = open("output.txt", "w", newline = '\n') but I got this...
- Sat Jul 02, 2016 7:42 am
- Forum: MicroPython pyboard
- Topic: Setting the sys.stdout to a text file
- Replies: 7
- Views: 9001
Setting the sys.stdout to a text file
Hello, the title is pretty straightforward, what I want to do is print matrices in a table format onto a text file. So far I've been printing them in a table format onto the REPL but now I want to have the Pyboard print the matrices onto a text file for logging/storing purposes. I imported the sys m...
- Thu Jun 30, 2016 5:45 pm
- Forum: MicroPython pyboard
- Topic: Installing NumPy on the Pyboard
- Replies: 3
- Views: 14198
Re: Installing NumPy on the Pyboard
Thanks for the clarification concerning microcontrollers and numpy. I ended up determining the matrix determinant expression by hand and ran it on my matrix (I'm handling a 4x4 matrix made up of 4 lists and no zeros in any of them) and it worked. It did take a while to find but at the end it's just ...