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.
main.cpp@6:b57b9dcfb515, 2014-11-03 (annotated)
- Committer:
- okano
- Date:
- Mon Nov 03 00:26:12 2014 +0000
- Revision:
- 6:b57b9dcfb515
- Parent:
- 5:a1251609ee7f
- Parent:
- 3:863cf79582a4
- Child:
- 7:553960b756ed
two constructors version
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| okano | 0:f947ed831c67 | 1 | #include "mbed.h" |
| okano | 1:3c29c04cfeb2 | 2 | #include "test_LM75B.h" |
| okano | 0:f947ed831c67 | 3 | |
| okano | 6:b57b9dcfb515 | 4 | test_LM75B temp0( p28, p27 ); |
| okano | 6:b57b9dcfb515 | 5 | |
| okano | 3:863cf79582a4 | 6 | I2C i2c( p28, p27 ); |
| okano | 6:b57b9dcfb515 | 7 | test_LM75B temp1( i2c ); |
| okano | 6:b57b9dcfb515 | 8 | |
| okano | 0:f947ed831c67 | 9 | |
| okano | 0:f947ed831c67 | 10 | int main() |
| okano | 0:f947ed831c67 | 11 | { |
| okano | 6:b57b9dcfb515 | 12 | float t0; |
| okano | 6:b57b9dcfb515 | 13 | float t1; |
| okano | 2:482581f76a1d | 14 | |
| okano | 3:863cf79582a4 | 15 | i2c.frequency( 400 * 1000 ); |
| okano | 3:863cf79582a4 | 16 | |
| okano | 0:f947ed831c67 | 17 | while(1) { |
| okano | 6:b57b9dcfb515 | 18 | t0 = temp0; |
| okano | 6:b57b9dcfb515 | 19 | t1 = temp1; |
| okano | 6:b57b9dcfb515 | 20 | printf( "temp = %7.3f, %7.3f\r\n", t0, t1 ); |
| okano | 0:f947ed831c67 | 21 | wait( 1 ); |
| okano | 0:f947ed831c67 | 22 | } |
| okano | 0:f947ed831c67 | 23 | } |
| okano | 0:f947ed831c67 | 24 |