Wandboard Quad - Yocto ADC and I2C support

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Wandboard Quad - Yocto ADC and I2C support

2,217 次查看
abhayghatpande
Contributor III

Hi everyone,

It's too bad that the Wandboard has no readily available analog inputs. I'm a bit stuck -- was hoping for a quick solution for temperature, humidity and lux measurement.

Since there are no analog inputs, I thought of using the ADS1015 or ADS1115 for i2c-based measurement so that I will get 4 channels.

I'm using the Yocto to build the image. Was wondering if the ADS1x15 driver is available? Is it straightforward to use i2c bus on the Wandboard?

Any pointers?

Thanks.

标签 (3)
标记 (5)
0 项奖励
3 回复数

1,095 次查看
abhayghatpande
Contributor III

Hi

I ultimately took a different approach and used temperature and lux sensors that output data on I2C directly. Did not use the ADC (at least for now). But I think it should be possible to use the ADC too.

I added i2c-tools to the Yocto image which gave me i2cdetect and i2cget functions to test the i2c bus. Though I'm not sure if those are needed to use the bus itself.

Then I put both the temperature sensor and the lux sensor on the i2c-1 header on the Wandboard.  It turns out that this actually corresponds to /dev/i2c-0.

Hope this helps someone else in the future. It works like a charm!

0 项奖励

1,095 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Abhay

I do not think that there is ready ADS1115 driver for i.MX6,

however there is no problem to connect it to i.MX6 i2c bus, just for

reference one can refer to attached file..

As example of such driver one can look at links below

https://github.com/modmaker/BeBoPr/wiki/Better-Analog-Inputs

http://www.spinics.net/lists/lm-sensors/msg39167.html

Best regards

igor

1,095 次查看
abhayghatpande
Contributor III

Thank you, Igor. I will go through the links you provided. I don't mind using the ADS1015. Will test and report my findings.

Best regards.

Abhay

0 项奖励