Joy-it RB-ADC01 Quick Start Manual Download Page 3

 

 

sudo raspi

-

config

 

5. CODE EXAMPLE

 

For the analog 

-

 digital converter you have to enable I2C on your Raspber-

ry Pi. To do this, enter the following command into your console to ac-

cess the settings of your Raspberry Pi.

 

Now call 

3 Interface Options 

→ 

I5 I2C

 

Now activate I2C.

 

Now, run the following commands to install all the required libraries.

 

sudo apt update

 

sudo apt install python3

-

pip

 

sudo apt

-

get install python3

-

smbus i2c

-

tools 

-

y

 

For  our  code  example  we  use 

Adafruit_CircuitPython_ADS1x115

  from 

Adafruit

,  which  is  released  under  the 

MIT  license

.  You  install  this  library 

with the following command.

 

sudo pip3 install adafruit

-

circuitpython

-

ads1x15

 

Reviews: