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.
Fork of SwitchSciencembedLPC824_test by
main.cpp
00001 /* 00002 * Hello code for "Switch Science mbed LPC824" 00003 * Copyright (c) 2014 Switch Science, Inc. 00004 * Released under the MIT License: http://mbed.org/license/mit 00005 */ 00006 00007 #include "mbed.h" 00008 #include "TempSensor_LM75B.h" 00009 #include "TextLCD_SB1602E.h" 00010 00011 #define TEST_LOOP 1 00012 #define DEFAULT_TIME_INTERVAL 1.0 00013 #define DEFAULT_TIME_INTERVAL_PUTx 0.2 00014 00015 #define CONTRAST_ADJUST_TEST 00016 #define PRINTF_TEST 00017 #define CGRAM_FUNCTION_TEST 00018 #define PUTS_TEST_WITH_ESCAPE 00019 #define PUTS_TEST_WITHOUT_ESCAPE 00020 #define PUTC_TEST 00021 00022 00023 I2C i2c( dp4, dp5 ); // sda, scl 00024 TempSensor_LM75B thermo_sensor_0( &i2c ); 00025 TextLCD_SB1602E lcd( &i2c ); //sda,,scl 液晶 00026 00027 /*デバッグ用*/ 00028 //Serial pc( USBTX, USBRX ); // tx, rx 00029 00030 00031 int main() 00032 { 00033 /*デバッグ用*/ 00034 // int i = 0; 00035 // pc.printf("test\r\n"); 00036 while (1) { 00037 /*デバッグ用*/ 00038 // pc.printf( " (%d) sensor_0= %4.1f\r\n", i++, (float)thermo_sensor_0 ); 00039 lcd.printf(0,"temp=\n"); 00040 lcd.printf(1,"%4.1f\n",(float)thermo_sensor_0); 00041 wait( 1 ); 00042 } 00043 }
Generated on Fri Jul 15 2022 13:53:23 by
1.7.2
