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.
Dependents: Projet_client_serveur EX5 ex10 ex11 ... more
IHM Class Reference
Example: More...
#include <IHM.h>
Public Member Functions | |
| IHM (PinName CANRx=PA_11, PinName CANTx=PA_12) | |
| Constructeur pour l'IHM de la carte NBoard, placé à l'extérieur du main Les paramètres peuvent être omis (ils ont tous une valeur par défaut) | |
| void | BAR_set (UINT16 valeur) |
| commande des 10 leds du bargraph | |
| UINT8 | COD_read (void) |
| lecteur du codeur | |
| void | LCD_gotoxy (UINT8 y, UINT8 x) |
| positionne le curseur de l'afficheur LCD | |
| void | LCD_printf (const char *format,...) |
| écriture formatée sur l'afficheur LCD. | |
| void | LCD_clear (void) |
| effacement de l'afficheur LCD | |
| UINT8 | JOG_read (void) |
| lecture du JOG retourne la position (8 possibilités) et l'enfoncement du Jog | |
Detailed Description
Example:
#include "IHM.h" IHM ihm; //clase IHM Serial pc(SERIAL_TX, SERIAL_RX); // I/O terminal PC int main() { unsigned char codeur=0,jog; float pi=4*atan(1.0); pc.printf("Hello World \n"); ihm.LCD_clear(); ihm.LCD_printf("Hello World "); 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.1); 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); } }
Definition at line 57 of file IHM.h.
Constructor & Destructor Documentation
| IHM | ( | PinName | CANRx = PA_11, |
| PinName | CANTx = PA_12 |
||
| ) |
Member Function Documentation
| void BAR_set | ( | UINT16 | valeur ) |
| UINT8 COD_read | ( | void | ) |
| UINT8 JOG_read | ( | void | ) |
| void LCD_clear | ( | void | ) |
| void LCD_gotoxy | ( | UINT8 | y, |
| UINT8 | x | ||
| ) |
Generated on Thu Jul 14 2022 22:40:30 by
1.7.2