mraa version v0.5.4-27-g643bb99 apparently has an issue they are working it out.
If you can wget http:/iotdk.intel.com/repos/1.1/intelgalactic/libmraa0_0.5.2.4_i586.ipk from the console.
opkg install libmraa0_0.5.2.4_i586.ipk
Single slash at wget needs to be a double slash
---------- UPDATED --------------
mraa has now been fixed as of 2014.12.11, you can run opkg update libmraa0 to get past that your issue.
As noted here the ADC kernel driver is for the ADS751 while the
This is the shield i'm using has a ADS1015 - SparkFun Block for Intel® Edison - ADC - DEV-13046 - SparkFun Electronics
I have updated the mraa and I still get the same error with the code:
I might be off, but I believe that the mraa.Aio is set for the Edison Arduino board - you would be programming the sparkfun trhough the I2C, and should have I2C-1 or I2C-6 to pick from.
mraa 19 is I2C-1-SLC, mraa 7 is I2C-1-SDA
mraa 6 is I2C-6-SLC, mraa 8 is I2C-6-SDA
1 of 1 people found this helpful
deium has the right idea. Basically libmraa uses an IIO kernel driver for the edison ADC available on the arduino breakout board. The blocks will be detected as miniboard therefore you have to then talk i2c to the ADC yourself. Whenever someone lands some of these on my desk we may support features in mraa/UPM. However for now I can just look at the pictures and guess at how they work .
mraa.Aio() will not work because as far as we're concerned you dont have a valid ADC. (the ADC on the arduino breakout is on SPI). Why sparfun didn't go for the same one on the SPI bus is a little annoying but what can I do :/
Thanks for the help. I'll have to look into using I2C to talk to the ADC.
Here is a link to the c++, python or Arduino libraries I made for this ADC, let me know if it was helpful or if you need more help, just follow the Readme! GitHub Library
Also the document will be soon in the Intel Community Platform, hope it’s helpful! Intel Community
You can now read the ADC Using the MCU Quark!
Using the shell command i2cget is really nasty, use mraa to access your i2c bus, that way the i2c bus will be setup correctly and the muxing will work out of the box even if the user has reconfigured the board. The other advantage is that your code would now work on any of that type of ADC on multiple platforms.
Same goes for your MCU setup script, could be replaced by something as simple as:
import mraa as m
x = m.I2c(1)
Hopefully we'll have a UPM module for the sparkfun block v.soon so you can use it really easily without importing any libraries - would you be interested in writing one? PM me if you are and I can give you a hand.
Hey, thanks for the advice, it is already in mraa.
take a look at it if you wish!
Can you help me with setting it up?