Sorry for the late reply! Thank you for your suggestions guys.
PaulS:
You can't read something on the serial monitor that the Arduino didn't write. It is silly to talk about what YOU can, or can not do. We are here to help you with what the Arduino can, or can not, do. SO, describe THAT.
Haha, yes, ofcourse. I did not realise that ![]()
You are aware, aren't you, that the SDA and SCL pins are in different places on the Mega and the UNO?
I am aware of that. Still, both on the Uno and Mega, the pins are named SDA and SCL.
jokefox:
Check that ds3231 for the kinda battery it has. Cr's are not rechargeable and if your module has a charge circuit it could blow up.
I did replace the battery at some point. Since the RTC did not continue the time from what I set it, I figured the battery must be dead and thus replaced it. Following Paul's earlier comment, I should say that the Uno can still output the right time of the DS3231 in serial monitor, while the Mega can not. So I think it's safe to say that the battery is not the problem.
[edit] I feel like a complete idiot :-[ !!!!! . Since the Mega was pretty cramped with the TFT screen, and all my switching and hassling around with the sensors, I powered and grounded my prototype board with pH and DS3231 via my Uno and ran the SDA and SCL wires to the Mega. For some reason I did not think it would really make any difference. At the same time I don't know why I did not try it, just to eliminate the possibility of it being the solution or not... Now that I powered and grounded the DS3231 through the Mega, the Mega does output the time in the Serial monitor.
I hope you can laugh at this noobie-mistake instead of writing me off like a hopeless case, i've been scratching my head for three weeks lol.