TomGeorge:
Hi,
Can you post the code you are using for the post #23 test thanks.Can you measure the voltage at the button input pin of the NANO when you press and release the button, and measure the voltage ar the gate of the MOSFET when you press and release the button?
Thanks.. Tom...
I'm still using the same code, haven't changed anything.
const int BTNpin = 12;
const int solPin = 11;
const int pixelPin = 10;
int BTNPinState = 0;
int solPinState = 0;
int pixelPinState = 0;
void setup() {
// put your setup code here, to run once:
pinMode(BTNpin, INPUT);
pinMode(solPin, OUTPUT);
pinMode(pixelPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
BTNpinState = digitalRead(BTNpin);
if(BTNpinState == HIGH) {
digitalWrite(solPin, HIGH);
digitalWrite(pixelPin, HIGH);
} else {
digitalWrite(solPin, LOW);
digitalWrite(pixelPin, LOW);
}
}
I've only added pixelPin in the code as a preparation for the next step as soon as I get my mosfet to work.
You mean between D11 and the gate right, the switch just sends a signal to the Arduino nano? I can confirm the switch work since the L-led light on the Arduino nano reacts accordingly.