47 lines
No EOL
1.1 KiB
C++
47 lines
No EOL
1.1 KiB
C++
/*********************************************************************
|
|
* @file Apllication.cpp
|
|
* @author Montaigu Emilie, Ouvrard Marine
|
|
* @brief Fichier source de l'application
|
|
*********************************************************************/
|
|
#include "Application.h"
|
|
#include <Wire.h>
|
|
#include "rgb_lcd.h"
|
|
#include "ecran.h"
|
|
#include "bdd.h"
|
|
#include "bouton.h"
|
|
#define buttonPinRelief D8
|
|
#define buttonPinPlat D6
|
|
|
|
Application::Application(): ledPin(D7), colorR(255), colorG(100), colorB(100), boutonRelief(buttonPinRelief), boutonPlat(buttonPinPlat) {}
|
|
|
|
Application::~Application()
|
|
{
|
|
/*if (boutonRelief != nullptr) {
|
|
delete boutonRelief;
|
|
}
|
|
if (boutonPlat != nullptr) {
|
|
delete boutonPlat;
|
|
}*/
|
|
}
|
|
|
|
void Application::init(void)
|
|
{
|
|
Serial.begin(115200);
|
|
lcd.begin(32, 16);
|
|
lcd.setRGB(colorR, colorG, colorB);
|
|
pinMode(ledPin, OUTPUT);
|
|
pinMode(buttonPinRelief, INPUT);
|
|
pinMode(buttonPinPlat, INPUT);
|
|
delay(1500);
|
|
Serial.println("A");
|
|
}
|
|
|
|
|
|
void Application::run(void)
|
|
{
|
|
lcd.clear();
|
|
lcd.print("On commence a jouer?");
|
|
delay(1500);
|
|
listequestions_init(lcd, boutonRelief, boutonPlat);
|
|
delay(100);
|
|
} |