Hi everyone,
I have the sparkfun real time clock module, since its a i2c module I connect SDA to analog pin 4 and SCL to analog pin 5 then with certain code everything works well, but currently I connect it using jumper wires, but if there is a way I could swap analog pin 4 and analog pin5 I could put 5volt on the other analog pin so I could plug the rtc module in directly, so I think I found the solution but my knowledge is getting me, SoftI2CMaster.
So I downloaded a version here: http://www.findthatzip.com/search-27026380-hZIP/winrar-winzip-download-softi2cmaster-zip.htm, since there is a ds1307 example where analog pin is on digital pin 2 and 3, but I could not get the code verified without error as is !?!? :0
Here is the supporting article for that examples in the download: http://livebox-hah.googlecode.com/svn-history/r244/trunk/userapps/arduino/libraries/SoftI2cMaster/Example/readme.txt
One of the main errors is 'error: 'uint8_t' does not name a type'
Or if anyone is a expert with SoftI2CMaster, all I want to do is swap the analog pin 4 and 5 so that sda is scl and scl is sda, and then read the date time as I would normaly do as follow:
DateTime now = RTC.now(); Serial.print(now.year(), DEC); Serial.print('/'); Serial.print(now.month(), DEC); Serial.print('/'); Serial.print(now.day(), DEC); Serial.print(' '); Serial.print(now.hour(), DEC); Serial.print(':'); Serial.print(now.minute(), DEC); Serial.print(':'); Serial.print(now.second(), DEC); Serial.println(); if (now.second() == 0) { digitalWrite(2, HIGH); delay(3000); } else { digitalWrite(2, LOW); } Please any help would be appreciated since we all love our Arduino's in the arduino family.