![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
temperature sensor with uOLED 96 g1 & GSM Support
Dependencies: OLED160G1 mbed uOLED
Fork of DS18B20 by
DS18B20.h@1:b2ea1e9d90df, 2012-10-31 (annotated)
- Committer:
- Renato
- Date:
- Wed Oct 31 12:26:00 2012 +0000
- Revision:
- 1:b2ea1e9d90df
- Parent:
- 0:03ec282c2908
Test v1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Renato | 1:b2ea1e9d90df | 1 | #ifndef _DS18B20_ |
Renato | 1:b2ea1e9d90df | 2 | #define _DS18B20_ |
Renato | 1:b2ea1e9d90df | 3 | |
Renato | 1:b2ea1e9d90df | 4 | #include <stdint.h> |
Renato | 1:b2ea1e9d90df | 5 | #include "mbed.h" |
Renato | 1:b2ea1e9d90df | 6 | |
Renato | 1:b2ea1e9d90df | 7 | // Device Faimly ID and Setial number information |
Renato | 1:b2ea1e9d90df | 8 | typedef union { |
Renato | 1:b2ea1e9d90df | 9 | uint8_t rom[8]; |
Renato | 1:b2ea1e9d90df | 10 | struct { |
Renato | 1:b2ea1e9d90df | 11 | uint8_t familyCode; |
Renato | 1:b2ea1e9d90df | 12 | uint8_t serialNo[6]; |
Renato | 1:b2ea1e9d90df | 13 | uint8_t CRC; |
Renato | 1:b2ea1e9d90df | 14 | } BYTES; |
Renato | 1:b2ea1e9d90df | 15 | } ROM_Code_t; |
Renato | 1:b2ea1e9d90df | 16 | |
Renato | 1:b2ea1e9d90df | 17 | ROM_Code_t ReadROM() ; |
Renato | 1:b2ea1e9d90df | 18 | |
Renato | 1:b2ea1e9d90df | 19 | // temperature is store as 7.4 fixed point format (assuming 12 bit conversion) |
Renato | 1:b2ea1e9d90df | 20 | void displayTemperature(Serial& s) ; |
Renato | 1:b2ea1e9d90df | 21 | void showTemperature(float *f); |
Renato | 1:b2ea1e9d90df | 22 | |
feabhas | 0:03ec282c2908 | 23 | #endif |