Hi Everyone...well this is a very nice forum...congrats... i have a problem... i work with arduino and processing...pd... and works fine... but yesterday i worked just with arduino... a little program to control of blink of leds... yes ... the example... but only works with 1 potentiometer and one led... i want control two or more blinking leds with independent spedd delay and independent potentiometer... i can printed the independent values of pot, but ever the pot a influenced the pot b... i am thinking in this program:
int potPin = 1;
int potPin2 = 2;
int ledPin = 6; //
int ledPin2 = 11; //
int val1 = 0;
int val2 = 0;
Mmmm, not work... i create a new program who controls 2 led blink, with variable time, i can connected 2 leds, but always the pots controlling the two leds... not independent...but in consola are independent i attached a demo, two leds, two pots... can you help me? is possible?
int sensorPin = 0;
const int ledPin = 13;
int sensorValue = 0;
int ledState = LOW;
long previousMillis = 0;
int sensorPina = 1;
const int ledPina = 12;
int sensorValuea = 0;
int ledStatea = LOW;
long previousMillisa = 0;
void setup() {
// declare the ledPin as an OUTPUT:
pinMode(ledPin, OUTPUT);
pinMode(ledPina, OUTPUT);
Serial.begin(9600);
Serial.println("Helloworld");
}
void loop() {
sensorValue = analogRead(sensorPin);
Serial.print(" 1: ");
Serial.print(sensorValue, DEC);
Serial.print("\r\n");
// read the value from the sensor:
if (millis() - previousMillis > sensorValue) {