|
wire.h
Jan 16, 2017 8:13:39 GMT
Post by hobie1978 on Jan 16, 2017 8:13:39 GMT
Hello mjb,
do you know is the Wire1 functions work? This is for SDA1 and SCL1. I'd like to use 2 I2C ports at the same time.
|
|
|
wire.h
Jan 16, 2017 16:20:40 GMT
Post by mjb on Jan 16, 2017 16:20:40 GMT
At the moment only one I2C port can be used i.e. pins 6 & 7 or 20 & 21. If you need two I2C ports then you will have to bit-bash the second one. The next release will include the SoftwareWire bit-bashed I2C library ported to the ShieldBuddy so that you can use any two pins e.g. SCL1 and SDA1.
|
|
joao
New Member
Posts: 31
|
wire.h
Jan 18, 2017 10:58:49 GMT
Post by joao on Jan 18, 2017 10:58:49 GMT
Situation update;
Thanks for the changes about Wire.h situation, After software update i am already able do use pins 20/21 as SDA/SCL for I2C communication.
Also as i have said before, i tried to use I2C buffer for long Range Communication and it's working very well, I am working now with about 7m cable at 100Mbits/s.
|
|
|
wire.h
Jan 18, 2017 11:18:11 GMT
Post by mjb on Jan 18, 2017 11:18:11 GMT
Sounds good! What is your system doing?
|
|
joao
New Member
Posts: 31
|
wire.h
Jan 20, 2017 15:32:16 GMT
Post by joao on Jan 20, 2017 15:32:16 GMT
Sounds good! What is your system doing? Hi again, I am developing a seeding machine, so i am using shieldbuddy to take care of the electronic control. Lots of sensors, 7 ultrasonic sensors, 14 pressure sensors, 7 speed encoders as outputs i have DC motors constrol with PWM, Hidraulic valves also with PWM and some discrete outputs for on/off stuff. Then i have the I2C protocol communicating with other controller inside the tractor where the interface is located.
|
|
|
wire.h
Jan 20, 2017 16:48:05 GMT
via mobile
Post by Admin on Jan 20, 2017 16:48:05 GMT
Would it help if we got the I2C slave mode working?
|
|
joao
New Member
Posts: 31
|
wire.h
Jan 23, 2017 7:22:00 GMT
Post by joao on Jan 23, 2017 7:22:00 GMT
Would it help if we got the I2C slave mode working? I think that when we are working with the ShieldBuddy it should have the master role; When i look to the future i would say it is important that it can also play the Slave role specially if someone tries to implement it in a already existing system.
|
|
|
wire.h
Apr 9, 2017 13:21:29 GMT
Post by drolli on Apr 9, 2017 13:21:29 GMT
Hi,
I have some trouble with the i2c. Connected is a GY-80 module with integrated gyro/compass and accel chip. From compass and gyro i get data. From accel chip I receive sometimes zeros only. On an Arduino Mega it works perfectly... I measured with oscilloscope and think the reason could be a too short clock pulse. Is it possible? On Mega the clock pulse is much longer...
Bye Reiner
|
|
|
wire.h
Apr 9, 2017 16:19:06 GMT
via mobile
Post by Admin on Apr 9, 2017 16:19:06 GMT
Hi,
It is possible to change the SCLK timing What Baudrate are you using? Which I2C pins?
|
|
|
wire.h
Apr 9, 2017 19:08:34 GMT
Post by drolli on Apr 9, 2017 19:08:34 GMT
Hi,
I am using Pin 20/21 at 100kHz.
Bye Reiner
|
|
|
wire.h
Apr 10, 2017 10:38:29 GMT
Post by Admin on Apr 10, 2017 10:38:29 GMT
Hi,
I have checked a Arduino MEGA's I2C SCL signal and it is almost identical the ShieldBuddy's! I wonder if the GY-80 module is using clock stretching? We will get a GY-80 module for testing. It might take a few days to sort this out.
|
|
|
wire.h
Apr 10, 2017 15:13:33 GMT
Post by drolli on Apr 10, 2017 15:13:33 GMT
OK. Many thanks for the great support!
|
|
|
wire.h
Apr 11, 2017 19:49:41 GMT
Post by drolli on Apr 11, 2017 19:49:41 GMT
Hi,
today, I tried to use the pins 6 & 7. Then the whole Shieldbuddy freezes, at Wire.endTransmission(); Very strange...
Reiner
|
|
|
wire.h
Apr 12, 2017 8:46:36 GMT
Post by Admin on Apr 12, 2017 8:46:36 GMT
I have checked pins 6 and 7 on my rig and they are OK. However the I2C driver in the ShieldBuddy will sometimes hang if the slave does not respond with an ACK. This is something we will fix in a later release. You could try the SW bit-bashed I2C as this is less fussy. See attachment for example. UnoIsTheSlave_SW_I2C.ino (2.59 KB)
|
|
|
wire.h
Apr 13, 2017 7:40:54 GMT
Post by Admin on Apr 13, 2017 7:40:54 GMT
|
|