![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Alix & Sam's combined versions
Dependencies: BMP280 ELEC350-Practicals-FZ429 TextLCD BME280 ntp-client
Initialization.hpp@11:42b0c567cc8c, 2018-12-13 (annotated)
- Committer:
- Alix955
- Date:
- Thu Dec 13 15:46:07 2018 +0000
- Revision:
- 11:42b0c567cc8c
- Parent:
- 9:f5eae5211225
Newest version of alix & sam
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Alix955 | 9:f5eae5211225 | 1 | #ifndef __Initialization__ |
Alix955 | 9:f5eae5211225 | 2 | #define __Initialization__ |
Alix955 | 9:f5eae5211225 | 3 | |
Alix955 | 9:f5eae5211225 | 4 | #include "mbed.h" |
Alix955 | 9:f5eae5211225 | 5 | #include "EthernetInterface.h" |
Alix955 | 9:f5eae5211225 | 6 | #include "ntp-client/NTPClient.h" |
Alix955 | 9:f5eae5211225 | 7 | |
Alix955 | 9:f5eae5211225 | 8 | |
Alix955 | 9:f5eae5211225 | 9 | #define IP "10.0.0.10" |
Alix955 | 9:f5eae5211225 | 10 | |
Alix955 | 9:f5eae5211225 | 11 | #define NETMASK "255.0.0.0" |
Alix955 | 9:f5eae5211225 | 12 | |
Alix955 | 9:f5eae5211225 | 13 | #define GATEWAY "10.0.0.2" |
Alix955 | 9:f5eae5211225 | 14 | |
Alix955 | 9:f5eae5211225 | 15 | |
Alix955 | 9:f5eae5211225 | 16 | EthernetInterface eth; |
Alix955 | 9:f5eae5211225 | 17 | |
Alix955 | 9:f5eae5211225 | 18 | eth.set_network(IP, NETMASK, GATEWAY); |
Alix955 | 9:f5eae5211225 | 19 | |
Alix955 | 9:f5eae5211225 | 20 | eth.connect(); |
Alix955 | 9:f5eae5211225 | 21 | |
Alix955 | 9:f5eae5211225 | 22 | NTPClient ntp(ð); |
Alix955 | 9:f5eae5211225 | 23 | |
Alix955 | 9:f5eae5211225 | 24 | |
Alix955 | 9:f5eae5211225 | 25 | |
Alix955 | 9:f5eae5211225 | 26 | #endif |