![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Exo
Nboard.cpp@11:7cfa7c991676, 2016-10-01 (annotated)
- Committer:
- gr66
- Date:
- Sat Oct 01 13:04:07 2016 +0000
- Revision:
- 11:7cfa7c991676
- Parent:
- 10:4c838a5a5e42
- Child:
- 12:af99168c1a11
Modifs impression terminal
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gr66 | 8:0bbcd33e7811 | 1 | #include "IHM.h" |
gr66 | 8:0bbcd33e7811 | 2 | IHM ihm; |
gr66 | 8:0bbcd33e7811 | 3 | Serial pc(SERIAL_TX, SERIAL_RX); |
gr66 | 8:0bbcd33e7811 | 4 | int main() |
gr66 | 8:0bbcd33e7811 | 5 | { |
gr66 | 8:0bbcd33e7811 | 6 | unsigned char i=0,j; |
gr66 | 8:0bbcd33e7811 | 7 | float pi=4*atan(1.0); |
gr66 | 11:7cfa7c991676 | 8 | pc.printf("Hello World \n"); |
gr66 | 8:0bbcd33e7811 | 9 | ihm.LCD_printf("Hello World "); |
gr66 | 8:0bbcd33e7811 | 10 | ihm.LCD_gotoxy(1,0); |
gr66 | 8:0bbcd33e7811 | 11 | ihm.LCD_printf("PI= %f",pi); // test affichage float |
gr66 | 8:0bbcd33e7811 | 12 | ihm.BAR_set(0x3FF); |
gr66 | 8:0bbcd33e7811 | 13 | wait(2); |
gr66 | 8:0bbcd33e7811 | 14 | ihm.BAR_set(0x2AA); |
gr66 | 8:0bbcd33e7811 | 15 | wait(2); |
gr66 | 8:0bbcd33e7811 | 16 | ihm.BAR_set(0x155); |
gr66 | 8:0bbcd33e7811 | 17 | wait(2); |
gr66 | 8:0bbcd33e7811 | 18 | ihm.LCD_clear(); |
gr66 | 8:0bbcd33e7811 | 19 | while(1) { |
gr66 | 8:0bbcd33e7811 | 20 | wait(0.1); |
gr66 | 10:4c838a5a5e42 | 21 | i=ihm.COD_read(); |
gr66 | 8:0bbcd33e7811 | 22 | j=ihm.JOG_read(); |
gr66 | 8:0bbcd33e7811 | 23 | ihm.BAR_set((UINT16)(i)); |
gr66 | 8:0bbcd33e7811 | 24 | ihm.LCD_gotoxy(0,0); |
gr66 | 8:0bbcd33e7811 | 25 | ihm.LCD_printf("Jog=%02d",j); |
gr66 | 8:0bbcd33e7811 | 26 | ihm.LCD_gotoxy(1,0); |
gr66 | 8:0bbcd33e7811 | 27 | ihm.LCD_printf("Cod=%03d",i); |
gr66 | 11:7cfa7c991676 | 28 | pc.printf("Jog=%02d Cod=%03d \n",j,i); |
gr66 | 8:0bbcd33e7811 | 29 | } |
gr66 | 8:0bbcd33e7811 | 30 | } |