Page 1 of 1

How to input digits with Flowcode

Posted: Sat Dec 06, 2008 3:28 am
by Memo
Hello
I need to input 3 digits (ie:360) into a varaible to elaborate with it later on, during the program. I tried several times and in different forms with Flowcode with no results at all. I tried with switches and no luck, then I tried with keypad and nothing happen. As you may notice I'm a new Flowcode user!
Can some one help me on this and tell me how to do it?
Thanks
Memo

Re: How to input digits with Flowcode

Posted: Sun Dec 07, 2008 6:56 pm
by Sean
To enter a multi-digit number from a keypad you will need to build up the result one digit at a time - probably using a program loop structure.

The attached program is a simple example of a 3 digit entry system using the keypad component for data entry, and the LCD component for display.

The '#' key can be used as an 'Enter' key to terminate the loop early if fewer than 3 digits are required ('3', '5', '#' = 35).
keypad2digits.fcf
(6 KiB) Downloaded 834 times
Note: The result of a keypad read is 255 if no keys are being pressed. This is checked after each keypress is detected to prevent rapid autorepeat.

Re: How to input digits with Flowcode

Posted: Mon Dec 08, 2008 1:50 pm
by Benj
Hello

There are some examples packaged along with Flowcode V3 that should help you. Particularily the following.

TUT_31.FCF - XTAL - String input via switches and LCD.
TUT_32.FCF - XTAL - Password input with allow or deny.

These tutorial files can be found in the Program Files/Matrix Multimedia/Flowcode V3/Examples folder.

Re: How to input digits with Flowcode

Posted: Sun Dec 14, 2008 12:43 am
by Memo
Benj
Thanks for your fast response
I tried your suggestions and worked out wonderfull.
As a matter of fact I did not know about the examples file which is a must for beginners like me.
Memo

Re: How to input digits with Flowcode

Posted: Sun Feb 08, 2009 2:33 pm
by BLOKERV3
How to use one keypad to insert me the password to light a LED?

Re: How to input digits with Flowcode

Posted: Mon Feb 09, 2009 2:44 pm
by Benj
Hello

You should be able to tailor the above example for use with a keypad. Use the Flowcode simulation to test your program as you modify it. If you get stuck then post your program and ask how you could improve it.