Comments (2)
The error looks like the I2C device can't be found, possibly because the bus or wiring aren't right. One thing to check, take a look at the I2C on Pi guide to make sure all the I2C modules, etc. are enabled: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c Also run both these commands with the device connected to inspect the I2C buses:
sudo i2cdetect -y 0
sudo i2cdetect -y 1
One of them should show a device with address 0x48, the default address of the ADS1115. If you don't see either of them with a 48 value then double check the wiring, power, ground, etc. are good. You'll need to make sure i2cdetect sees the device before the python code will work.
Then depending on the command that worked, the bus number to use is the value 0 or 1 in the working command. For example if i2cdetect -y 1 shows the 48 device then you want to use I2C bus 1. To change the bus you can modify the constructor right below those comments to look like:
self.i2c = Adafruit_I2C(address, busnum=1)
Swap the value 1 in the busnum parameter to 0 if you see your device on bus 0 with i2cdetect. Give that a shot and let me know if you still see issues.
from adafruit-raspberry-pi-python-code.
Cleaning up old issues and I'll close this one for now. If you still run into issues, feel free to post on forums.adafruit.com where more folks can help troubleshoot.
from adafruit-raspberry-pi-python-code.
Related Issues (20)
- PWM Servo Driver not running my servos HOT 1
- Adafruit_DHT binary needs updating with RPi 2 Base address HOT 1
- adafruit_charLCD/RPI.GPIO RuntimeError: No access to /dev/mem. Try running as root! HOT 1
- ws2801 needs update/test with py3 HOT 1
- patch for Adafruit_MCP230xx/Adafruit_MCP230xx.py HOT 2
- MCP4725 "Error accessing ...: Check your I2C address" HOT 1
- A package for Adafruit-Raspberry-Pi-Python-Code HOT 18
- Continuous integration and PEP8 HOT 1
- Enhancement - writeRowSane() HOT 2
- Hardcoded reference to 0x70 address HOT 1
- Is it possible to send data to WS2812 Light strip through the Servo Hat HOT 1
- LCD over I2C display on HOT 1
- <Deleted>
- lots of tutorials point to this repo HOT 3
- Unable to install many of the new python modules using python3 HOT 3
- Lines never reached HOT 1
- Send data BMP180 between client and server trought module socket HOT 1
- Solution for long cable on DHT22/11 HOT 6
- Port Code to .Net
- Rust HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit-raspberry-pi-python-code.