Monitoring Inputs
hi everyone.
i'm new arduino , have project attempting have hit wall hope can help.
i have push button, sensor switch , relay.
i trying write program in when user pushes button checks see if sensor switch made, if switches relay activate solenoid.
this code have far
the problem struggling is, program monitor pin 7 connected sensor switch when switch made relay deactivated turn solenoid off.
can me code or point me in right direction.
many in advance
i'm new arduino , have project attempting have hit wall hope can help.
i have push button, sensor switch , relay.
i trying write program in when user pushes button checks see if sensor switch made, if switches relay activate solenoid.
this code have far
code: [select]
void loop() {
// main code
// blue button pressed
int bluestate = digitalread(bluepin);
int bdstate = digitalread(bdswitch);
int uncstate = digitalread(uncswitch);
digitalwrite(uncstate, low);
if ((bluestate == 1) && (bdstate == high))
digitalwrite(uncsol, high);
the problem struggling is, program monitor pin 7 connected sensor switch when switch made relay deactivated turn solenoid off.
can me code or point me in right direction.
many in advance
what's deal "the problem struggling is, program monitor pin 7 connected another sensor switch when switch made relay deactivated turn solenoid off." lost me there...
can try describing want again ? forget code time being - use plain simple english , describe gears have , behavior want see
can try describing want again ? forget code time being - use plain simple english , describe gears have , behavior want see
Arduino Forum > Using Arduino > Programming Questions > Monitoring Inputs
arduino
Comments
Post a Comment