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: SSD1308_128x64_I2C Grove_temperature
wave.cpp
00001 #include "wave.h" 00002 00003 Temperature::Temperature(void) 00004 { 00005 u8_page = 7; 00006 u8_col = 127; 00007 u8_temperature = 0; 00008 u8_value = 0; 00009 } 00010 00011 Temperature::~Temperature(void) 00012 { 00013 00014 } 00015 00016 void Temperature::calcPage(void) //calculate the display page of this temperature 00017 { 00018 uint8_t tmp; 00019 tmp = u8_temperature / 8; 00020 u8_page = 7 - tmp; //7 - tmp 00021 } 00022 00023 void Temperature::calcValue(void) //calculate the I2C value of this temperature 00024 { 00025 uint8_t index; 00026 00027 index = 7 - ( u8_temperature % 8 ); 00028 u8_value = (0x01) << index; 00029 }
Generated on Sun Jul 17 2022 22:34:28 by
