Skip to content

Commit

Permalink
Update SingleChannelSingleConversion.ino
Browse files Browse the repository at this point in the history
fix unresolved variable
  • Loading branch information
stevstrong authored Mar 22, 2019
1 parent cc76bca commit 96a47b5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ uint8 pin[] = {D11};


void int_func() {
Serial.print("Readin: ");
uint32_t adc_result = myADC.getData();
Serial.println(adc_result);
};

Expand All @@ -18,6 +20,8 @@ void setup() {
myADC.setTrigger(ADC_EXT_EV_SWSTART);//start on SWStart bit
myADC.setChannels(pin, 1); //this is actually the pin you want to measure
myADC.attachADCInterrupt(int_func);
//
myADC.startConversion();
}; //end setup

void loop(){
Expand Down

0 comments on commit 96a47b5

Please sign in to comment.