Pins 6, 7 are not going low

Hello,

I was testing the MOSFETs so as to understand how they work, as I want to use them as switches in my project. So, I made the following circuit as shown in the picture and code is also attached. However, the pins 6 and 7 are going HIGH but not coming back to LOW. Is there something wrong with the circuit or the program?
According to my circuit and logic ( which I assume) , the LEDs should turn ON and OFF, as I switch the states of pins 6 and 7 but the states of both the pins remain HIGH and are not affected by the LOW command that I gave in the code


they not going in simulation? is this simulator allow power disconnecting or it means everything is proper powered and user need to place only signal wire?

It was working fine with two MOSFETs. Yeah, I guess everything is powered properly and I only need to give the digital signal to those Pins so as to switch.

and why you decide to add useless FETs?

In my project I need to use four FETs for switching. So, before actually doing that, I was testing this basic circuit

and the reason is?

I need four FETs as switches. I will have to operate all 4 of them at various times as per the need

you need or project need? it is only 2 LEDs, also end device. for switching are 2 transistor needed, one for each LED.

this is neither arduino platform nor programming question. good luck.

just moved to the hardware section of the forum

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.