All sensors sending to server via http
Dependencies: C12832 CCS811 MMA7660 Sht31 TSL2561 mbed-http vl53l0x_api
Fork of HTTP-Python-Demo by
server/server.py
- Committer:
- Jenny Plunkett
- Date:
- 2017-11-14
- Revision:
- 0:c5b042cf8162
File content as of revision 0:c5b042cf8162:
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer import SocketServer import socket class MyHandler(BaseHTTPRequestHandler): # HTTP REQUESTS HERE def run(): httpd = HTTPServer(('', 8080), MyHandler) print "HTTP server running on port 8080" print "Your IP address is: ", socket.gethostbyname(socket.gethostname()) httpd.serve_forever() if __name__ == '__main__': run()