Guest
Login
Register
Home
Help
Search
Login
Register
more G-Labs products
This forum is soon going to be read-only.
Please join the new
HomeGenie community on Google+
HomeGenie Forum
Automation Program Plugins and Wizard Scripting
Raspberry Pi GPIO/SPI/I2C
Using Spi to talk to external expansion unit
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Using Spi to talk to external expansion unit (Read 1782 times)
February 23, 2015, 08:58:42 PM
Read 1782 times
Matt
Information
Newbie
Posts:
1
Using Spi to talk to external expansion unit
Hi,
I am creating an external expansion board for the pi that I would like homegeni to communicate with via SPI. I can't seem to find an example code to do this. Can someone please share a link or some code using the rasberry pi SPI port.
Thanks
Matt
Logged
February 23, 2015, 09:12:45 PM
Reply #1
Gene
Information
Administrator
Posts:
1472
Tangible is the future!
Re: Using Spi to talk to external expansion unit
One example could be
EdenV2_Module_1_1.hgx
available from:
https://sourceforge.net/projects/homegenie/files/testing/
this is used to talk to arduino via SPI. Also the arduino firmware is available for download.
Cheers,
g.
Logged
February 28, 2015, 09:57:22 PM
Reply #2
NickP
Information
Newbie
Posts:
24
Re: Using Spi to talk to external expansion unit
I just added a driver for the PiFaceDigital device to the genielabs raspberry-sharp-io. If Gene is happy it will get pulled in.
The driver uses native SPI to control the MCP23S17 port expander at the core of the PiFace.
Logged
February 28, 2015, 10:50:11 PM
Reply #3
Gene
Information
Administrator
Posts:
1472
Tangible is the future!
Re: Using Spi to talk to external expansion unit
Merged. I will update HomeGenie as well soon.
Thanks!
g.
Logged
February 28, 2015, 11:32:39 PM
Reply #4
Gene
Information
Administrator
Posts:
1472
Tangible is the future!
Re: Using Spi to talk to external expansion unit
I also forwarded a pull request to the raspberry-sharp-io master.
In the meantime, a couple of days ago, my fork was already integrated into the master, so you could have pulled in there.
Cheers,
g.
Logged
March 17, 2015, 03:25:45 AM
Reply #5
NickP
Information
Newbie
Posts:
24
Re: Using Spi to talk to external expansion unit
Thinking through this again; I believe it makes sense to create an abstract MCP23x17 class and derive MCP23017 from it (without breaking the current interface) then also derive an MCP23S17 (SPI ) class as well.
Updating the components that currently accept an MCP23017 to accept MCP23x17 would still work for existing code ( MCP12017 being a derivative) but also allow people to use MCP23S17 as well.
What do you think?
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
HomeGenie Forum
Automation Program Plugins and Wizard Scripting
Raspberry Pi GPIO/SPI/I2C
Using Spi to talk to external expansion unit