Difference between revisions of "IoTGateway/Features/Linux/Peripheral"
From ESS-WIKI
Daniel.hung (talk | contribs) |
Weichih.lin (talk | contribs) (add IR control) |
||
Line 52: | Line 52: | ||
==Watchdog== | ==Watchdog== | ||
Example | Example | ||
+ | |||
+ | ==IR== | ||
+ | To decode the infrared signals and provide an uniform interface | ||
+ | lircd -d /dev/lirc0 | ||
+ | |||
+ | used parameters: | ||
+ | -d --device=device read from given device | ||
+ | -u --uinput generate Linux input events | ||
+ | |||
+ | Executes commands on an IR signal decoded by lircd, | ||
+ | irexec -d /devlirc0 | ||
+ | |||
+ | Note: | ||
+ | if show these message after running lircd | ||
+ | lircd: can't open or create /var/run/lirc/lircd.pid | ||
+ | lircd: No such file or directory | ||
+ | It has to add the "/var/run/lirc" folder | ||
+ | mkdir /var/run/lirc | ||
+ | |||
+ | How to debug: | ||
+ | |||
+ | 1. To check that signals are decoded correctly | ||
+ | mode2 -d /dev/lirc0 | ||
+ | It repeats to show "space" and "pulse" while clicking a control button | ||
+ | space 8451531 | ||
+ | pulse 476 | ||
+ | |||
+ | 2. To check input events. | ||
+ | |||
+ | First, It must add the parameter,"-u", in lircd command | ||
+ | lircd -d /dev/lirc0 -u | ||
+ | It will register at inputX, | ||
+ | input: lircd as /devices/virtual/input/input1 | ||
+ | Run evtest to check events | ||
+ | evtest -d /dev/input/event1 |
Revision as of 03:34, 5 August 2016
Contents
ADC
analogue to digital converters
Backlight
Enable/read and modify backlight brightness
Camera
Example
CAN Bus
CAN subsystem
CPU Frequency
Example
Ethernet
Example
Framebuffer
Example
GPIO
Example
I2C
Example
JEDIA
Example
One Wire
Example
RTC
Example
SATA
Example
SD/MMC
Example
SPI
Example
UART
Example
USB
Example
Watchdog
Example
IR
To decode the infrared signals and provide an uniform interface
lircd -d /dev/lirc0
used parameters:
-d --device=device read from given device -u --uinput generate Linux input events
Executes commands on an IR signal decoded by lircd,
irexec -d /devlirc0
Note: if show these message after running lircd
lircd: can't open or create /var/run/lirc/lircd.pid lircd: No such file or directory
It has to add the "/var/run/lirc" folder
mkdir /var/run/lirc
How to debug:
1. To check that signals are decoded correctly
mode2 -d /dev/lirc0
It repeats to show "space" and "pulse" while clicking a control button
space 8451531 pulse 476
2. To check input events.
First, It must add the parameter,"-u", in lircd command
lircd -d /dev/lirc0 -u
It will register at inputX,
input: lircd as /devices/virtual/input/input1
Run evtest to check events
evtest -d /dev/input/event1