![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
programme capteur d'empreinte digital
main.cpp
- Committer:
- alain77
- Date:
- 2019-06-06
- Revision:
- 26:0e5bf5f7a6d5
- Parent:
- 25:586781d009dd
File content as of revision 26:0e5bf5f7a6d5:
//----------------------------------------------------------------------- // GuiBase とその派生クラスのデモプログラム // Demo program for GuiBase class and its derivertive classes // // GuiBase, Button, ButtonGroup, Label, NumericLabel, BlinkLabel, // SeekBar, SeekbarGroup, NumericUpDown // // // 2018/03/12, Copyright (c) 2018 MIKAMI, Naoki //----------------------------------------------------------------------- #include "mbed.h" #include "TS_DISCO_F746NG.h" #include "LCD_DISCO_F746NG.h" #include "F746_GUI.hpp" Serial pc(USBTX, USBRX); Serial test(PC_6,PC_7); LCD_DISCO_F746NG lcd; TS_DISCO_F746NG ts; int main() { char i; /* initialisation bouton autorisé , refusé ,reset */ Label obj10(180, 2, "DEMANDE D'ACCES "); Button button1(20, 80, 75, 40, "Autorise"); Button button2(120,80, 75, 40, "Refuse"); Button button3(200,80, 75, 40, "Reset"); //pc.printf("Ok "); while(1) { /* envoie init capteur */ test.putc(0x55); test.putc(0xAA); test.putc(0x01); test.putc(0x00); test.putc(0x00); test.putc(0x00); test.putc(0x00); test.putc(0x00); test.putc(0x01); test.putc(0x01); /* caputre empreinte */ test.putc(0x55); test.putc(0xAA); test.putc(0x01); test.putc(0x00); test.putc(0x23); test.putc(0x00); test.putc(0x00); test.putc(0x00); test.putc(0x01); test.putc(0x01); /* partie interface graphique */ lcd.DisplayStringAt(-180, 150, (uint8_t *)"IDENTITE", CENTER_MODE); lcd.DisplayStringAt(-180, 170, (uint8_t *)"NOM de la personne : ", CENTER_MODE); /* condion d'accès manuel */ if (button1.Touched()){ button2.Inactivate(); lcd.DisplayStringAt(0, 45, (uint8_t *)"Acces autorise", CENTER_MODE); } if ( button2.Touched()){ lcd.DisplayStringAt(0, 45, (uint8_t *)" " , CENTER_MODE); button1.Inactivate(); lcd.DisplayStringAt(0, 45, (uint8_t *)"Acces refuser", CENTER_MODE); } if ( button3.Touched()){ lcd.DisplayStringAt(0, 45, (uint8_t *)" " , CENTER_MODE); button1.Activate(); button2.Activate(); } } }