chipKIT® Development Platform

Inspired by Arduino™

Sampling

Created Mon, 06 Feb 2012 17:49:10 +0000 by redarmy1


redarmy1

Mon, 06 Feb 2012 17:49:10 +0000

Hi

I am wanting to sample an analog signal at about 44.1khz on my Max32 board, I only want to take a sample of around 30 bits of data as I am measuring at 20hz to 20khz in decade increases using a signal generator I am currently using this code however the commands I have listed at the top do not seem to be working. [color=#0000FF]#define SAMPLERATE 44000 const byte MAX_NUMBER_OF_READINGS=50; const int analogInPin=57; //Analog Input in from pre amp int sensorValue=0; //Read analog value from pin void setup(){ Serial.begin(9600); //Serial communications at 9600bps } void loop()[/color]

I was wondering if anyone else had attempted this kind of thing, or if there are any websites on the net which can help with writing arduino code.

thanks