RockPi-S Karel Slavicek Vaclav Oujezsky 2024 Content ● Hardware Overview ● Getting started ● Ovelays ● Libraries Hardware Overview ● Linux based microcontroller ● USD instead of disk ● Most of common interfaces Development board ● UART = UART0 ● I2C = I2C1 ● SPI = SPI2 ● GP1 = GPIO2_A5 ● GP2 = GPIO0_C0 ● GP3 = GPIO2_B2 ● GP4 = GPIO0_C1 ● GP5 = GPIO2_B4 ● GP6 = GPIO2_B0 ● GP7 = GPIO2_B3 ● GP8 = GPIO2_A6 Download and Flash Debian Image ● Etcher - flash application – https://etcher.balena.io/#download-etcher – balenaEtcher-1.18.11-x64.AppImage ● Debian Image ● https://wiki.radxa.com/RockpiS/downloads ● https://is.muni.cz/auth/el/fi/podzim2023/PV284/um/lab_examples/rock pi/ Connection to RockPI ● adb shell ● Debian: apt-get install adb ● Windows: – https://wiki.radxa.com/Rock/windows_adb – https://www.getdroidtips.com/how-to-install-adb-and-fastboot- on-windows/ ● ip add – get ip address ● Putty / ssh – Username rock, password rock RockPi S pinout Tuning /boot/uEnv.txt ● fdtfile=rockchip/rk3308-rock-pi-s.dtb ● overlays=rk3308-console-on-uart0 rk3308-i2c0 rk3308-i2c1 rk3308-i2c3-m0 ● console=ttyS0,9600n8 ● rootuuid=37055840-4ec4-444f-979b-9e47ee4bd848 Dealing with GPIO ● Direct work with GPIO possible but uncomfortable: ● cd /sys/class/gpio ● echo X > export ● X = 32*Gpio_num + 8*Gpio_gate + Gpio_pin ● Gpio_gate A=0, B=1, … ● cd gpioX ● echo out > direction ● echo 1 > value Install libraries ● https://wiki.radxa.com/RockpiS/dev/libmraa ● apt-get update -- fix-missing ● apt-get upgrade ● apt-get install libmraa ● apt-get install -y build-essential libmraa ● mraa-gpio list ● A test with push-button application: ● mrra-gpio set 12 0 ● 12 = GP-1 GPIO2_A5 (LED pin in the hardware description) ● 0 = pin’s value libmraa ● cp -av /usr/local/share/mraa/examples/c /home/rock/mraa-examples ● cd /home/rock/mraa-examples ● Compiling - example: ● rock@rockpis:~/mraa-examples$ gcc -o test-spi testspi.c -lmraa libmraa - examples ● All materials can be found on GIT FI after logging in with your faculty account. ● https://gitlab.fi.muni.cz/iot-courses/pv284/-/tree/main/Labs/Lab6-rock-pi? ref_type=headshttps://is.muni.cz/auth/go/acxh39 Now it is the time for your own experiments!