prototype version 0.1
This document provides a tutorial on how to set up GoMouve prototype, and explains the mechanism behind it.
For sender and receiver, the following devices are required:
- Arduino Uno * 1
- XBee & shield * 1
- GPS (with antenna) * 1
- Barometer * 1
- Arduino Uno * 1
- XBee & shield * 1
- GPS (with antenna) * 1
- Barometer * 1
- 9DOF * 1
- Servo * 2
Current models: XBee & shield, GPS, Barometer (w/o 3Vo pin), 9DOF, Servo
The sketch of receiver gives an idea on how to wire up all components. Note:
- Check the ports for SCL and SDA of your Arduino board
- Get scripts of sender and receiver from here (each in
XBee/sender
,XBee/receiver
) - Download and import required libraries (see below)
- Set
GPSRXPin
GPSTXPin
values according to circuit (GPSRXPin
connects the TX pin of GPS, and vice versa) - Set ports for Servos as first parameters in
myservoVertical.attach(PORT_V, 500, 2400)
myservoHorizontal.attach(PORT_H, 500, 2400)
- Upload script to Arduino board Remember to turn jumpers of XBee shields into USB mode ref
- Configure baudrate to
57600
for Serial Monitor
GPS
Barometer
9DoF
-
In
sender.ino
:while (true) { Serial.print("A"); delay(50); while (Serial.available()) { // Serial.println("Available"); if (Serial.read() == 'B') { // Serial.println("Read B"); Serial.println("Setup finished!"); return; } } }
-
In
receiver.ino
:while (true) { delay(10); if (Serial.available()) { char rec = Serial.read(); Serial.print(rec); if (rec == 'A') { for (int i = 0; i < 10; i++) { Serial.print("B"); } return; } } }
- moving camera part (barometer first, then self-calibration of receiver, and finally with GPS location)
- optimize handshaking
- redesign start/end protocols for each data transmission
updated by Eric Chiu 24.02.15