amescon RasPiComm Manuel de l'utilisateur - Page 6

Parcourez en ligne ou téléchargez le pdf Manuel de l'utilisateur pour {nom_de_la_catégorie} amescon RasPiComm. amescon RasPiComm 7 pages. Extension board for the raspberry pi single-board computer

User

4.2. Serial Port / RS-232

By default the RS-232 port is used by the Raspberry Pi's startup routine and needs to be reconfigured
for use. The setup script does so automatically. Please note that a restart is required, after which you
can use standard libraries to access the serial port. The device name is:
/dev/ttyAMA0
Example code for C or C++:
int fd = open("/dev/ttyAMA0", O_RDWR | O_NOCTTY | O_NDELAY); ...
Our
Sample Applications
/dev/ttyRPC0 by its RS-232 counterpart /dev/ttyAMA0.

4.3. Joystick

The joystick is mapped to the following GPIOs:
1. 4 = right side (towards HDMI)
2. 22 = push
3. 23 = bottom side (towards power connection)
4. 24 = left side (towards audio out)
5. 25 = top side(towards usb)
You can use linux standard libraries to access the joystick in the same way as the serial port.
Example code for C or C++:
int fd = open("/sys/class/gpio/gpio22/value", O_RDONLY); ...

4.4. Outputs (LEDs)

The Output is mapped to the following GPIOs:
Output 1 (D1): GPIO 18
Output 2 (D2): GPIO 21 (Raspberry Pi rev.1) or GPIO 27 (Raspberry Pi rev.2)
amescon
Manual
can be adapted for use with the RS-232 port by replacing the RS-485 name
6