Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems master_reader
04-06-2015, 07:40 PM,
#1
Problems master_reader
Hello  Blush

I'm a new programmer of Pinguino and I've a Pic 32 Pinguino OTG board.
I want to make an I2C communication and I've tried to test the example that comes with the program: master_reader
When I  compile, it gives me the following error  Huh :

[OUT] ERROR: C: \ penguin-11 \ user \ source \ user.c: 21: 3: error: 'Wire' undeclared (first use in esta function)

I don't find nothing about that. I hope your help please!!!  Blush
Reply
04-06-2015, 09:30 PM,
#2
RE: Problems master_reader
I think the wire library is not compatible with PIC32. But I2C is implemented, as i used it recently with a MCP4725 DAC http://wiki.pinguino.cc/index.php/Category:I2C_Library
Reply
05-06-2015, 01:29 AM,
#3
RE: Problems master_reader
Ok, i'll try to use It and I'll tell you. Thaks!!! ^-^
Reply
09-06-2015, 07:24 PM,
#4
RE: Problems master_reader
I confirm.
The wire library has not been yet adapted to the P32 only the P8.
However the i2c library works perfect for both I2C1 and I2C2 ports.
I2C1 is the port used by default : I2C.name_of_function is equivalent to I2C1.name_of_function
For example : I2C.master(I2C_1MHZ) is equivalent to I2C1.master(I2C_1MHZ)
If you want to use I2C2 : I2C2.master(I2C_1MHZ)

Here are the available functions you can use :

I2Cx.master
I2Cx.slave
I2Cx.init
I2Cx.send
I2Cx.sendID
I2Cx.get
I2Cx.write
I2Cx.writechar
I2Cx.read
I2Cx.readchar
I2Cx.readcharNack
I2Cx.readcharAck
I2Cx.wait
I2Cx.start
I2Cx.stop
I2Cx.restart
I2Cx.sendnack
I2Cx.sendack
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
09-07-2015, 07:43 PM,
#5
RE: Problems master_reader
Thank you very much, I've managed to make the program using the I2C library ^-^ and sorry for the delay.
Regards !!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)