Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
en:c1_enhancement_gpio40 [2014/12/31 18:33] tobetter created |
en:c1_enhancement_gpio40 [2016/03/08 16:50] odroid [Enhancement of 40pin GPIO] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Enhancement of 40pin GPIO ====== | ||
+ | The **ODROID-C2** provides 40Pin GPIOs. | ||
+ | **Easy to use GPIOs** \\ | ||
+ | First, you refer to below link. \\ | ||
+ | You check Export number that you want to use GPIO. \\ | ||
+ | [[en:c2_hardware&#expansion_connectors | Pin description]] | ||
+ | |||
+ | ** You need to enter into super-user mode first to run below commands !! ** | ||
+ | <code> sudo su </code> | ||
+ | |||
+ | Create a GPIO file access.\\ | ||
+ | You can access GPIOs using sysfs interface. This example uses pin number 18 which is connected to the GPIO233(GPIOX.BIT5). | ||
+ | echo 233 > /sys/class/gpio/export | ||
+ | Configure the pin direction for input | ||
+ | echo in > /sys/class/gpio/gpio233/direction | ||
+ | Configure the pin direction for output | ||
+ | echo out > /sys/class/gpio/gpio233/direction | ||
+ | Read a value (if gpio direction is input) | ||
+ | cat /sys/class/gpio/gpio233/value | ||
+ | Write a value (if gpio direction is output) | ||
+ | echo 1 > /sys/class/gpio/gpio233/value : gpio high | ||
+ | echo 0 > /sys/class/gpio/gpio233/value : gpio low | ||
+ | |||
+ | ===== I2C ===== | ||
+ | [[en:c1_hardware_i2c|I2C]] | ||
+ | ===== PWM ===== | ||
+ | [[en:c1_hardware_pwm|PWM]] | ||
+ | ===== UART ===== | ||
+ | [[en:c1_hardware_uart|UART]] | ||
+ | ===== 1-Wire ===== | ||
+ | [[en:c1_hardware_1w|1-Wire]] | ||
+ | ===== ADC ===== | ||
+ | [[en:c1_hardware_adc|ADC]] |