Difference between revisions of "RockpiS/dev/libmraa"
(→Install essential packages) |
(→Hardware V10) |
||
Line 46: | Line 46: | ||
PIN26 GPIO1_B2 | PIN26 GPIO1_B2 | ||
− | + | 3 I2C: | |
PIN23 I2C'''0'''_SDA | PIN23 I2C'''0'''_SDA | ||
PIN24 I2C'''0'''_SCL | PIN24 I2C'''0'''_SCL | ||
Line 53: | Line 53: | ||
PIN13 I2C'''2'''_SDA | PIN13 I2C'''2'''_SDA | ||
PIN15 I2C'''2'''_SCL | PIN15 I2C'''2'''_SCL | ||
− | + | ||
− | + | ||
− | + | 1 SPI: | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
PIN19 SPI'''2'''TX | PIN19 SPI'''2'''TX | ||
PIN21 SPI'''2'''RX | PIN21 SPI'''2'''RX | ||
Line 67: | Line 62: | ||
3 UART: | 3 UART: | ||
− | + | PIN8 UART'''0'''_TX | |
− | + | PIN10 UART'''0'''_RX | |
PIN23 UART'''1'''_TX | PIN23 UART'''1'''_TX | ||
PIN24 UART'''1'''_RX | PIN24 UART'''1'''_RX | ||
Line 74: | Line 69: | ||
PIN21 UART'''2'''_TX | PIN21 UART'''2'''_TX | ||
− | + | 2 PWM: | |
− | + | PIN11 PWM'''2''' | |
− | + | PIN13 PWM'''3''' | |
− | + | ||
==== Test ==== | ==== Test ==== |
Revision as of 07:08, 25 February 2020
ROCK Pi S > Development > Install Libmraa
Contents
Libmraa on ROCK Pi S
This guide describes how to use libmraa on ROCK Pi S.
Install essential packages
Package libmraa-rockpis is in the Radxa APT buster-testing repository. Edit file /etc/apt/sources.list.d/apt-radxa-com.list and add the following:
For Debian Buster
deb http://apt.radxa.com/buster-testing/ buster main
Get the pub key
wget -O - apt.radxa.com/buster-testing/public.key | sudo apt-key add -
Install essential packages:
sudo apt-get update sudo apt-get install -y rockchip-overlay rockpis-dtbo libmraa-rockpis
Enable interface
See ROCK Pi S GPIO pintout. ROCK Pi S has a 26-pin colorful expansion header. Each pin is distinguished by color. mraa define follow:
Hardware V10
16 GPIO:
PIN03 GPIO2_A2 PIN05 GPIO2_B0 PIN07 GPIO2_B3 PIN09 GPIO4_C4 PIN11 GPIO4_C2 PIN12 GPIO4_A3 PIN13 GPIO4_C6 PIN15 GPIO4_C5 PIN16 GPIO4_D2 PIN18 GPIO4_D4 PIN19 GPIO1_B0 PIN21 GPIO1_A7 PIN22 GPIO4_D5 PIN23 GPIO1_B1 PIN24 GPIO1_B2 PIN26 GPIO1_B2
3 I2C:
PIN23 I2C0_SDA PIN24 I2C0_SCL PIN3 I2C1_SCL PIN5 I2C1_SDA PIN13 I2C2_SDA PIN15 I2C2_SCL
1 SPI:
PIN19 SPI2TX PIN21 SPI2RX PIN23 SPI2CLK PIN24 SPI2CSN
3 UART:
PIN8 UART0_TX PIN10 UART0_RX PIN23 UART1_TX PIN24 UART1_RX PIN19 UART2_RX PIN21 UART2_TX
2 PWM:
PIN11 PWM2 PIN13 PWM3
Test
test gpio
test pwm
test uart
test spi
test adc
Development
More introduction of libmraa can look at libmraa official website.