Code not working properly

I am new to arduino and was just doing the spaceship interface project.
My code is perfect and I think I have made the circuit right aswell but it is not working properly.When the switch is off the red light are blinking and the green light is also blinking but for only like 1 milli sec.

[Red LED 1(250 milli sec) , Red LED 2(250 milli sec), Green LED (1 milli sec)]

This is the pattern it is working like when I am not pressing the button.

And when I am pressing the button it just skips the flashing of the green light and the red lights keep blinking.
So it is working like it should while the button is pressed but it is not working like it should when the button is not being pressed.

Let me see if I have this correct:

  • Your code is perfect.
  • Your circuit is right as well.
  • But it's not working properly.

Does that sum up what you're saying?

Oh, by the way, did you happen to read How to get the best out of this forum before posting?

2 Likes

I think, nobody have to read further after this :slight_smile:
@mustafa_syed
Please start again, and this time show your code and connection diagram.

I am so sorry it was my own mistake............ My 10k resistor was not connected properly such a dumb person I am

Thank u so much , I found out it was my own mistake

Just did after reading this comment srry was very frustrated because it was not working so I hurriedly typed it without taking account of anything but the problem was resolve , it turned out to be my own mistake.....

@mustafa_syed Welcome
Most volunteers here are not aware of the Arduino Projects Book nor have a copy of it. If you require assistance in the future it would be very helpful for us if you include the code you are working with and an image of the schematic such as below

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