-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to receive byte strings #33
Comments
Very useful for raw data. Sending and receiving will not format the input data in any way. Fixes harmsm#33
Any ETA on when this Pull Request is going to be added? I could really use this feature for 1-Wire addresses which look like '\x12\x5C\xEC\xA0\x00\x00\x00\x80' (64-bits). Thanks. |
It seems the author hasn't had time to respond to any issues for weeks. In the meantime, you could just clone from my fork and then set this original repo as the remote once the changes are merged. |
Will do, thanks.
… On Dec 11, 2017, at 9:11 AM, Felix Uhl ***@***.***> wrote:
It seems the author hasn't had time to respond to any issues for weeks. In the meantime, you could just clone from my fork and then set this original repo as the remote once the changes are merged.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#33 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ADHZnB3EvNK7Q8WIlu0l_N-Ri7L1k-4Uks5s_TgmgaJpZM4Qk7W_>.
|
I'm trying to use this code with a teensy 3.6. I've made sure the baud rates all match between the ArduinoBoard class instance, the sketch on the teensy, and the pingpong_test.py script. Also, I updated the data type sizes of the ArduinoBoard class to match here: https://forum.pjrc.com/threads/36658-datatypes-bit-depth EDIT: I had the wrong sketch uploaded onto the micro. |
Right now, it is impossible to receive arbitrary byte-strings.
I wrote a simple setup where my python-script sends the character
'\xff'
and the Arduino sends that back.When a string is received where any characters are larger than 127, the
receive()
method fails:So I propose adding the format character
'B'
to indicate a byte string. This will receive the byte string just like_recv_string
does, but will just return it without decoding it or stripping any character.For sending, behaviour should be equivalent to
's'
as that already works perfectly fine.I'll implement this and create a pull request when I'm done.
The text was updated successfully, but these errors were encountered: