Page 1 of 1

Pi4J and I2C

Posted: Tue Dec 11, 2012 2:04 pm
by morind79
Hi all,

I have made a PCB with several things working with I2C, SPI and digital I/O.
I plan to use Pi4J which seems very good.
For normal digital I/O, no problem I can do what I need.
But for I2C and also SPI, I think I will need some code example.

For example I connected an I2C Lcd screen (2*16) through a PCA9517 volatge level translator.
I would like to create a library to drive this display, but really need some info to start.

Here is the schematic of what I did :
GPIO.zip
(31.49 KiB) Downloaded 475 times
So if some are interested, I can also give some explanation and Gerber X data.

Best regards,

Denis

Re: Pi4J and I2C

Posted: Tue Dec 11, 2012 4:20 pm
by savageautomate
Hi Denis,

The I2C implementation in Pi4J is pretty new but I did manage to use it successfully to create a I2C-based GpioProvider for the MCP23008 and MCP23017. This source may provide a starting example for you to look at.
https://github.com/Pi4J/pi4j/tree/maste ... ension/mcp

Re: Pi4J and I2C

Posted: Thu Dec 13, 2012 8:17 am
by morind79
Hi Robert,

Thank you very much, this helped me a lot.
I am able to send some data to the I2C LCD screen using Pi4J now.

Best regards

Denis

Re: Pi4J and I2C

Posted: Thu Dec 13, 2012 2:40 pm
by savageautomate
Excellent! Thanks for the update.

Re: Pi4J and I2C

Posted: Mon Feb 11, 2013 4:35 pm
by smoogli
Hi folks,
what was connected over I2C? (picture of desk with RPI and the gizmo would be perfect :-)

cheers!

Re: Pi4J and I2C

Posted: Mon Feb 11, 2013 4:40 pm
by morind79
Hi Smoogli,

The I2C module connected is a LCD screen (4 x 20 characters)
If you need more information, please have a look at www.raspext.com, I will add more on it as soon as I can.

Best regards

Denis