Menu

guimag-acquisition

Victor Aldecoa

General information

guimag-acquisition is a software implemented to Arduino Mega 2560.

It has just one file, that is on ./arduino/guimag-acquisition.ino.
To upload it you must simply open the Arduino IDE and copy it to a new Sketch. Click on the button "Upload". After that, disconnect it from the development computer and connect it to the BeagleBoard. Execute guimag-beaglemodule and it should be working.

The program is intended to read real world signals and send them to the BeagleBoard. Analog and digital ports are read using Arduino's Library, leaving us to implement only the communication (using the Serial Library) and the odometer (using interrupts)

Communication

The communication protocol used between guimag-acquisition and guimag-beaglemodule can be seen here: [communication protocol].

On the file guimag-acquisition.ino, you have a byte array called "buffer" and a variable "buffer_size", that tells us how many bytes the buffer has right now.
The function "receive_message" is used to try to receive a new message. It returns the message code or "-1" case there is no message on the Serial hardware buffer. In the case of having a message, this function is supposed to put the whole message in the buffer.

Odometers


Related

Wiki: communication protocol
Wiki: microcontrolador de aquisição de dados

MongoDB Logo MongoDB