basically i have a school project and one part of my circuit isnt working, and i cant figure out why can anyone help?
right so theres 4 things theres 3 leds named up down and across and a switch named sw2
so whats supposed to happen is

  1. down led comes on
    2 up led comes on and at the same time down led goes off
    3 up led goes off
    4 that all loops 3 times
    5 then led across goes on and stays on until the switch is pushed
    6 when the switch is pushed program ends
    ill include imaged of the program and code

Hi, Welcome to the forum.

You have told us what it is supposed to do. What does your code do? Have you got a DMM?

Please read the first post in any forum entitled how to use this forum.,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Before you copy and paste you code, select TOOLS then AUTO-FORMAT, that will indent you code to make it even easier to read.

Thanks.. Tom.. :)


You have a while loop in your code but you did not update the state of the sw2 button in that loop.