I found this. Can you program it with easyC?
this sample code given at that website seems very complex. since it would have to be plugged into the serial port (somehow), standard programming would not be possible. i am pretty sure you would have to do some advanced, custom stuff, which might not be possible, depending on which version of easyC you have.
I saw This robot which also uses a compass like that.
Well, I am not much of a programmer (I only know how to use EasyC). What application should I use to program this compass? MP LAB, ROBOTC?
MPLAB would work for sure. I have not worked with EasyC Pro that much, so I don’t know if it can be used.
This compass sensor is rather easy to use and I believe it can be programmed with the Vex software.
Thanks, maybe I will try that sensor.
I wrote the code for the first sensor (the one from mindsensors.com). I’m sorry that you thought it complex, I tried to reduce it to the smallest code that would still be flexible.
The compass needs to plug into two serial ports. You can use the standard VEX extension cables to do that. You then send it commands to start the unit to calibrate it and one to read the values.
The code uses WPILib, which is also the core of EasyC so it should work in both the MPLabs and EasyC environment. The complicated part is getting the port set up for the baudrate. There is an EasyC call that makes that simpler, it would reduce the entire program to < 100 lines.
I’ve had pretty good success with it, if you need help or have questions please post them.
When I do this do I plug them into the analog or digital ports?
TX and RX. This is a Smart Device. Also the GPS I was mentioning in another thread is connected to the TX and RX
You need to have two Vex extension cables. Plug one end into the TX and RX ports on the controller (top end of the A/D ports) and the other end onto the compass. The pin layout is compatible, just remember ground is like dirt and is dark, so the black wire goes on the pin marked ground or (-).
I have the HM55B sensor, having bought it some time ago for my Parallax stuff. Have there been any postings on it for Vex? I have not come across any. I would love to see some sample code, and how it was connected. I can use EasyC or MPLab, though I am a novice in both.
You have a Spec Sheet???
Look at the Pin-Outs.
Is there a non-serial compass out there?
like a something that would vary in resistivity as the compass heading changes?
i’ve already got both serial ports tied up with a gps and a conductivity sensor.
i need the compass for more reliable on demand headings
there are some analog ones i know ive seen around Jameco (www.jameco.com) but none come to mind right of the top of my head
I looked on jameco and they probably removed the item from the stock because all i got was the HITACHI HM55B COMPASS MODULE which is a serial device
Dinsmore makes three different analog compass units:
The data sheet for all 3 sensors is here:
You can order them here:
The model 1490 is $15 but very limited. The other two are $39. None of them are very fast.
All of them would require some soldering, etc to adapt to VEX. But you should be able to read the sensors’ outputs with two AD ports.