andres
Posts: 8
Joined: Mon Jul 16, 2012 11:04 pm

Analog input with ADC

Mon Mar 18, 2013 1:05 am

Hi there. I am finally getting analog data from a ldr sensor connected via the ADC Pi board from AB electronics. Being a noob it took a bit of tinkering, but it's working now :)
Now, what would be the best way in your opinion of controlling graphics with this data? I thought of maybe modifying omxplayer but it seems to be daunting to integrate the python script that reads the data to c++. Same applies for openFrameworks.
Any pointers would be greatly appreciated. I am very interested in the possibility of using the pi for audiovisual installations!

edit: if this is the wrong forum, my apologies.

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Analog input with ADC

Mon Mar 18, 2013 9:30 am

"controlling graphics" is vague. What do you want to do with the data received from the ADC?

andres
Posts: 8
Joined: Mon Jul 16, 2012 11:04 pm

Re: Analog input with ADC

Mon Mar 18, 2013 12:27 pm

uhm I guess controlling the 'editing' so skipping to certain parts of a video or image sequence when a certain value is received.

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Analog input with ADC

Mon Mar 18, 2013 12:33 pm

Your post mentions a ldr connected to an ADC. I took ldr to mean a light dependent resistor. Are you going to use the ldr readings to control a video? If so, how?

andres
Posts: 8
Joined: Mon Jul 16, 2012 11:04 pm

Re: Analog input with ADC

Mon Mar 18, 2013 1:02 pm

the ldr was just to see if I could get analog readings into the pi. Ideally I would want my program to work with piezo or other touch/vibration sensors... I would like to either map those values to frames of my animation, or use threshold values that would skip to a certain part of the animation.

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: Analog input with ADC

Mon Mar 18, 2013 3:54 pm

First work out getting the ADC part working and what your range of values will be, then look at controlling animation, then work out a method to marry the two parts together.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Analog input with ADC

Mon Mar 18, 2013 4:53 pm

techpaul wrote:First work out getting the ADC part working and what your range of values will be, then look at controlling animation, then work out a method to marry the two parts together.
I'd probably use the inputs to simulate key presses for omxplayer as a first attempt.

andres
Posts: 8
Joined: Mon Jul 16, 2012 11:04 pm

Re: Analog input with ADC

Mon Mar 18, 2013 7:05 pm

Thanks for your replies! the ADC it's working, I've followed the tutorial over at elinux.com and I am getting analog readings via a python script... Next step is trying to figure out how to marry it to omxplayer or some other application to control video/image sequences. omxplayer is written in c++ I am guessing it's going to be a pain to marry with the python script (?)

stef35
Posts: 9
Joined: Sun Jun 15, 2014 8:12 pm

Re: Analog input with ADC

Sun Jun 15, 2014 8:22 pm

have you succeeded?

Return to “Interfacing (DSI, CSI, I2C, etc.)”