Hello,
Looking for some help - I've done everything I know how to do troubleshooting this problem - I cannot get any digital pin to output HIGH. I've tried 6 of them at this point - 13, 11, 10, 9, 8, and 2. Haven't tried analog.
I've verified that my input pin (12) is receiving 4.96V when I press the button hooked up to it. For whatever reason, this input seems to go in fine, but the output pin never goes HIGH (verified with multimeter). I'm out of ideas.
For background, it's an Arduino UNO. I have a momentary NO pushbutton hooked up to pin 12, and the output of pin 2 connected to the base of a TIP3055 that is driving a 12VDC, 50W motor getting power separately from a 12V power supply connected to the TIP3055's collector. The Arduino, emitter, and my button all share a common ground via that 12V power supply. I have a diode between the TIP's collector and emitter.
Here is my code:
const int onecupbuttonpin = 12;
const int transistorpin = 2;
int buttonstate = 0;
void setup() {
pinMode(transistorpin, OUTPUT);
pinMode(onecupbuttonpin, INPUT);
}
void loop() {
buttonstate = digitalRead(onecupbuttonpin);
if(buttonstate == HIGH){
digitalWrite(transistorpin, HIGH); // turn the transistor on and therefore the grinder
delay(3000); // grind for a while
digitalWrite(transistorpin, LOW); // turn the transistor off and therefore the grinder
}
else {
digitalWrite(transistorpin, LOW);
}
}
I also tried running this code (below) to simply force the pin to blink on and off. Interestingly, I do see a change from 0.0 to about 1.9 mV that matches the blink timing of 3s on, 1 s off when I do this. Does this mean I have a hardware problem of some kind where the arduino is unable to drive a full 5V even though the chip/logic is working? How would I check this? I already verified 4.96V is present at the voltage regulator's middle pin.
pinMode(2, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(3000); // wait for a second
digitalWrite(2, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Any ideas/help are much appreciated. I will keep trying things as I think of them and post any progress or findings here. Thanks, all.