alphamonkey
alphamonkey

Reputation: 17

raspberry pi bluetooth and lego mindstorm

I am trying to get a lego mindstorm ev3 to communicate with a Raspberry Pi. I am able to get the mindstorm to send data to the Pi but the data is not human readable. My end goal is to be able to send some sensor information from the mindstorm to the Pi and have the Pi make a decision based on that data. The data I am currently recieving looks like this '\xof\x00\x01\x00\x81\x9e\x04abc\x00\x04\x00\x00\x00\x00\x00'. This string came from the mindstorm sending the number 1 to the Pi.

Is there a way I can figure out what this data means so that I can use it to make decisions in python.

The way the two are connected was done by following the instructions here http://gipprojects.wordpress.com/2013/11/29/using-python-and-raspberry-pi-to-communicate-with-lego-mindstorms-ev3/.

Upvotes: 0

Views: 2080

Answers (1)

David Lechner
David Lechner

Reputation: 1824

The site you linked give a good explanation of how to interpret the data. You should not be looking at is as a string (text), but rather as bytes. Each byte has a specific meaning depending on which command you are receiving.

For additional information check out the LEGO firmware documentation Communications Overview. I am guessing the command you are dealing with is the WRITEMAILBOX System Command.

Upvotes: 2

Related Questions