Arduino Sketch for HMC5832 Compass via I2C

Completed Posted Mar 10, 2010 Paid on delivery
Completed Paid on delivery

Write a sketch for the DFRobot Arduino Mega micro-controller which is capable of reading from a digital compass connected to the I2C.

The following are the components we will be using to test the sketch

<[url removed, login to view]>

<[url removed, login to view]>

The nav oard will be connected to the 3v power and to the i2c on the board.

## Deliverables

The purpose of this project is to write a sketch which will use the DF Robot Arduino Mega Microcontroller and Honeywells 3axis digital compass.

The sketch must communicate to the compass over the controllers I2C interface.?

The sketch must contain the following methods

1. int* QueryCompass(int address)

2. Setup()

3. Loop()

The sketch must only use what is available in the arduino libraries.?

Here are the components this sketch needs to work for:

<[url removed, login to view]>

<[url removed, login to view]>

Furthermore, you will need to download the following software in order to develop the sketch and test it.

<[url removed, login to view]>

The following is a code snippet of what would be an expected deliverable and how we would test to ensure it is working appropriately.

int* QueryCompass(int address)

{

? ? int readings[3];

? ?

? ? // ? TODO: ? implement this function

? ?

? ? return readings;

}

void setup()

{

}

void loop()

{

? ? int address = 0x00;

? ? int * readings = QueryCompass( address );

? ?

? ? [url removed, login to view]( readings[0] );

? ? [url removed, login to view]( readings[1] );

? ? [url removed, login to view]( readings[2] );

}

C Programming Embedded Software Engineering MySQL PHP Project Management Software Architecture Software Testing

Project ID: #3248775

About the project

2 proposals Remote project Active Mar 28, 2010

Awarded to:

ibrahimdanish

See private message.

$85 USD in 14 days
(18 Reviews)
4.6

2 freelancers are bidding on average $64 for this job

vw11221122

See private message.

$42.5 USD in 14 days
(65 Reviews)
5.2