#define poti PA1 // potentiometer #define LED PA3 // ATtiny44 pin 10 that is connected to the on-board LED int pVal = 0; // the setup function runs once when you press reset or power the board void setup() { pinMode(poti, INPUT); pinMode(LED, OUTPUT); } // the loop function runs over and over again forever void loop() { pVal = analogRead(poti); // read potentiometer value (0-1023) digitalWrite(LED, HIGH); // turn LED on delay(pVal); // delay by how much pVal is digitalWrite(LED, LOW); // turn LED off delay(250); // wait for 250 microseconds }