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
How to input digits with Flowcode
-
- Valued Contributor
- Posts: 548
- Joined: Tue Jun 26, 2007 11:23 am
- Has thanked: 6 times
- Been thanked: 44 times
- Contact:
Re: How to input digits with Flowcode
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).
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.
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).
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.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: How to input digits with Flowcode
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: How to input digits with Flowcode
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
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
How to use one keypad to insert me the password to light a LED?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: How to input digits with Flowcode
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel