Hi all, i have an example sketch for reading a CMPS10 compass using I2C from the wire library. it states its using pins 4 & 5. on the Mega i have 2 dedicated pins 20 and 21. as far as i can tell the library is loaded on the AVR Ic already on the mega. does that mean i can use the wire library and it will already be updated to run the mega on pins 20 and 21. Cheers J.
The wire library will support both standard and mega boards by just changing the wiring for clock and data pins, no other changes required.
Thanks Lefty, i couldnt see for looking for it. J.
I have experimented with the CMPS10 Compass from active robots connected to the mega. but it still isnt responding. has anyone got this device working with the mega 2560 board. I have noticed on active robots site/example that there is 2x 1.8k ohm resistors between the SDA, SCL lines and the 5V rail. is this still required on the mega (with its dedicated I2C communication connection-ie are pullup resistors already connected internally) any help would be very much appreciated
2x 1.8k ohm resistors between the SDA, SCL lines and the 5V rail. is this still required on the mega
Yes but I would use 4K7 for a 5V system, not 1K8.
Hi Mike, Thanks for the advice. i will get a couple out of the workshop tommorow and try it again.
I was trying to give you some piece and tap someone else for help, but its good to hear from you. Cheers Jason