i know this topic has been beat to death. i've included fully a executable test case.
hope it helps. don't recall anyone has gone this far.
"am i wasting my time?" if yes, i have to ask "why?" i've spent 3 years and
considerable funds on the production code. be a shame to scrap it. i should mention
that, during development of producton code, this has worked from time-to-time.
recently, it never works. i always update boards and libs when asked. perhaps a
recent update to one or the other is causing the problem. anyone have any insite
into this posibility?
the attached sketches, in terms if I2C call sequence, are literally cut'n'paste from
the production code. the flashing led's were added.
attachments:
-- master sketch:
-- sends a command to the slave that instructs it to flash it's led.
(number of times the slave flashes it's led is up to the slave).
-- sends a request to the slave asking it how many times it flashed.
-- slave sketch:
-- upon receiving the command, flashes the led.
-- upon receiving the request, replies with the number of times.
here-in lies the problem. the due hangs on the Wire.requestFrom().
the uno and mega have no problem replying.
-- fritz
mega(master) -> uno(slave)
-> mega(slave)
-> due_1(slave)
-> due_2(slave)
boards are powered off the hp(tm) usb ports via sabren(tm) usb hubs.
i wish it were as simple as replaceing the due's with mega's to avoid the problem.
its not. the due's are a required interface to the 10.1" displays i'm using.
fyi - the breadboard looking thing on the fritz is actually an 8-position dual-row
barrier strip - radio/shack #2740670. it's divided in half via a 4-position jumper.
master comes in on one side and feeds the 4 slaves off the other. sda/scl each.
btw, except for the uno, i bought all new boards for this test.
lee_i2c_master_test.ino (5.14 KB)
lee_i2c_slave_test.ino (4.52 KB)