Capasitive key Pads

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Capasitive key Pads

Post by jollybv »

Hi Guys

I am wondering will flowcode be come out with a capacitive keypad 12 x 3 modual ? and has anyone out there made a capacitive keypad using a pic ? if so is there any examples of flowcode. What is a good Pic to use for this which flowcode supports.

Best regards
Brian

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Capasitive key Pads

Post by kersing »

Have checked the messages in this thread? (Found by using the search option in the top right of this page)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Re: Capasitive key Pads

Post by jollybv »

Hi thanks

will check it out

User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Re: Capasitive key Pads

Post by jollybv »

Thanks have
checked the thread out but don't quite understand what is going on what im trying to make a capactive key pad (3 x 4) (0-9 * & #) What i would like to do is when the relevant key is pressed e.g 1 it must send Char 1 via uart and print to LCD im not sure how to implement this in the sample code (CapTouch_pressure) to test and is it possible to simulate in V5 please help

Brian

User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Re: Capasitive key Pads

Post by jollybv »

Hi guys
I have modified the CapTouch example to expand to 10 input's but I'm not sure if i have done it right as all i get displayed on the LCD screen is a lot of 1 and no change if i touch the pad.

Brian
Attachments
CapTouch_10_inpuit.fcf
(29.84 KiB) Downloaded 300 times

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: Capasitive key Pads

Post by dazz »

Hi
i have added a variable called dave that will give you the numbers required, to simulate simply drag the input from 0 to 255 then back, don't go clockwise, just click between max and min points in sim

Regard
Dazz
Attachments
CapTouch_10_str.fcf
(30.01 KiB) Downloaded 291 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Re: Capasitive key Pads

Post by jollybv »

Thanks a lot for your help

User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Re: Capasitive key Pads

Post by jollybv »

Hi Dazz

Have changed the program (not sure if i did it right) so it displays 0 to 9 * & # but im not sure how to simulate it so when i touch a key it represents the no e.g (touch 1 it must give me a 1, touch * it must give me a * ) as it is now it displays all the numbers how can i change this to only display the relevant key when pressed.

Brian
Attachments
CapTouch_10_str.fcf
(40.39 KiB) Downloaded 302 times

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Capasitive key Pads

Post by Creative25 »

Hi
I think there is a serious problem with this code.
I think at the place the calculation for the dave variable was it will alway give a positive number for every Key if it is pressed or not. I recommend you take the calculation out of the Macro for Capacitive touch sensing,

Also you need to clear the part of the screen where the key is displayed else it will not clear a key that is no longer pressed.
I do not know how to simulate it in flowcode, since it only shows one ADC.

I have tried to modify the code. To make it work but have not tested it on Hardware.
Please note some caracters may not be correct I am using flowcode on a mac, and have not figured out how to change the Language of the keyboard.

I am not an expert but I hope the modifications I made will be helpful

Best Regards:
Uli
Attachments
CapTouch_10_str2.fcf
(48.29 KiB) Downloaded 268 times
Last edited by Creative25 on Thu Jul 25, 2013 1:36 pm, edited 1 time in total.

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Capasitive key Pads

Post by Creative25 »

jollybv wrote:Hi Guys

I am wondering will flowcode be come out with a capacitive keypad 12 x 3 modual ? and has anyone out there made a capacitive keypad using a pic ? if so is there any examples of flowcode. What is a good Pic to use for this which flowcode supports.

Best regards
Brian
Hi I used A pic 16F1939 And also a pic 12f1822 Both of them are working well.
Best Regards:
Uli

User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Re: Capasitive key Pads

Post by jollybv »

Hi guys

I'm really battling with this cant figure out how to simulate this code what I'm trying to do is display the relevant key when pressed and clear it when not pressed i have only put the first 5 keys in this example 0 to 4 but still cant get it to simulate is there anyone out there who can help

Brian
Attachments
CapTouch_10_str3.fcf
(59.22 KiB) Downloaded 243 times

Creative25
Posts: 323
Joined: Tue Sep 06, 2011 2:54 am
Has thanked: 166 times
Been thanked: 26 times
Contact:

Re: Capasitive key Pads

Post by Creative25 »

Hi
There are several issues with your code.
At the beginning of the macro you have to put "sum=0"
Sot it will calculate properly.
Secondly the go to command makes the code to repeat without setting the curser tho the right place for diplay so it makes your whole display to show one number.
Since you have move the last formula of the macro before your display macro else there is no value to display.

I have Changed your code a little.
And I think it will work on real Hardware.
Take note when you have real Hardware you need to change the formula "If .return>value " to "If .return<value".
If a button is touched then the value read by the ADC decreases.

It can not simulate properly yet but if you change the above formula you can see that the values change.

Can someone tell us if it is possible to simulate ADC raw channel with flowcode?

Best Regards:
Uli
Attachments
CapTouch_10_str4.fcf
(60.77 KiB) Downloaded 224 times

User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Re: Capasitive key Pads

Post by jollybv »

Hi Uli

Thanks for your help again, I am not sure how the ADC conversion works as i cannot see in the simulation lets see if someone can tell us how to simulate ADC raw conversion.

Brian

Post Reply