-
Notifications
You must be signed in to change notification settings - Fork 25
Attiny 0/1 series #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Simone, |
I wish I could understand half the code you wrote... I know nothing about registers. uint16_t read(uint8_t pin) {
// write HIGH to pin, then LOW, then read its voltage
pinMode(pin, OUTPUT);
digitalWrite(pin, HIGH);
delay(50);
digitalWrite(pin, LOW);
pinMode(pin, INPUT);
uint16_t readings[numReadings];
uint16_t sum = 0;
for (int i = 0; i < numReadings; i++)
readings[i] = analogRead(pin);
for (int i = 0; i < numReadings; i++)
sum += readings[i];
return sum / numReadings;
} |
Seems like this should do it? |
Is there any chance you can support the new Attiny 0/1 series?
ADMUX is not defined (in the Arduino IDE at least).
The text was updated successfully, but these errors were encountered: