Go Down

Topic: Question about Arduino robot compass (Read 114 times) previous topic - next topic

assassin

Jan 05, 2015, 10:23 pm Last Edit: Jan 05, 2015, 10:24 pm by assassin
Hi everyone,

I'm playing arduino robot now, and I find that we can get the direction of the robot by programming as:

Robot.compassRead();

So the question is how can I transfer the compass results to my computer so that I can process in Matlab? Or where is the output pin of the compass?

Can anyone answer my question, thank you!
It's now or never

ShapeShifter

If you can call compassRead() to get the current direction, you should be able to stick the result in the variable.

The most common way to get that data to something like Matlab is to connect the Arduino to your computer using a serial port and USB adapter. Then it's a matter of printing the compass data to the serial port.

If you Google Arduino and Matlab, you're bound to find lots of examples. While they won't specifically be about the compass reading, once you understand how to send arbitrary data to Matlab, and once you understand calling compassRead() to get your heading, you should be able to read your heading and send it to Matlab.

assassin

If you can call compassRead() to get the current direction, you should be able to stick the result in the variable.

The most common way to get that data to something like Matlab is to connect the Arduino to your computer using a serial port and USB adapter. Then it's a matter of printing the compass data to the serial port.

If you Google Arduino and Matlab, you're bound to find lots of examples. While they won't specifically be about the compass reading, once you understand how to send arbitrary data to Matlab, and once you understand calling compassRead() to get your heading, you should be able to read your heading and send it to Matlab.
Hi Shape,

Thank you very much! Actually I'm collecting the data through labview, and I have another 2-channels sensor working together with compass. Thus I want to wirelessly transfer these 3 channels data to the computer using bluetooth, Xbee or something, it's why I want to know the output/TX pin of the robot. Do you know which pin is TX?

Thank you!
It's now or never

ShapeShifter

Sorry, I don't know anything about that hardware. I can only speak in generalities on this topic.  :(

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy