knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(rpigpior)

About I2C on Raspberry Pi

Inter-Integrated Circuit Communication

Uses Serial Data Line (SDA, board pin 3) and Serial Clock Line (SCL, board pin 5)

RPI has two hardware i2c buses. Software buses can also be created

Installing I2C

Requires turning on i2c from Raspi-config

use i2cdetect -y 1 to show devices connected to i2c bus

i2c-tools

i2c-tools is already installed with Raspberry Pi Operating System

https://github.com/epsylon3/android_external_i2c-tools/tree/gingerbread/tools

Handling Errors:

stop("You must specify a chip_address as an integer between 0x08 and 0x77")

stop("You must specify a data_address as an integer between 0x00 and 0xFF")



mnr/rpigpior documentation built on May 3, 2024, 12:14 a.m.