Use a touchscreen display to select which sensor measurement to display
Dependencies: mbed DisplayModule24_demo_day10
tmp.h@3:4cd5469a146f, 2017-01-17 (annotated)
- Committer:
- ldelaney17
- Date:
- Tue Jan 17 19:00:27 2017 +0000
- Revision:
- 3:4cd5469a146f
- Child:
- 4:3d5abdf9ad0e
add tmp.cpp and tmp.h from the day 7 miniproject. ; ; modify the code to only print when in DEBUG_MODE
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ldelaney17 | 3:4cd5469a146f | 1 | #ifndef TEMP_H |
ldelaney17 | 3:4cd5469a146f | 2 | #define TEMP_H |
ldelaney17 | 3:4cd5469a146f | 3 | |
ldelaney17 | 3:4cd5469a146f | 4 | extern I2C connection; |
ldelaney17 | 3:4cd5469a146f | 5 | extern Serial pc; |
ldelaney17 | 3:4cd5469a146f | 6 | const int temp_addr = 0x90; |
ldelaney17 | 3:4cd5469a146f | 7 | |
ldelaney17 | 3:4cd5469a146f | 8 | //initialize the sensor |
ldelaney17 | 3:4cd5469a146f | 9 | void temp_init(); |
ldelaney17 | 3:4cd5469a146f | 10 | |
ldelaney17 | 3:4cd5469a146f | 11 | //reads the current temperature and prints it in degrees Celsius if DEBUG_MODE is defined |
ldelaney17 | 3:4cd5469a146f | 12 | float get_temp(); |
ldelaney17 | 3:4cd5469a146f | 13 | |
ldelaney17 | 3:4cd5469a146f | 14 | #endif |