64 lines
No EOL
1.3 KiB
C++
64 lines
No EOL
1.3 KiB
C++
/*********************************************************************
|
|
* @file Apllication.cpp
|
|
* @author <mettre l'adresse mail ou nom prenom>
|
|
* @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"
|
|
const int buttonPin = D8; // the number of the pushbutton pin
|
|
const int ledPin = D7; // the number of the LED pin
|
|
int buttonState = 0;
|
|
ecran lcd;
|
|
|
|
|
|
|
|
const int colorR = 255;
|
|
const int colorG = 100;
|
|
const int colorB = 100;
|
|
Application::Application()
|
|
{
|
|
// Code
|
|
;
|
|
}
|
|
|
|
Application::~Application()
|
|
{
|
|
// Code
|
|
;
|
|
}
|
|
|
|
void Application::init(void)
|
|
{
|
|
pinMode(ledPin, OUTPUT);
|
|
pinMode(buttonPin, INPUT);
|
|
bouton Bouton1(buttonPin);
|
|
|
|
// set up the LCD's number of columns and rows:
|
|
lcd.begin(32, 16);
|
|
|
|
lcd.setRGB(colorR, colorG, colorB);
|
|
|
|
// Print a message to the LCD.
|
|
lcd.print("On commence a jouer?");
|
|
|
|
delay(1000);
|
|
listequestions_init(lcd);
|
|
|
|
}
|
|
|
|
|
|
void Application::run(void)
|
|
{
|
|
|
|
// set the cursor to column 0, line 1
|
|
// (note: line 1 is the second row, since counting begins with 0):
|
|
//lcd.setCursor(0, 1);
|
|
// print the number of seconds since reset:
|
|
//lcd.print(millis() / 1000);
|
|
|
|
delay(100);
|
|
} |