Someone in the Forum said they wanted to get a car with the infrared control gpio and asked me how to get it. I wrote this post.
I soldered four LEDs on the gpio port, representing the upper, lower, and lower layers.
You can not only control gpio, but also execute any shell.
It's not lirc, It's a lightweight infrared receiver I wrote.
CBOs GM has
Running method (Please load the infrared Driver First ):
Cd ~ /Source_code/IR
./IR
Then press a button on the remote control (I press "up") to obtain
Get key event!
Key 112 pressed
Get key event!
Key 112 released
Write down the key code (My name is 112), and then:
CD cmd
Nano performance_pressed
Replace 112 with the number you noted down.
Change the content:
#! /Bin/sh
# Hong LV Huang Tou
~ /Source_code/gpio 0 1
It indicates that when 112 is pressed, the 0 port is set to a high level.
Edit pai_released (replace 112 with your key code ):
#! /Bin/sh
# Hong LV Huang Tou
~ /Source_code/gpio 0 0
Set to low
Connect the led to pd0 And Gnd and run:
CD ..
./IR
Then press the button. Is the light on?
Original tll
Http://forum.cubietech.com/forum.php? MoD = viewthread & tid = 979.
Infrared Control gpio