Scripts:I2C

From Autopilot Wiki
Revision as of 19:49, 30 November 2021 by Jonny (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Stub!

    'i2c': {
        'type': 'bool',
        'text': 'Enable i2c and set baudrate to 100kHz',
        'commands': [
            'sudo sed -i \'s/^#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g\' /boot/config.txt',
            'sudo sed -i \'$s/$/\ni2c_arm_baudrate=100000/\' /boot/config.txt',
            'sudo sed -i \'$s/$/\ni2c-dev/\' /etc/modules',
            'sudo dtparam i2c_arm=on',
            'sudo modprobe i2c-dev'
        ]
    }