Download the file
  1. #ifndef STARTER_H
  2. #define STARTER_H
  3.  
  4. #include "screen.h"
  5. #include "digital_input.h"
  6.  
  7. class Starter: public Screen, public DigitalInputObserver {
  8. public:
  9. Starter(Screen ** screens, uint8_t nb_screens):
  10. Screen(),
  11. running(0),
  12. screens(screens),
  13. nb_screens(nb_screens)
  14. {}
  15.  
  16. void refresh();
  17. uint8_t click();
  18. uint8_t clockwise() { return running; }
  19. uint8_t counter_clockwise() { return running; }
  20. void on_rise();
  21. void start();
  22. void stop();
  23. void done();
  24.  
  25. private:
  26. void show_static();
  27.  
  28. uint8_t running;
  29. Screen ** screens;
  30. uint8_t nb_screens;
  31. };
  32.  
  33. #endif
  34. // vim:ft=arduino
  35.