attachInterrupt(function, period) to sample analog input


hi all

i trying sample 6 different analog ac inputs in order continuously monitor maximum value of each ac input. @ moment function gets called take sample ac signal once per 'main-loop'. sample rate becomes slow when monitor 6 inputs.

i thinking of using attachinterrupt(function, period) , call every function more regularly time taken run through main loop. would work? there better way of achieving this?

thanks in advance!

welcome forum. problem, best if post code. please read 2 posts @ top of forum nick gammon on guidelines posting here, use of code tags make code look
code: [select]
like thiswhen posting source code files. also, before posting code, use ctrl-t in ide reformat code in standard format, makes easier read.


Arduino Forum > Using Arduino > Programming Questions > attachInterrupt(function, period) to sample analog input


arduino

Comments