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.
Dependencies: mbed LCD_DISCO_F469NI BSP_DISCO_F469NI
main1.cpp
00001 /*#include "mbed.h" 00002 #include "LCD_DISCO_F469NI.h" 00003 00004 LCD_DISCO_F469NI lcd; 00005 DigitalOut led1(LED1); 00006 DigitalOut led2(LED2); 00007 CAN can1(PB_5, PB_13); 00008 00009 #define IrThermo_Addr (0x5A<<1) 00010 #define Tamb 0x06 00011 #define Tobj 0x07 00012 00013 uint32_t c1450=0,c1500=0,cnull=0; 00014 char brojac[50]; 00015 00016 int main() { 00017 lcd.SetTextColor(LCD_COLOR_BLACK); 00018 lcd.SetFont(&Font24); 00019 lcd.DisplayStringAt(0,200,(uint8_t*)"Initialized",LEFT_MODE); 00020 //printf("main()\n"); 00021 CANMessage msg; 00022 while(1) { 00023 //printf("loop()\n"); 00024 if(can1.read(msg)) { 00025 char id[5]; 00026 sprintf(id,"Id: %d",msg.id); 00027 char data[50]; 00028 sprintf(data,"Data: %d",msg.data[0]); 00029 lcd.DisplayStringAt(0,0,(uint8_t*)id,LEFT_MODE); 00030 lcd.DisplayStringAt(0,30,(uint8_t*)data,LEFT_MODE); 00031 if(msg.id==1450){ 00032 c1450++; 00033 sprintf(brojac,"1450 times: %d",c1450); 00034 lcd.DisplayStringAt(0,60,(uint8_t*)"Unit 1450 recognized",LEFT_MODE); 00035 lcd.DisplayStringAt(0,90,(uint8_t*)brojac,LEFT_MODE); 00036 }else if(msg.id==1500){ 00037 c1500++; 00038 sprintf(brojac,"1500 times: %d",c1500); 00039 lcd.DisplayStringAt(0,60,(uint8_t*)"Unit 1500 recognized",LEFT_MODE); 00040 lcd.DisplayStringAt(0,120,(uint8_t*)brojac,LEFT_MODE); 00041 }else{ 00042 cnull++; 00043 sprintf(brojac,"Null times: %d",cnull); 00044 lcd.DisplayStringAt(0,60,(uint8_t*)"Unit NOT recognized",LEFT_MODE); 00045 lcd.DisplayStringAt(0,150,(uint8_t*)brojac,LEFT_MODE); 00046 }; 00047 //lcd.SetTextColor(LCD_COLOR_WHITE); 00048 //lcd.FillRect(0,0,300,100); 00049 //lcd.SetTextColor(LCD_COLOR_BLACK); 00050 }; 00051 }; 00052 }; 00053 */
Generated on Fri Jul 15 2022 11:42:44 by
1.7.2