- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4
Open
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftopic: documentationRelated to documentation for the projectRelated to documentation for the projecttype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
Hello guys,
I am struggling to acquire a signal using A8,A9,A10, A11 pins of Arduino Giga R1.
Here's the modified example code I am using:
#include <Arduino_AdvancedAnalog.h>
AdvancedADC adc(A8.get()); // I must use this method to avoid compiler error
// AdvancedADC adc(PC_2C); // this doesn't wok as well I assume AdvancedAnalog relies on pins_arduino.h definitions (where the PureAnalogPins are not defined)
uint64_t last_millis = 0;
void setup() {
    Serial.begin(9600);
    // Resolution, sample rate, number of samples per channel, queue depth.
    if (!adc.begin(AN_RESOLUTION_16, 16000, 32, 128)) {
        Serial.println("Failed to start analog acquisition!");
        while (1);
    }
}
void loop() {
    if (adc.available()) {
        SampleBuffer buf = adc.read();
        // Process the buffer.
        if ((millis() - last_millis) > 20) {
          Serial.println(buf[0]);   // Sample from first channel
          Serial.println(buf[1]);   // Sample from second channel
          last_millis = millis();
        }
        // Release the buffer to return it to the pool.
        buf.release();
    }
}The code compiles, but the serial values are showing values as if the pin is floating (despite I have placed a 1k resistor to 3.3V).
Metadata
Metadata
Assignees
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftopic: documentationRelated to documentation for the projectRelated to documentation for the projecttype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project