There is a branch called “sterly_refactor” that we used when we were 
refactoring bsp and other code. There is ADC code in there. If you checkout 
that branch you can go to the apps directory and look for the sblinky app. In 
that main.c (which is where I said this stuff shouldnt be but that was all just 
test code) it should show how the ADC was used. You cant just bring all that 
code in I suspect as it is way out of date, but I think there is enough in 
there to give you an idea of how things are expected to work.

Be warned though; that code was just all hacked in and I am not sure what state 
it was left in.


> On Dec 2, 2016, at 9:11 AM, David G. Simmons <santa...@mac.com> wrote:
> 
> Do you have some functioning code you could share? I'm really just using this 
> sensor https://www.adafruit.com/products/1786 
> <https://www.adafruit.com/products/1786> and reading an analog voltage from 
> it anyway. 
> 
> dg
> 
>> On Dec 2, 2016, at 12:06 PM, will sanfilippo <wi...@runtime.io> wrote:
>> 
>> I have not implemented an ADC sensor but I have used the ADC to simply get 
>> readings from an analog voltage so I at least know that the underlying ADC 
>> code works (or used to work) :-)
> 
> --
> David G. Simmons
> (919) 534-5099
> Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • 
> Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter 
> <http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs>
> /** Message digitally signed for security and authenticity.  
> * If you cannot read the PGP.sig attachment, please go to 
> * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!!
> * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/>
> **/
> ♺ This email uses 100% recycled electrons. Don't blow it by printing!
> 
> There are only 2 hard things in computer science: Cache invalidation, naming 
> things, and off-by-one errors.
> 
> 

Reply via email to