OPEN_ROBO_HUB Back to Projects
Module 23 // Binary Time Systems

Binary Clock

Integrates RTC timing logic gates to trigger binary LED patterns when timekeeping matrix values narrow down. The system displays hours and minutes using binary encoded LED outputs.

Binary LED Mapping

Clock Output Vector Mapping Target Uno Pin
Bit 0====>Pin 2
Bit 1====>Pin 3
Bit 2====>Pin 4
Bit 3====>Pin 5

Binary Clock Firmware


int leds[] = {2,3,4,5};

void setup()
{
for(int i=0;i<4;i++)
{
pinMode(leds[i],OUTPUT);
}
}

void loop()
{
for(int value=0; value<16; value++)
{
for(int bit=0; bit<4; bit++)
{
digitalWrite(
leds[bit],
(value >> bit) & 1
);
}

delay(1000);
}
}