I am new to Arduino and code writing. I have a project that I would like to have code written for. If anyone is up for the challenge here is the sequence of events that needs to happen.
I have an array of 8 rgb led lights.
they are common anode.
I am using tip120’s to switch the load, this part works great.
here are the conditions
Estop +5vdc input (3) = blue and green are off, red is on
axismove ground input (2) = blue and red are off, green fades on and off
power +5vdc input (12) = blue, red, and green are on
blue = output (9)
red = output (6)
green = output (5)
Any help with this code would be greatly appreciated. ;D
This looks logical, however i am getting a error when compiling.
'INPUT_PULLUP' was not declared in this scope.
I will probably get the same error with all three 'INPUT_PULLUP' statements
Thank you for taking the time to assist me with this.
INPUT_PULLUP has been supported since IDE 1.0.
What version are you running?
If you have external pullups or pulldowns, change those lines to just INPUT.
Or use
pinMode (estop, INPUT);
digitalWrite (estop, HIGH); // enables internal pullup
I am working with a Arduino micro, and running 1.0.6.
the power if statement seems to work ...... in 12 has an external 10K resistor connected to ground
the estop does not change when +5 is applied to input 3.....in 3 has a external 10K resistor connected to ground
the axismove does not change when ground is applied to input 2....in 2 has no resistor on it