Page 1 of 1

i2c Keypad

Posted: Thu Dec 29, 2016 12:41 pm
by ylanchec
Hi,

In the current version, there is no i2c keypad...

Is it in the roadmap ?

Best regards

Yannick

Re: i2c Keypad

Posted: Fri Dec 30, 2016 6:54 pm
by Jay Dee
I have also been doing my own thing with I2C ( PCF8574, PCF8574A) Keypads, combined with an I2C LCD it is a great 2wire+power debugging tool I add to most projects.
If a Matrix Component was built to for I2C reading of generic keypads, it would be handy to be able to select the I/O assigned to the Rows and Cols.. since it can vary depending on what hardware your using.
J.

Re: i2c Keypad

Posted: Mon Jan 02, 2017 10:10 am
by ylanchec
Yes Jay Dee, it will be very usefull to have basic things working on i2c, and on the same channel too.

If i use the i2c keyboard from FC7 and a i2c sensor, i'm not sure that it will work on the same channel.

The i2c keypad (with config of row + col + key) is very important because the normal keypad ask 8 wires !!!

Happy New Year 2017

Re: i2c Keypad

Posted: Tue Jan 03, 2017 1:04 pm
by Benj
Hello and Happy New Year,

The PCF8574 looks interesting and similar to the MCP23S17 which I've played with previously.

To do this properly we need a way of adding external I/O pins which the components can then control directly via abstraction.

This in theory then allows all components to work via I/O expanders, makes the MIAC system run smoother and also allows Arduino style pin mapping to be much easier.

We have a plan for this but it's a big addition and is currently pencilled in as a version 8 feature.
If i use the i2c keyboard from FC7 and a i2c sensor, i'm not sure that it will work on the same channel.
This should be fine. Initialise both components and then call the individual macros as needed. All components will run at the speed and bus settings as imposed by the properties of the last component to be initialised.

For info SPI should also work fine like this as long as the slave devices each have their own unique chip select pins.

Re: i2c Keypad

Posted: Wed Jan 04, 2017 4:42 pm
by ylanchec
Hi Benj !

And happy new year too !

So you plan to make this component in the next version ?

But what is the release date for fc8 ?

Best regards

Yannick

Re: i2c Keypad

Posted: Wed Jan 04, 2017 5:05 pm
by Benj
Hi Yannick,

As I see it, It's probably not simply an extra component its a substantial engine upgrade.

You would add the PCF8574 or MCP23S17 component and that would essentially provide extra I/O pins to your target device which you could then select in the keypad component, the LCD component or any other component using simple digital I/O, the fact that your using an I/O expander would become transparent to your Flowcode program.

Pencilled in for v8 as we still have a lot planned or in progress for v7. v8 is likely at least a year down the road.

Re: i2c Keypad

Posted: Wed Jan 04, 2017 5:18 pm
by ylanchec
Hi Benj,

You have a PCF8574 in FC7 ? where ? and how to tell tu use the pins for the keypad ?

Do you have an example ?

Thank you

Yannick

Re: i2c Keypad

Posted: Wed Jan 04, 2017 5:47 pm
by Benj
Hi Yannick,

Not currently but it should be possible to control the PCF8574 using the Master I2C component.

Using the PCF8574 as a keypad should be as easy as setting one of the column pins high and then reading the row pins. If any of the row pins are high then you know that the switch is pressed at the current column and row address. Repeat for all columns or until you find a pressed switch.

Re: i2c Keypad

Posted: Wed Jan 04, 2017 6:02 pm
by ylanchec
Hi Benj,

In the fc7 file "i2c_keypad.fcfx" (top of discussion), i use the i2c component, and it works with the pcf8574 ...

but i havent any keypad to simulate in fc7.

Best regards.

Yannick