affichage v7
Fork of AFFICHAGE by
Affichage.cpp@5:6834f15a1e48, 2017-02-16 (annotated)
- Committer:
- fab16
- Date:
- Thu Feb 16 14:50:17 2017 +0000
- Revision:
- 5:6834f15a1e48
- Parent:
- 4:7c1e87f81b55
- Child:
- 6:82586f775dc5
v4
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fab16 | 4:7c1e87f81b55 | 1 | #include "Affichage.h" |
fab16 | 4:7c1e87f81b55 | 2 | |
fab16 | 2:9a0f0587d296 | 3 | |
fab16 | 4:7c1e87f81b55 | 4 | |
fab16 | 4:7c1e87f81b55 | 5 | m3pi m3piA; |
fab16 | 2:9a0f0587d296 | 6 | |
fab16 | 2:9a0f0587d296 | 7 | void Affichage::bonjour(){ |
fab16 | 3:97cb6955fab2 | 8 | m3piA.cls(); |
fab16 | 3:97cb6955fab2 | 9 | m3piA.print("Bonjour",7); |
fab16 | 3:97cb6955fab2 | 10 | wait(1); |
fab16 | 2:9a0f0587d296 | 11 | |
fab16 | 2:9a0f0587d296 | 12 | |
fab16 | 2:9a0f0587d296 | 13 | } |
fab16 | 2:9a0f0587d296 | 14 | |
fab16 | 4:7c1e87f81b55 | 15 | void Affichage::afficheResult(float result){ |
fab16 | 4:7c1e87f81b55 | 16 | m3piA.cls(); |
fab16 | 4:7c1e87f81b55 | 17 | m3piA.printf("%f",result); |
fab16 | 4:7c1e87f81b55 | 18 | wait(1); |
fab16 | 4:7c1e87f81b55 | 19 | } |
fab16 | 2:9a0f0587d296 | 20 | |
fab16 | 4:7c1e87f81b55 | 21 | |
fab16 | 4:7c1e87f81b55 | 22 | // affichage de 8 caractere max |
fab16 | 4:7c1e87f81b55 | 23 | void Affichage::affichageCourt(char*message){ |
fab16 | 4:7c1e87f81b55 | 24 | m3piA.cls(); |
fab16 | 4:7c1e87f81b55 | 25 | m3piA.print(message,strlen(message)); |
fab16 | 5:6834f15a1e48 | 26 | wait(1); |
fab16 | 5:6834f15a1e48 | 27 | } |
fab16 | 5:6834f15a1e48 | 28 | |
fab16 | 5:6834f15a1e48 | 29 | |
fab16 | 5:6834f15a1e48 | 30 | |
fab16 | 5:6834f15a1e48 | 31 | void Affichage::effacerTout(){ |
fab16 | 5:6834f15a1e48 | 32 | m3piA.cls(); |
fab16 | 5:6834f15a1e48 | 33 | } |
fab16 | 5:6834f15a1e48 | 34 | |
fab16 | 5:6834f15a1e48 | 35 | // teste affichage sur 2 ligne |
fab16 | 5:6834f15a1e48 | 36 | void Affichage::affichage2ligne(){ |
fab16 | 5:6834f15a1e48 | 37 | m3piA.cls(); |
fab16 | 5:6834f15a1e48 | 38 | m3piA.locate(0,0); |
fab16 | 5:6834f15a1e48 | 39 | m3piA.print("a",1); |
fab16 | 5:6834f15a1e48 | 40 | m3piA.locate(0,1); |
fab16 | 5:6834f15a1e48 | 41 | m3piA.print("b",1); |
fab16 | 3:97cb6955fab2 | 42 | } |
fab16 | 3:97cb6955fab2 | 43 |