KEYPAD not work!

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
niedian
Posts: 85
http://meble-kuchenne.info.pl
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

Flowcode v10 KEYPAD not work!

Post by niedian »

It works in simulation, but it doesn't work in practice.
KEDPAD.fcfx
(10.67 KiB) Downloaded 47 times

chipfryer27
Valued Contributor
Posts: 1187
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 289 times
Been thanked: 418 times

Re: KEYPAD not work!

Post by chipfryer27 »

Hi

I notice in your chart that when writing to the LCD you are setting the cursor to 0,0 then printing. If you press the "#" key you will see "11" displayed correctly, but if you then press any key other than "# or *" you will display an incorrect value. For example if your press "#" then "11" is displayed but if you then press "2" you will see "21" displayed. This is because you are only overwriting the first digit (0,0) leaving the second digit intact. Instead of setting the cursor to 0,0 you could use the Clearline or Clear commands. Clearline can be set to 0,0 to only clear the first line whilst clear will clear the entire display.

Also, some older 16x2 displays need a delay from initialising to being used so it is a good idea to insert a 50mS delay after your LCD Start command.

I don't know what your exact problem is, as you haven't told us, but in future posts it would be better to be as specific as you can.

Without knowing anything further I would first try a "One-Second Flasher" to ensure your configuration is correct. See the WiKi here

https://www.flowcode.co.uk/wiki/index.p ... ED_flasher

If that is OK then I would try and identify which component, Keypad or Display isn't working.

After your lcd_Start command (and a delay of 50mS just to be safe) try printing a String such as "Hello World". If that doesn't work check display connections and again you will find details in the WiKi. Don't forget to connect "Contrast".

https://www.flowcode.co.uk/wiki/index.p ... hanumeric)

If you can tell us more details of what is not working, and things you have tried, we can probably help further.

Regards

medelec35
Matrix Staff
Posts: 1464
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 514 times
Been thanked: 474 times

Re: KEYPAD not work!

Post by medelec35 »

Hello.
Thank you for letting us know.
As a workaround, you can select the keypad on the 2D panel.
Right-click on it a select Replace
Choose the Keypad (Generic) then OK
Within the keypad properties, you will need to change Keys from 4 x 4 to 3 x 4 and select the correct port.
There is also an option to change what you see in the keys via ASCII within Return Values.
The Numeric Keypad will be looked into.
Martin

niedian
Posts: 85
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

Re: KEYPAD not work!

Post by niedian »

Thank you very much! Solved!

Post Reply