Attach Real Time Clock
How it's done
Before attaching RTC, insert the battery.
RTC and light sensor use same protocol called IIC. They will share the same pins on Arduino for communication.
There is one trick about these pins. For SCL and SDA pins on Arduino we use analog pins A5 and A4. But the same pins SCL and SDA can be found on digital sides pins (last two after GND and AREF).
In our case this will help us because we will connect RTC using analog pins 4 and 5, and for light intensity sensor we will use pins on digital pins side.
Connect (RTC - Arduino):
- SLC - Pin A5;
- SDA - Pin A4;
- Vcc - 5V or 3,3V (I use 3,3V);
- Gnd - Gnd.