Demo of the sample LCD class, BMP280 Sensor and network with power on self test. Requires a network connectionb

Dependencies:   BMP280 TextLCD BME280

Committer:
noutram
Date:
Sat Nov 24 08:44:15 2018 +0000
Revision:
6:9a95a39d1cce
simplify;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
noutram 6:9a95a39d1cce 1 #ifndef MBED_NETWORKBITS_H
noutram 6:9a95a39d1cce 2 #define MBED_NETWORKBITS_H
noutram 6:9a95a39d1cce 3
noutram 6:9a95a39d1cce 4 #include "mbed.h"
noutram 6:9a95a39d1cce 5 #include "EthernetInterface.h"
noutram 6:9a95a39d1cce 6 #include "TCPServer.h"
noutram 6:9a95a39d1cce 7 #include "TCPSocket.h"
noutram 6:9a95a39d1cce 8 #include <iostream>
noutram 6:9a95a39d1cce 9 #include <string>
noutram 6:9a95a39d1cce 10
noutram 6:9a95a39d1cce 11
noutram 6:9a95a39d1cce 12 #define HTTP_STATUS_LINE "HTTP/1.0 200 OK"
noutram 6:9a95a39d1cce 13 #define HTTP_HEADER_FIELDS "Content-Type: text/html; charset=utf-8"
noutram 6:9a95a39d1cce 14 #define HTTP_MESSAGE_BODY1 "" \
noutram 6:9a95a39d1cce 15 "<html>" "\r\n" \
noutram 6:9a95a39d1cce 16 " <body style=\"display:flex;text-align:center\">" "\r\n" \
noutram 6:9a95a39d1cce 17 " <div style=\"margin:auto\">" "\r\n" \
noutram 6:9a95a39d1cce 18 " <h1>Hello World</h1>" "\r\n" \
noutram 6:9a95a39d1cce 19 " <p>The temperature is "
noutram 6:9a95a39d1cce 20
noutram 6:9a95a39d1cce 21 #define HTTP_MESSAGE_BODY2 "" \
noutram 6:9a95a39d1cce 22 "</p>" "\r\n" \
noutram 6:9a95a39d1cce 23 " </div>" "\r\n" \
noutram 6:9a95a39d1cce 24 " </body>" "\r\n" \
noutram 6:9a95a39d1cce 25 "</html>"
noutram 6:9a95a39d1cce 26
noutram 6:9a95a39d1cce 27 #define HTTP_RESPONSE HTTP_STATUS_LINE "\r\n" \
noutram 6:9a95a39d1cce 28 HTTP_HEADER_FIELDS "\r\n" \
noutram 6:9a95a39d1cce 29 "\r\n" \
noutram 6:9a95a39d1cce 30 HTTP_MESSAGE_BODY "\r\n"
noutram 6:9a95a39d1cce 31
noutram 6:9a95a39d1cce 32 #define IP "10.0.0.10"
noutram 6:9a95a39d1cce 33 #define NETMASK "255.0.0.0"
noutram 6:9a95a39d1cce 34 #define GATEWAY "10.0.0.1"
noutram 6:9a95a39d1cce 35
noutram 6:9a95a39d1cce 36 extern void networktest();
noutram 6:9a95a39d1cce 37
noutram 6:9a95a39d1cce 38 #endif