Prog Demo Version Mai 2018
Fork of NBoard_IHM_V2 by
Nboard_IHM.cpp
- Committer:
- slowness
- Date:
- 2018-05-24
- Revision:
- 19:dd7d692f579c
- Parent:
- 16:c4bfe797dfaf
File content as of revision 19:dd7d692f579c:
#include "IHM.h"
IHM ihm; //clase IHM
Serial pc(USBTX, USBRX); // I/O terminal PC
int main()
{
UINT8 codeur=0,jog;
float pi=4*atan(1.0);
ihm.LCD_gotoxy(0,1);
pc.printf("Hello IHMV1 \n");
ihm.LCD_clear();
ihm.LCD_gotoxy(0,0);
ihm.LCD_printf("Hello IHM V1");
ihm.LCD_gotoxy(1,0);
ihm.LCD_printf("PI= %f",pi); // test affichage float
ihm.BAR_set(0x3FF);
wait(2);
ihm.BAR_set(0x2AA);
wait(2);
ihm.BAR_set(0x155);
wait(2);
ihm.LCD_clear();
while(1) {
wait(0.5);
codeur=ihm.COD_read();
jog=ihm.JOG_read();
ihm.BAR_set((UINT16)(codeur));
ihm.LCD_gotoxy(0,0);
ihm.LCD_printf("Jog=%02d",jog);
ihm.LCD_gotoxy(1,0);
ihm.LCD_printf("Cod=%03d",codeur);
pc.printf("Jog=%02d Cod=%03d \n",jog,codeur);
}
}
