Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.
This is sample code not yet complete.
- when Wifi connected need to close the softAP.
| # | |
| # Based upon the NCSA server configuration files originally by Rob McCool. | |
| # | |
| # This is the main Apache server configuration file. It contains the | |
| # configuration directives that give the server its instructions. | |
| # See http://httpd.apache.org/docs/2.2/ for detailed information about | |
| # the directives. | |
| # | |
| # Do NOT simply read the instructions in here without understanding | |
| # what they do. They're here only as hints or reminders. If you are unsure |
| /* | |
| Web Server returning data as JSON-P, adapted from http://arduino.cc/en/Tutorial/WebServer | |
| A simple web server that returns the value of the analog input pins as | |
| a JSON-P object, using an Arduino Wiznet Ethernet shield. | |
| Circuit: | |
| * Ethernet shield attached to pins 10, 11, 12, 13 (standard configuration) | |
| * Analog inputs attached to pins A0 through A5 (optional) | |
| * Example of reading LM35 on pin A0: |
| """ | |
| Find maximum memory consumed by a process specified at the command-line. | |
| Usage: | |
| $ python memory-usage-wait3.py cmd arg1 arg2 | |
| """ | |
| import os | |
| import sys | |
| import threading |
| #!/usr/bin/env python | |
| # Copyright (C) 2006 by Johannes Zellner, <[email protected]> | |
| # modified by [email protected] to fit my output needs | |
| # modified by [email protected] to fit my output needs | |
| # Source: http://emerg3nc3.wordpress.com/2012/07/28/full-256-color-support-for-vim-andor-xterm-on-ubuntu-12-04/ | |
| import sys | |
| import os | |
| def echo(msg): |