yet another 18B20 Temperature sensor. variable number of sensors working in parasite mode, serial 16x2 display with diagnostic output and post to a rest web service
Dependencies: EthernetInterface HTTPClient NTPClient mbed-rtos mbed
ntp_proxy.cpp@0:53f05303850a, 2012-12-31 (annotated)
- Committer:
- wkinkeldei
- Date:
- Mon Dec 31 12:08:24 2012 +0000
- Revision:
- 0:53f05303850a
- Child:
- 1:9e88b2508768
first working version with all needed features implemented: measure, display, post
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wkinkeldei | 0:53f05303850a | 1 | #include "ntp_proxy.h" |
wkinkeldei | 0:53f05303850a | 2 | |
wkinkeldei | 0:53f05303850a | 3 | NtpProxy::NtpProxy(void) { |
wkinkeldei | 0:53f05303850a | 4 | ntp_client = new NTPClient(); |
wkinkeldei | 0:53f05303850a | 5 | } |
wkinkeldei | 0:53f05303850a | 6 | |
wkinkeldei | 0:53f05303850a | 7 | int NtpProxy::set_time(void) { |
wkinkeldei | 0:53f05303850a | 8 | NTPResult r = ntp_client->setTime("time.apple.com"); |
wkinkeldei | 0:53f05303850a | 9 | return r == NTP_OK; |
wkinkeldei | 0:53f05303850a | 10 | } |