Skip to content

This Python code is about a i2c -D/A &A/D- device, PCF8591 library using wiring pi on Rasbperry pi 3. Plese feel free to use !

Notifications You must be signed in to change notification settings

ShuDiamonds/PCF8591

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PCF8591

This Python code is about a i2c -D/A &A/D- device, PCF8591 library using wiring pi on Rasbperry pi 3. Plese feel free to use !

Requirement

  • Raspberry pi 3
  • ubuntu16.04
  • Python 3.x
  • wiring pi
  • PCF8591

Setting

i2c enable

$ sudo raspi-config
  1. Choose Advanced Option
  2. Enable i2c

Wiring

Pin Assign

PCF8591 --------- Raspberry pi3
SDA ------------- GPIO2/SDA1
SCL ------------- GPIO3/SCL1
VCC ------------- 3.3V
GND ------------- GND

Features

  • Model number : PCF8591
  • Voltage : DC2.5V-6V
  • Analog Input Voltage : 0V-5V
  • Interface : i2c
  • A/D Resolution : 8bit

Usage

Basic Example

$ python3 PCF8591.py

D/A & A/D example

In this program, Raspberry pi read a variable register value(0-255) on PCF8591 default setting. And output to LED(located at lowwer in this picture) which is on PCF8591 using Digital analog converter.

$ python3 DA&ADexample.py

Licence

MIT

Related Articles

Author

ShuDiamonds

About

This Python code is about a i2c -D/A &A/D- device, PCF8591 library using wiring pi on Rasbperry pi 3. Plese feel free to use !

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages