Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "RockpiS/dev/libmraa"

< RockpiS‎ | dev
(Created page with "{{rockpiS_header}} {{Languages|rockpiS/dev/libmraa}} ROCK Pi S > Development > Install Libmraa = Libmraa...")
 
(Enable interface)
Line 53: Line 53:
 
See ROCK Pi S [[rockpiS/hardware/gpio | GPIO pintout]].
 
See ROCK Pi S [[rockpiS/hardware/gpio | GPIO pintout]].
  
 +
=== 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
 +
 +
4 I2C:
 +
    PIN23      I2C'''0'''_SDA
 +
    PIN24      I2C'''0'''_SCL
 +
    PIN3      I2C'''1'''_SCL
 +
    PIN5      I2C'''1'''_SDA
 +
    PIN13      I2C'''2'''_SDA
 +
    PIN15      I2C'''2'''_SCL
 +
    PIN12      I2C'''3'''_SCL
 +
    PIN26      I2C'''3'''_SDA
 +
 +
2 SPI:
 +
    PIN9      SPI'''0'''RX
 +
    PIN11      SPI'''0'''TX
 +
    PIN13      SPI'''0'''CLK
 +
    PIN15      SPI'''0'''CSN
 +
    PIN19      SPI'''2'''TX
 +
    PIN21      SPI'''2'''RX
 +
    PIN23      SPI'''2'''CLK
 +
    PIN24      SPI'''2'''CSN
 +
 +
3 UART:
 +
    PIN9      UART'''0'''_TX
 +
    PIN11      UART'''0'''_RX
 +
    PIN23      UART'''1'''_TX
 +
    PIN24      UART'''1'''_RX
 +
    PIN19      UART'''2'''_RX
 +
    PIN21      UART'''2'''_TX
 +
 +
3 PWM:
 +
    PIN22      PWM'''1'''
 +
    PIN26      PWM'''2'''
 +
    PIN12      PWM'''3'''
  
 
== Test ==
 
== Test ==

Revision as of 08:02, 4 July 2019

       ROCK Pi S >  Development >  Install Libmraa 


Libmraa on ROCK Pi S

Package libmraa-rockpis is in Radxa APT bionic-testing and stretch-testing repositories.

Below is the instructions of how to install libmraa and use it.

Install essential packages

Edit file /etc/apt/sources.list.d/apt-radxa-com.list and add the following:

For Debian Stretch

   deb http://apt.radxa.com/stretch-testing/ stretch main

For Ubuntu bionic

   deb http://apt.radxa.com/bionic-testing/ bionic main

Get the pub key

   wget -O -  apt.radxa.com/stretch-testing/public.key | sudo apt-key add -

Update

   sudo apt-get update && sudo apt-get upgrade

Install essential packages:

   sudo apt-get install -y rockchip-fstab && sudo apt-get install -y rockchip-overlay && sudo apt-get install -y rockpis-dtbo

Install the latest u-boot and kernel:

   apt-get install rockpis-rk-u-boot-latest

Manually run the u-boot flash script

   /usr/local/sbin/rockpis_upgrade_bootloader.sh

Type YES to perform the uboot.img flashing.

Install kernel

   apt-get install linux-base
   apt-get install linux-4.4-rockpis-latest

After installation, check file /boot/extlinux/extlinux.conf. It lists all kernel version installed in ROCK Pi S. The kernel corresponding to the first label is the newest version and the first boot option.

Install libmraa-rockpis

   apt-get install libmraa-rockpis

Enable interface

See ROCK Pi S GPIO pintout.

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

4 I2C:

   PIN23      I2C0_SDA
   PIN24      I2C0_SCL
   PIN3       I2C1_SCL
   PIN5       I2C1_SDA
   PIN13      I2C2_SDA
   PIN15      I2C2_SCL
   PIN12      I2C3_SCL
   PIN26      I2C3_SDA

2 SPI:

   PIN9       SPI0RX
   PIN11      SPI0TX
   PIN13      SPI0CLK
   PIN15      SPI0CSN
   PIN19      SPI2TX
   PIN21      SPI2RX
   PIN23      SPI2CLK
   PIN24      SPI2CSN

3 UART:

   PIN9       UART0_TX
   PIN11      UART0_RX
   PIN23      UART1_TX
   PIN24      UART1_RX
   PIN19      UART2_RX
   PIN21      UART2_TX

3 PWM:

   PIN22      PWM1
   PIN26      PWM2
   PIN12      PWM3

Test

test gpio

test pwm

test uart

test spi

test adc