Bamboo Digital Clock

6,858

67

7

Posted

Introduction: Bamboo Digital Clock

You need following parts for this beautiful clock:

- Arudino Mini Pro

- digital RGB LED-Stripe (1m, 60 LEDs)

- Bamboo pizza plate (32cm circumference)

- RealTimeClock Module for Arduino

- 3,3v Voltage regulator (for the RTC module)

Just stick the LED-Stripe around the pizza plate and connect the RTC and the LED-Stripe to the Arduino Mini Pro.

The hour indicator is red, the minute indicator is cyan.

You can find Information about the LED-Stripe Arduino connection at Adafruit (https://learn.adafruit.com/digital-led-strip/overview).

You can find the Arduino code here: https://dl.dropboxusercontent.com/u/2711220/Mikrocontroller%20Sourcecodes/LEDStripClock.ino

Share

  • Looks great; I had a...-dushyantahuja

    dushyantahuja made it!

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
  • Gluten Free Challenge

    Gluten Free Challenge
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

4 Comments

Hello MacManus,

I've been looking for the perfect use for my LED strip and I think this is it. Also the Bamboo Plate looks like a great piece of blank space for some artwork when the clock is all done. My question is if you can re post the link to the arduino code in the comments because it appears cut off or something and I can't get to it. I'd like to hold onto the code in case you take it down before I get around this project.

Hello waltassault, Here's the code:

// Digitale Uhr mit LED-Strip
// Pascal König, Mai 2014
// http://www.pascals-koenigreich.de/

//Für Strip
#include "LPD8806.h"
#include "SPI.h"

//Für RTC
#include "Wire.h"
#define DS1307_ADDRESS 0x68

int nLEDs = 60;

int dataPin = 4;
int clockPin = 5;

LPD8806 strip = LPD8806(nLEDs, dataPin, clockPin);

int hour_global = 0;
int minute_global = 0;
int minute_global_old = 0;

int hour_pin = 0;

void setup() {
  //RTC
  Wire.begin();
  Serial.begin(9600);
  Serial.println("Setup...");
 
  //Strip
  strip.begin();
  strip.show();
}

void loop() {
  getDate();
  Serial.print(hour_global);
  Serial.print(":");
  Serial.println(minute_global);
 
  if (hour_global == 0 | hour_global == 12 | hour_global == 24) hour_pin = 0;
  else if (hour_global == 1 | hour_global == 13) hour_pin = 5;
  else if (hour_global == 2 | hour_global == 14) hour_pin = 10;
  else if (hour_global == 3 | hour_global == 15) hour_pin = 15;
  else if (hour_global == 4 | hour_global == 16) hour_pin = 20;
  else if (hour_global == 5 | hour_global == 17) hour_pin = 25;
  else if (hour_global == 6 | hour_global == 18) hour_pin = 30;
  else if (hour_global == 7 | hour_global == 19) hour_pin = 35;
  else if (hour_global == 8 | hour_global == 20) hour_pin = 40;
  else if (hour_global == 9 | hour_global == 21) hour_pin = 45;
  else if (hour_global == 10 | hour_global == 22) hour_pin = 50;
  else if (hour_global == 11 | hour_global == 23) hour_pin = 55;
 
  hour_pin = nLEDs - hour_pin;
  minute_global = nLEDs - minute_global;
 
  for(int i=0; i<strip.numPixels(); i++) strip.setPixelColor(i, 0);
  for (int i = nLEDs-1; i > minute_global; i--) strip.setPixelColor(i, strip.Color(0, 127, 127));
  strip.setPixelColor(hour_pin-1, strip.Color(127, 0, 0));
 
  if (minute_global != minute_global_old) {
    strip.show();
    minute_global_old = minute_global;
  }
  delay(1000);
}

byte bcdToDec(byte val)  {
// Convert binary coded decimal to normal decimal numbers
  return ( (val/16*10) + (val%16) );
}

void getDate(){

  // Reset the register pointer
  Wire.beginTransmission(DS1307_ADDRESS);

  byte zero = 0x00;
  Wire.write(zero);
  Wire.endTransmission();

  Wire.requestFrom(DS1307_ADDRESS, 7);

  int second = bcdToDec(Wire.read());
  int minute = bcdToDec(Wire.read());
  int hour = bcdToDec(Wire.read() & 0b111111); //24 hour time
  int weekDay = bcdToDec(Wire.read()); //0-6 -> sunday - Saturday
  int monthDay = bcdToDec(Wire.read());
  int month = bcdToDec(Wire.read());
  int year = bcdToDec(Wire.read());

  hour_global = hour;
  minute_global = minute;
}

This looks really cool! I'd love to see a step-by-step......

Hi craftclarity.

It's really simple, you just have to glue the LED-Stripe on the bamboo plate, program the Arduino and connect everything.

But maybe i find a little bit of time in the next Weekend to write a step-by-step guide.

Greetings