| Access Server: User's and Developer's Guide | ||
|---|---|---|
| <<< Previous | Next >>> | |
The Bluegiga I/O API defines how to access Access Server's LEDs, buzzer, and general purpose I/O.
Access Server's LEDs and buzzer can be accessed through the /dev/led device. You can check the status of the LEDs and the buzzer with the cat /dev/led command and set LEDs or the buzzer with the echo abcde > /dev/led command. An upper case letter means that the LED or buzzer is ON, a lower case letter means that the LED or buzzer is OFF. Letter "a" is the buzzer, letters "b".."e" are LEDs 1..4.
Example:
[root@wrap /] echo abCDe > /dev/led
|
The Digital I/O pins of Access Server can be controlled write-only by using the /dev/io device in the same way as the /dev/led device for LEDs and buzzer described above.
The letter-to-I/O mapping of the 16 pins is as follows, when looking at the connector:
hgfedcba
Xijklmno
|
X is the ground pin (and cannot be set).
o is the voltage sense pin (user can use any voltage from 3.3V to 5.0V).
The I/O must first be enabled by using the echo Z > /dev/io command. After that, pins can be driven up by echoing the corresponding upper case letter (A-N) or down by echoing a lower case letter (a-n) to the /dev/io device.
Example:
[root@wrap /] echo ZaBcD > /dev/io
|
| <<< Previous | Home | Next >>> |
| iWRAP - Bluetooth Interface | Advanced Use Cases for Access Server |