temperature sensor with uOLED 96 g1 & GSM Support
Dependencies: OLED160G1 mbed uOLED
Fork of DS18B20 by
DS18B20.h@0:03ec282c2908, 2010-01-29 (annotated)
- Committer:
- feabhas
- Date:
- Fri Jan 29 19:01:56 2010 +0000
- Revision:
- 0:03ec282c2908
- Child:
- 1:b2ea1e9d90df
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
feabhas | 0:03ec282c2908 | 1 | #ifndef _DS18B20_ |
feabhas | 0:03ec282c2908 | 2 | #define _DS18B20_ |
feabhas | 0:03ec282c2908 | 3 | |
feabhas | 0:03ec282c2908 | 4 | #include <stdint.h> |
feabhas | 0:03ec282c2908 | 5 | #include "mbed.h" |
feabhas | 0:03ec282c2908 | 6 | |
feabhas | 0:03ec282c2908 | 7 | // Device Faimly ID and Setial number information |
feabhas | 0:03ec282c2908 | 8 | typedef union { |
feabhas | 0:03ec282c2908 | 9 | uint8_t rom[8]; |
feabhas | 0:03ec282c2908 | 10 | struct { |
feabhas | 0:03ec282c2908 | 11 | uint8_t familyCode; |
feabhas | 0:03ec282c2908 | 12 | uint8_t serialNo[6]; |
feabhas | 0:03ec282c2908 | 13 | uint8_t CRC; |
feabhas | 0:03ec282c2908 | 14 | } BYTES; |
feabhas | 0:03ec282c2908 | 15 | } ROM_Code_t; |
feabhas | 0:03ec282c2908 | 16 | |
feabhas | 0:03ec282c2908 | 17 | ROM_Code_t ReadROM() ; |
feabhas | 0:03ec282c2908 | 18 | |
feabhas | 0:03ec282c2908 | 19 | // temperature is store as 7.4 fixed point format (assuming 12 bit conversion) |
feabhas | 0:03ec282c2908 | 20 | void displayTemperature(Serial& s) ; |
feabhas | 0:03ec282c2908 | 21 | |
feabhas | 0:03ec282c2908 | 22 | #endif |