Closed
Description
At one point I thought I saw some DAC code in place, but now I don't see it:
Tried simple sketch:
int sensorPin = A0; // select the input pin for the potentiometer
int sensorValue = 0; // variable to store the value coming from the sensor
int sensorValuePrev = -1;
int DACPin = A12;
void setup() {
// put your setup code here, to run once:
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
sensorValue = analogRead(sensorPin);
if (sensorValue != sensorValuePrev) {
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
analogWrite(DACPin, sensorValue);
Serial.println(sensorValue);
sensorValuePrev = sensorValue;
}
delay(100);
}
Which faulted the processor. As A12 was not found in the list of PWM pins. This is covered in issue #19
Note: I pushed up a fix for the fault as part of my current PR: #32
Now need to see what code should be added to support this.
Metadata
Metadata
Assignees
Labels
No labels