Interactivity on the web
- Requests from the user
- The usual browser/server interaction
- Obtain information using using the GET or POST methods of HTTP, the Hypertext Transfer Protocol
- Action of the browser
- Load a page
- Run a script using the XMLHttpRequest API with data, typically provided in JSON or XML
An example
This is an example of a use of JSON that is not a database application, but illustrates how web applications can use XMLHttpRequest to update a web page.
- Sample JSON output
- Completed “module”
- UM6 Orientation sensor
- Arduino
program to read from UM6 and write,
in
printOrientation, JSON to XBee - An XBee
- XBee USB adapter for Linux computer
- Python program to read JSON from XBee and write JSON to web server
- HTML page for displaying formatted JSON
- JavaScript to request JSON and modify web page
- module under test