back to newbie again need help with switching led
am after making relay turn light on , off press of radio remote button. getting flashing fast when button pressed.
i getting in arduino scene after bad accident , memory has been affected normal able fly through finding hard recall memory.
so can me recall need do.
this code below. , know starting @ beginning. frustrating me trying learn walk again not knowing how move foot.
i need switch once it sees pin 7 change. if light on turn off , if off turn on.
i remember seeing b4 cant remember called or find it..
my starting code below works on tattie switch not on radio remote
i getting in arduino scene after bad accident , memory has been affected normal able fly through finding hard recall memory.
so can me recall need do.
this code below. , know starting @ beginning. frustrating me trying learn walk again not knowing how move foot.
i need switch once it sees pin 7 change. if light on turn off , if off turn on.
i remember seeing b4 cant remember called or find it..
my starting code below works on tattie switch not on radio remote
code: [select]
int sensorpin = a0; // select input pin potentiometer
int ledpin = 13; // select pin led
int sensorvalue = 0; // variable store value coming sensor
void setup() {
// declare ledpin output:
pinmode(ledpin, output);
}
void loop() {
// read value sensor:
sensorvalue = analogread(sensorpin);
// turn ledpin on
digitalwrite(ledpin, high);
// stop program <sensorvalue> milliseconds:
delay(sensorvalue);
// turn ledpin off:
digitalwrite(ledpin, low);
// stop program for <sensorvalue> milliseconds:
delay(sensorvalue);
}
your code making potentiometer change rate of strobing.
i think you're needing use state change detection setup.
i don't see potentiometer has turning on , off led.
can explain goal is, more clearly?
there no pin 7 in code.
i think you're needing use state change detection setup.
i don't see potentiometer has turning on , off led.
can explain goal is, more clearly?
there no pin 7 in code.
Arduino Forum > Using Arduino > Programming Questions > back to newbie again need help with switching led
arduino
Comments
Post a Comment