0

Analog input
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Analog input

by Wilton on Wed Jun 13, 2018 11:09 am

First my general question, which may solve the whole thing. How does one navigate adafruit/arduino documentation? Is there something similar to man pages in Linux? My immediate need may guide this question

I'm building a simple project on a Feather M0 WiFi. I was please to be able to set up a server and even give it a fixed IP in a couple of hours with the example code provided. But when I tried to expand it to 8 ADC readings, it unexplicably hung. Unfortunately 95% of the heavy lifting is done in some library functions I know nothing about that aren't part of the project. I'm an embedded developer with decades of experience, but I need documentation.

My project is to read 8 channels successively and repeatedly at a precise rate of 60 * 8 * 512 samples per second aggregate. I'm sure the chip can do this with the event handler, but I don't know how to do it through Arduino. The readings may need a bit of buffering, because I suspect reporting could take the CPU away too long. This also means that ADC reading needs to be interrupt driven.

The rest I should be able to handle. Four of the readings need to be integrated. All 8 need RMS decoding. And about once a second it needs to update an html page on a client device. Allowing two or three simultaneous clients would be useful but not mandatory.

You can see my dilema. The sample code uses analogRead, but I have no idea what it is or how it works. I don't even know the meaning of channel, as there are two or three definitions based on pin number, port number, and maybe some Arduino number. The sample code also uses client.print and related functions that appear to be part of a class, but again, I don't know its capabilities. I'm very weak on html, but I can solve that from the web.

I'm probably less interested in a "free fish" than in a "fishing pole" and learning "how to fish".

Wilton
 
Posts: 1
Joined: Wed Jun 13, 2018 10:56 am

Please be positive and constructive with your questions and comments.


cron