Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @file MegaMain.ino
- * @brief Arduino Mega 2650 - This microcontroller is the master which co-ordinates the others
- * via the I2C and serial bus.
- *
- * Log commands are sent from the main microcontroller on the I2C bus
- * to the OLED and SD logging arduino at address 10. Piezo tones are
- * also controlled from this microcontroller.
- *
- * The microcontroller at address 11 on the I2C bus controls the
- * 2 x 16 LCD and provides access to the temperature sensor.
- *
- * Uses the MPL3115A2 library to display the current altitude and chip temperature.
- * The MPL3115A2 is a low-cost, low power, highly accurate barometric pressure sensor.
- * The sensor is very sensitive and capable of detecting a change of only 0.05kPa
- * which equates to a 0.3m change in altitude. The MPL3115A2:
- *
- * - Typical pressure accuracy of ±0.05kPa
- * - Typical altitude accuracy of ±0.3m
- * - Typical temperature accuracy of ±3C
- * - 3.3V sensor - use inline logic level converters or 330 ohm resistors
- * to limit 5V signals.
- *
- * Test to Speech is provided by the EMIC 2 module.
- *
- * Front top PIR is a SimplyTronics ST-00031/81 PIR Sensor/ Wide angle PIR Sensor
- * Note: wait 40 seconds for the PIR Sensor to warm up.
- *
- * Doxygen is used to self generate the supporting documentation.
- *
- * @author David Such
- */
- #include <Wire.h>
- #include <Servo.h>
- #include <NewPing.h>
- #include <HMC5883L.h>
- #include <DS3232RTC.h>
- #include <SoftwareSerial.h>
- #include <HB25MotorControl.h>
- #include <Time.h>
- #include "logging.h"
- #include "constants.h"
- #include "moving_average.h"
- #include "pin_definitions.h"
- #include "ping_distance_sensor.h"
- #include "turret_servo.h"
- #include "synthesizer.h"
- #include "time_methods.h"
- #include "real_time_clock.h"
- #include "compass.h"
- #include "robot.h"
- Robot ava;
- void setup()
- {
- Serial.begin(9600);
- Serial.println("AVA Initialisation.");
- ava.begin();
- }
- void loop()
- {
- ava.run();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement