gobot.io/x/gobot/v2@v2.1.0/system/README.md (about) 1 # system 2 3 This document describes some basics for developers. 4 5 > The gobot package name is a little bit misleading, because also contains `/dev/i2c-*` usage with syscall for i2c 6 > interface and the file system mock for unit testing. 7 8 ## Change available features on TinkerOS (Tinkerboard) 9 10 Open the file /boot/config.txt and add lines/remove comment sign. Then save the file, close and reboot. 11 12 ### For PWM on TinkerOS (Tinkerboard) 13 14 intf:pwm2=on 15 intf:pwm3=on 16 17 ### For i2c on TinkerOS (Tinkerboard) 18 19 intf:i2c1=on 20 intf:i2c4=on 21 22 Device tree overlays can also be provided, e.g. "overlay=i2c-100kbit-tinker-overlay". 23 24 Create a dts-file "i2c1-100kbit-tinker-overlay.dts" with this content: 25 26 ```c 27 // Definitions for i2c1 with 100 kbit 28 /dts-v1/; 29 /plugin/; 30 31 / { 32 compatible = "rockchip,rk3288-evb-rk808-linux", "rockchip,rk3288"; 33 34 fragment@0 { 35 target = <&i2c1>; 36 __overlay__ { 37 status = "okay"; 38 clock-frequency = <100000>; 39 }; 40 }; 41 }; 42 ``` 43 44 Compile the tree overlay: 45 46 ```sh 47 dtc -@ -I dts -O dtb -o i2c1-100kbit-tinker-overlay.dtbo i2c1-100kbit-tinker-overlay.dts 48 ``` 49 50 Copy the file to "/boot/overlays/i2c-100kbit-tinker-overlay.dtbo" 51 52 > Package "device-tree-compiler" needs to be installed for "dtc" command. 53 54 ## Change available features on raspi 55 56 Start "raspi-config" and go to the menu "interface options". After change something save and reboot the device. 57 58 ## Change available features on armbian 59 60 Install the armbian-config utility (howto is shown after each login) and start it. 61 62 ### For i2c on armbian 63 64 Open the related menu entry and activate/deactivate the needed features. 65 66 ### For PWM on armbian 67 68 Go to the device tree menu - this opens the device tree for editing. 69 Looking for the pwm entries. There are some marked with "disabled". Change the entry to "okay" for your needed pwm. 70 71 Example for Tinkerboard: 72 73 ff680020 => pwm2, pin33 74 ff680030 => pwm3, pin32 75 76 ## Next steps for developers 77 78 * test [gpio](GPIO.md) 79 * test [pwm](PWM.md) 80 * background information for [i2c](I2C.md) in gobot 81 82 ## Links 83 84 * <https://www.digi.com/resources/documentation/digidocs/embedded/dey/3.0/cc8x/bsp_r_create-dt-overlays>