simon88 / gpio_extension

Use raspberry GPIO directly in PHP 7 with this extension
GNU General Public License v3.0
8 stars 1 forks source link

I2C possibilities ? #3

Open wimg opened 7 years ago

wimg commented 7 years ago

I know this might not be for this extension, but I'm going to ask anyway : any chance of having I2C in this as well ? ;-)

simon88 commented 7 years ago

Yeah, sure why not, it is a good idea 👍

simon88 commented 7 years ago

For you what would be the functions to implement? readind, writing ?

wimg commented 7 years ago

I think both would be interesting. This is currently not possible with PHP unless you execute commands to read/write, which is not exactly the most efficient way to do things. If PHP offered direct access, it would improve the ability to communicate with things like the Grove I2C sensors a lot.

simon88 commented 7 years ago

Sure, I think to start working on the porjet this weekend. What is the best option, use the i2c-dev interface (use smbus) or use system calss (read, write...) ?

wimg commented 7 years ago

Sorry I have no idea about the specifics behind the scenes.