Page 1 of 1

Counting Circuit!

Posted: Mon Apr 20, 2009 12:40 pm
by wroenaldinho_lufc
Hi, i am making a snooker circuit board for a college project, i have never used flowcode in mylife infact never even heard of it until now.
i am wanting to make it so that the buttons count up from 1 to 7. therefore i will need 7 buttons!

The problem i have is that the buttons only count up in 1's on the LED's, where as i would like button 2 to add 2 and button 3 to add 3 etc etc. how would i do this!

At the moment all my switches are adding 1 at a time.

Thank You!

Re: Counting Circuit!

Posted: Mon Apr 20, 2009 1:19 pm
by Benj
Hello

You should be able to do the following.

Use an input icon to read the input pin connected to a switch into a variable.
Use a decision icon and put the variable name in as the parameter.

Under the Yes branch add a calculation icon that adds a value to your count variable eg 1, 2, 3 etc

Repeat for other switch pins.

Hope this helps.