Search found 164 matches

by fma
Sun Apr 19, 2015 10:00 pm
Forum: General Discussion and Questions
Topic: pyboard.py UnicodeDecodeError
Replies: 8
Views: 7083

Re: pyboard.py UnicodeDecodeError

Great, thanks!
by fma
Sun Apr 19, 2015 6:17 pm
Forum: General Discussion and Questions
Topic: pyboard.py UnicodeDecodeError
Replies: 8
Views: 7083

Re: pyboard.py UnicodeDecodeError

dhylands wrote:So I think its a bug in pyboard.py messing up when it receives the \xff character.
Yes, definitely.

Thanks for the bug report.
by fma
Sun Apr 19, 2015 12:44 pm
Forum: MicroPython pyboard
Topic: SPI usage
Replies: 5
Views: 5577

Re: SPI usage

:P
by fma
Sun Apr 19, 2015 8:37 am
Forum: General Discussion and Questions
Topic: pyboard.py UnicodeDecodeError
Replies: 8
Views: 7083

Re: pyboard.py UnicodeDecodeError

Ok, I found a way to reproduce the problem. Try to send this script using pyboard.py: raise Exception("\xff") You get: Traceback (most recent call last): File "/usr/local/bin/pyboard.py", line 247, in <module> main() File "/usr/local/bin/pyboard.py", line 243, in main print(str(ret_err, encoding='as...
by fma
Sun Apr 19, 2015 7:37 am
Forum: MicroPython pyboard
Topic: SPI usage
Replies: 5
Views: 5577

Re: SPI usage

Thanks!
by fma
Sun Apr 19, 2015 7:35 am
Forum: General Discussion and Questions
Topic: pyboard.py UnicodeDecodeError
Replies: 8
Views: 7083

Re: pyboard.py UnicodeDecodeError

I just upload/execute my script using pyboard.py: $ pyboard.py <myscript.py> I found that the problem occurs when an exception is raised from my script, and when there is an attempt to print a value like 0xff... I can't reproduce it, but the fix was at the very end of pyboard.py: if ret_err: try: pr...
by fma
Sat Apr 18, 2015 5:42 pm
Forum: MicroPython pyboard
Topic: SPI usage
Replies: 5
Views: 5577

Re: SPI usage

Ok, I found the problem! But I don't really understand it... I was using ord() on values from SPI.send_recv(). Now, I use int.from_bytes(), and all works fine. But I would like to understand... When it failed, ord() was rising a TypeError exception, saying that it can't convert from empty string. Bu...
by fma
Sat Apr 18, 2015 4:27 pm
Forum: MicroPython pyboard
Topic: SPI usage
Replies: 5
Views: 5577

SPI usage

Hi! I'm working on a port of this PS gamepad lib, written for Arduino/PIC: https://github.com/madsci1016/Arduino-PS2X I'm testing my code with a DualShock 2 Sony controller. I'm using the SPI class to send/receive datas, and I encounter a strange behaviour. Most of the code seems to work, but while ...
by fma
Sat Apr 18, 2015 8:35 am
Forum: General Discussion and Questions
Topic: pyboard.py UnicodeDecodeError
Replies: 8
Views: 7083

pyboard.py UnicodeDecodeError

Hi!

I get a UnicodeDecodeError when uploading my script using pyboard.py. Why and when does it happens? The traceback does not give any usefull informations, as it only points to pyboard.py script, so I don't find the problem...

Thanks for you help.
by fma
Wed Apr 15, 2015 4:30 pm
Forum: General Discussion and Questions
Topic: FFT
Replies: 8
Views: 11761

Re: FFT

You'r right!