getting_started:tutorials:hal3
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| getting_started:tutorials:hal3 [2017/05/03 07:40] – graf | getting_started:tutorials:hal3 [2026/05/13 10:55] (current) – ursgraf | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run '' | + | In the EEROS library you will find a directory with examples. |
| - | This examples reads and outputs periodically all 8 buttons and 8 axis of a XBox controller. Further, the safety system checks for the button ' | + | |
| - | If you connect several such controller you have to check in '' | + | The system either uses real hardware inputs and output or makes use of a simulated gpio device. You need to install the necessary wrapper library for gpio, see [[getting_started: |
| + | |||
| + | When using a simulated gpio device, make sure to load the kernel driver first and then create the device with | ||
| + | < | ||
| + | $ sudo modprobe gpio-sim | ||
| + | $ sudo mkdir / | ||
| + | $ sudo mkdir / | ||
| + | $ echo 32 | sudo tee / | ||
| + | $ echo 1 | sudo tee / | ||
| + | </ | ||
| + | |||
| + | Make sure that your local user has access to the device file. | ||
| + | < | ||
| + | $ sudo chown $USER:$USER / | ||
| + | </ | ||
| + | Open a shell in the build directory of your EEROS library and run | ||
| + | < | ||
| + | $ ./examples/hal/halTest4 -c HalTest4ConfigGpio.json | ||
| + | </ | ||
| + | |||
| + | It will start in safety level // | ||
| + | < | ||
| + | $ echo pull-up | sudo tee / | ||
| + | </ | ||
| + | or | ||
| + | < | ||
| + | $ echo pull-down | sudo tee / | ||
| + | </ | ||
| + | while reading the state of channel 0 with | ||
| + | < | ||
| + | $ cat / | ||
| + | </ | ||
| + | |||
| + | Next, change | ||
| + | < | ||
| + | $ echo pull-up | sudo tee / | ||
| + | </ | ||
| + | To change back to //slOne// change the level back to '0'. | ||
| + | < | ||
| + | $ echo pull-down | sudo tee / | ||
| + | </ | ||
getting_started/tutorials/hal3.1493790021.txt.gz · Last modified: (external edit)
