Notice: This page contains information for the legacy Phidget21 Library. Phidget21 is out of support. Bugfixes may be considered on a case by case basis. Phidget21 does not support VINT Phidgets, or new USB Phidgets released after 2020. We maintain a selection of legacy devices for sale that are supported in Phidget21. We recommend that new projects be developed against the Phidget22 Library.
|
Web Page on the SBC: Difference between revisions
No edit summary |
No edit summary |
||
Line 35: | Line 35: | ||
The SBC already runs a web server, with the pages to be served located in {{Code|/var/www}}. We take advantage of this by creating a web page using a cgi-bin Python script | The SBC already runs a web server, with the pages to be served located in {{Code|/var/www}}. We take advantage of this by creating a web page using a cgi-bin Python script | ||
[[Image:app_guide_sbcweb_cgibin_flow.png | [[Image:app_guide_sbcweb_cgibin_flow.png|500px|link=|alt=]] | ||
Revision as of 17:36, 19 March 2012
The project described here creates a website hosted on the Phidget Single Board Computer (SBC). The website can both serve static pages, as well as pages that can send simple requests back and forth to the Phidgets attached to the SBC.
With this kind of system, you only need to develop cross-browser compatible web pages, as the code to control the Phidget runs on the SBC.
Practical concepts covered are (click on links to see other projects on that topic):
|
File:TBD |
As with any of our described projects, Phidgets takes care of the electrical component design. This is a middle-ground solution to controlling Phidgets over a network using the SBC.
- If you just want data to go back and forth between Phidgets and your computer - via the SBC - over the network, you probably want the simple example in the Use Phidgets Wirelessly with the SBC guide.
- If you want something more powerful and flexible than the CGI in this guide to control Phidgets over a network, you may be interested in the full Web Server on the SBC guide.
Time: A few hours
Special Needed Tools: A Phidget SBC, Ethernet and power cords (or Wireless), an LED, and your computer.
You should have already worked through the 1072 - Getting Started page to have set up the network on your SBC and obtained its IP or local link address.
You should also have:
- Set up SSH on the SBC as described on the OS - Phidget SBC page, and
- Installed Python on the SBC as described on the OS - Phidget SBC page
Introduction
The SBC already runs a web server, with the pages to be served located in /var/www
. We take advantage of this by creating a web page using a cgi-bin Python script