Download the file
  1. #ifndef TIMELAPSE_H
  2. #define TIMELAPSE_H
  3.  
  4. #include <Arduino.h>
  5. #include <HardwareSerial.h>
  6. #include <LiquidCrystal.h>
  7.  
  8. extern LiquidCrystal lcd;
  9. extern HardwareSerial Serial;
  10.  
  11. #define SHUTTER_NEVER 0
  12. #define SHUTTER_BEFORE 1
  13. #define SHUTTER_IN_TIME 2
  14.  
  15. #define FOCUS_NO 0
  16. #define FOCUS_YES 1
  17.  
  18. // Pin numbers, in Arduino numbering style
  19. #define BUTTON_PIN 3 // Push button
  20. #define ENCODER_PINA 4 // Rotary encoder, channel A
  21. #define ENCODER_PINB 5 // Rotary encoder, channel B
  22. #define BEAM_SENSOR_PIN 6 // Laser beam sensor
  23. #define BEAM_LASER_PIN 7 // Laser diode
  24. #define BACKLIGHT_PIN 8 // LCD backlight
  25. #define FLASH_PIN 10 // Camera flash
  26. #define SHUTTER_PIN 11 // Camera shutter
  27. #define FOCUS_PIN 12 // Camera focus
  28. #define LCD_RS 14 // LCD RS pin
  29. #define LCD_ENABLE 15 // LCD Enable pin
  30. #define LCD_D4 16 // LCD D4 pin
  31. #define LCD_D5 17 // LCD D5 pin
  32. #define LCD_D6 18 // LCD D6 pin
  33. #define LCD_D7 19 // LCD D7 pin
  34.  
  35. #define NB_ELEMENTS(a) sizeof(a) / sizeof(a[0])
  36. #endif
  37. // vim:ft=arduino
  38.