Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. /**
  2. * @file MegaMain.ino
  3. * @brief Arduino Mega 2650 - This microcontroller is the master which co-ordinates the others
  4. * via the I2C and serial bus.
  5. *
  6. * Log commands are sent from the main microcontroller on the I2C bus
  7. * to the OLED and SD logging arduino at address 10. Piezo tones are
  8. * also controlled from this microcontroller.
  9. *
  10. * The microcontroller at address 11 on the I2C bus controls the
  11. * 2 x 16 LCD and provides access to the temperature sensor.
  12. *
  13. * Uses the MPL3115A2 library to display the current altitude and chip temperature.
  14. * The MPL3115A2 is a low-cost, low power, highly accurate barometric pressure sensor.
  15. * The sensor is very sensitive and capable of detecting a change of only 0.05kPa
  16. * which equates to a 0.3m change in altitude. The MPL3115A2:
  17. *
  18. * - Typical pressure accuracy of ±0.05kPa
  19. * - Typical altitude accuracy of ±0.3m
  20. * - Typical temperature accuracy of ±3C
  21. * - 3.3V sensor - use inline logic level converters or 330 ohm resistors
  22. * to limit 5V signals.
  23. *
  24. * Test to Speech is provided by the EMIC 2 module.
  25. *
  26. * Front top PIR is a SimplyTronics ST-00031/81 PIR Sensor/ Wide angle PIR Sensor
  27. * Note: wait 40 seconds for the PIR Sensor to warm up.
  28. *
  29. * Doxygen is used to self generate the supporting documentation.
  30. *
  31. * @author David Such
  32. */
  33.  
  34. #include <Wire.h>
  35. #include <Servo.h>
  36. #include <NewPing.h>
  37. #include <HMC5883L.h>
  38. #include <DS3232RTC.h>
  39. #include <SoftwareSerial.h>
  40. #include <HB25MotorControl.h>
  41.  
  42. #include <Time.h>
  43.  
  44. #include "logging.h"
  45. #include "constants.h"
  46. #include "moving_average.h"
  47. #include "pin_definitions.h"
  48. #include "ping_distance_sensor.h"
  49. #include "turret_servo.h"
  50. #include "synthesizer.h"
  51. #include "time_methods.h"
  52. #include "real_time_clock.h"
  53. #include "compass.h"
  54. #include "robot.h"
  55.  
  56. Robot ava;
  57.  
  58. void setup()
  59. {
  60. Serial.begin(9600);
  61. Serial.println("AVA Initialisation.");
  62.  
  63. ava.begin();
  64. }
  65.  
  66. void loop()
  67. {
  68. ava.run();
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement