You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 20, 2018. It is now read-only.
I am trying to run this code in Intel Edison with mraa library but it gives me error. Is not the library compatible with Intel Edison (Yocto Linux)?
Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): Intel Edison Yocto 1.7.3
Python version (run python -version or python3 -version): Python 2.7
Error message you are receiving, including any Python exception traces:
root@gozdewbl:~# python ads1115.py
Traceback (most recent call last):
File "ads1115.py", line 7, in
adc = Adafruit_ADS1x15.ADS1115()
File "/usr/lib/python2.7/site-packages/Adafruit_ADS1x15-1.0.2-py2.7.egg/Adafruit_ADS1x15/ADS1x15.py", line 319, in init
super(ADS1115, self).init(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/Adafruit_ADS1x15-1.0.2-py2.7.egg/Adafruit_ADS1x15/ADS1x15.py", line 82, in init
self._device = i2c.get_i2c_device(address, **kwargs)
File "/usr/lib/python2.7/site-packages/Adafruit_GPIO/I2C.py", line 63, in get_i2c_device
busnum = get_default_bus()
File "/usr/lib/python2.7/site-packages/Adafruit_GPIO/I2C.py", line 55, in get_default_bus
raise RuntimeError('Could not determine default I2C bus for platform.')
RuntimeError: Could not determine default I2C bus for platform.
List the steps to reproduce the problem below (if possible attach code or commands
to run):
import Adafruit_ADS1x15
import mraa
import time
import numpy
led = mraa.Gpio(20)
adc = Adafruit_ADS1x15.ADS1115()
GAIN = 1
value = led.read()
adc0 = adc.read_adc(0, gain=GAIN)
voltage = (adc0 * 0.1875)/1000
while True:
led.write(1)
print "led: ", value
print "voltage: ", voltage
time.sleep(0.50)
led.write(0)
print "led: ", value
print "voltage: ", voltage
time.sleep(0.5)
The text was updated successfully, but these errors were encountered:
I am trying to run this code in Intel Edison with mraa library but it gives me error. Is not the library compatible with Intel Edison (Yocto Linux)?
Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): Intel Edison Yocto 1.7.3
Python version (run
python -version
orpython3 -version
): Python 2.7Error message you are receiving, including any Python exception traces:
root@gozdewbl:~# python ads1115.py
Traceback (most recent call last):
File "ads1115.py", line 7, in
adc = Adafruit_ADS1x15.ADS1115()
File "/usr/lib/python2.7/site-packages/Adafruit_ADS1x15-1.0.2-py2.7.egg/Adafruit_ADS1x15/ADS1x15.py", line 319, in init
super(ADS1115, self).init(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/Adafruit_ADS1x15-1.0.2-py2.7.egg/Adafruit_ADS1x15/ADS1x15.py", line 82, in init
self._device = i2c.get_i2c_device(address, **kwargs)
File "/usr/lib/python2.7/site-packages/Adafruit_GPIO/I2C.py", line 63, in get_i2c_device
busnum = get_default_bus()
File "/usr/lib/python2.7/site-packages/Adafruit_GPIO/I2C.py", line 55, in get_default_bus
raise RuntimeError('Could not determine default I2C bus for platform.')
RuntimeError: Could not determine default I2C bus for platform.
List the steps to reproduce the problem below (if possible attach code or commands
to run):
import Adafruit_ADS1x15
import mraa
import time
import numpy
led = mraa.Gpio(20)
adc = Adafruit_ADS1x15.ADS1115()
GAIN = 1
value = led.read()
adc0 = adc.read_adc(0, gain=GAIN)
voltage = (adc0 * 0.1875)/1000
while True:
led.write(1)
print "led: ", value
print "voltage: ", voltage
time.sleep(0.50)
led.write(0)
print "led: ", value
print "voltage: ", voltage
time.sleep(0.5)
The text was updated successfully, but these errors were encountered: