Evaluate an analog value through the ADC on the Arduino Nano
Aus DL8RDS Wiki
Version vom 7. November 2009, 02:09 Uhr von Dl8rds (Diskussion | Beiträge) (New page: Yes, and because I like it small, there's the Arduino Nano. I did roughly the same again based on the Nano. In this case I connected the input from the Poti with the delay of the LED LOW. ...)
Yes, and because I like it small, there's the Arduino Nano. I did roughly the same again based on the Nano. In this case I connected the input from the Poti with the delay of the LED LOW. I can now regulate the blinking frequency. Here's a picture of the setup on my breadboard:
int potiPin = 0; int potiVal = 0; int ledPin = 2; void setup() { int potiPin = 0; pinMode(ledPin, OUTPUT); } void loop() { int potiVal = analogRead(potiPin); digitalWrite(ledPin, HIGH); delay(100); digitalWrite(ledPin, LOW); delay(potiVal*2); }