lingua italiano  lingua inglese

Fonera - GPIO

General functioning:
The purpose of this project is to manage an external circuit using a Fonera 2200, without soldering or internal connections to the device.
 
The system is composed of:
-- FONERA 2200 with Linux OpenWRT OS subsequently provided, connected to an external network to remotely manage the desired circuit
-- CLIENT software that allows access to the Fonera via SSH terminal
-- CONTROL CIRCUIT that maintains a photoresistor through an external DC circuit , which can be connected even after a relay for controlling an AC circuit.
circuito generale fonera-gpio
Structure hardware:
The system for its operation requires both a software settings that the realization of simple hardware connections
 
The electrical circuit is simply composed of a photoresistor and a LED.
The photoresistor positioned above the LED on the Fonera WiFi, to vary the brightness of the LED will change its resistance value, allowing the ignition of the second LED. The configuration of components is:
schema elettrico
fotoresistenza
Structure software:
So that we can run the lights on the wifi, must first pass a version of the fonera OpenWRT.
At this link is possible to download a version kindly compiled by my colleague Marco Ferrara.
 
barra nome del sito  OpenWrt-7.09
 
Once entered into the fonera via ssh, so that we can run the lights on the wifi, load modules gpio running the following commands:
 
#  cd /tmp
#  wget "http://fghhgh.150m.com/proc_gpio.ko"
#  insmod proc_gpio.ko
 
To test whether the modules were loaded correctly, just go to the folder /proc/ and find a folder gpio, or by sending the command lsmod to find the list form proc_gpio.
 
Now to turn-on the lights on the wifi, and thus the lights on the external circuit, just run the following codes:
 
#  echo 1 > /proc/gpio/2_dir
#  echo 1 > /proc/gpio/2_out
(turn-on LED)
 
#  echo 1 > /proc/gpio/2_dir
#  echo 0 > /proc/gpio/2_out
(turn-off LED)
 
Considerations:
With this circuit you can run a circuit DC and the led of WiFi is disabled by default, otherwise it would interfere with the operation described.

( This page is not yet in its final version, are not excluded further design changes to improve its efficiency ).