Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- Sangura
- Date:
- 2016-09-28
- Revision:
- 0:647ac3538c84
File content as of revision 0:647ac3538c84:
#include "mbed.h"
#include "C12832.h"
C12832 lcd(D11, D13, D12, D7, D10);
DigitalIn up (A2);
DigitalIn left (D4);
DigitalIn right (A5);
DigitalIn down (A4);
int x=0;
int y=0;
void Page1() {
lcd.cls();
lcd.locate(10,0);
lcd.printf("Matin");
lcd.locate(10,10);
lcd.printf("Midi");
lcd.locate(10,20);
lcd.printf("Soir");
}
void Page2() {
lcd.cls();
lcd.locate(10,0);
lcd.printf("Petit-Dejeuner");
lcd.locate(10,10);
lcd.printf("Dejeuner");
lcd.locate(10,20);
lcd.printf("Diner");
}
int main() {
while(1)
{
if(x==0 && y==0)
{
Page1();
lcd.locate(0,0);
lcd.printf(">");
}
else if(x==1 && y==0)
{
Page1();
lcd.locate(0,10);
lcd.printf(">");
}
else if(x==2 && y==0)
{
Page1();
lcd.locate(0,20);
lcd.printf(">");
}
else if(x==0 && y==1)
{
Page1();
lcd.locate(0,0);
lcd.printf(">");
}
else if(x==0 && y==1)
{
Page1();
lcd.locate(0,0);
lcd.printf(">");
}
else if(x==0 && y==1)
{
Page1();
lcd.locate(0,0);
lcd.printf(">");
}
}
}