Projet ER4 - Groupe AS - IUT Tarbes
/
testPourMikel
dfgdfgdfg
Fork of app-shield-LCD by
main.cpp@7:9bf99b580671, 2017-01-30 (annotated)
- Committer:
- AS_ER4
- Date:
- Mon Jan 30 14:44:29 2017 +0000
- Revision:
- 7:9bf99b580671
- Parent:
- 6:d90b6de72b40
- Child:
- 8:b7c87fd00982
test pour mikel
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dreschpe | 0:f6a57b843f79 | 1 | #include "mbed.h" |
chris | 3:2db94ee076ee | 2 | #include "C12832.h" |
dreschpe | 0:f6a57b843f79 | 3 | |
chris | 4:39c7c31b8fb0 | 4 | // Using Arduino pin notation |
chris | 4:39c7c31b8fb0 | 5 | C12832 lcd(D11, D13, D12, D7, D10); |
AS_ER4 | 6:d90b6de72b40 | 6 | void printStringScreen(char x, char y, char* toto); |
AS_ER4 | 6:d90b6de72b40 | 7 | AnalogIn pot1 (A0); |
AS_ER4 | 6:d90b6de72b40 | 8 | AnalogIn pot2 (A1); |
AS_ER4 | 6:d90b6de72b40 | 9 | |
AS_ER4 | 7:9bf99b580671 | 10 | |
AS_ER4 | 6:d90b6de72b40 | 11 | float pot1F = (float)pot1*10; |
AS_ER4 | 6:d90b6de72b40 | 12 | |
dreschpe | 1:1c6a9eaf55b5 | 13 | |
dreschpe | 0:f6a57b843f79 | 14 | int main() |
dreschpe | 0:f6a57b843f79 | 15 | { |
chris | 2:a87e255a8f3a | 16 | int j=0; |
AS_ER4 | 6:d90b6de72b40 | 17 | while(1) { |
AS_ER4 | 7:9bf99b580671 | 18 | lcd.pixel(10,10,1); |
AS_ER4 | 7:9bf99b580671 | 19 | //lcd.set_contrast(0); |
AS_ER4 | 7:9bf99b580671 | 20 | printStringScreen(0,0,"ceci est un test"); |
AS_ER4 | 7:9bf99b580671 | 21 | printStringScreen(5,5,pot1); |
AS_ER4 | 6:d90b6de72b40 | 22 | } |
AS_ER4 | 6:d90b6de72b40 | 23 | } |
dreschpe | 0:f6a57b843f79 | 24 | |
AS_ER4 | 6:d90b6de72b40 | 25 | void printStringScreen(char x, char y, char* toto){ |
AS_ER4 | 6:d90b6de72b40 | 26 | |
AS_ER4 | 6:d90b6de72b40 | 27 | lcd.locate(x,y); |
AS_ER4 | 6:d90b6de72b40 | 28 | lcd.printf(toto); |
AS_ER4 | 6:d90b6de72b40 | 29 | |
dreschpe | 0:f6a57b843f79 | 30 | } |
AS_ER4 | 6:d90b6de72b40 | 31 | |
AS_ER4 | 6:d90b6de72b40 | 32 |