Pages: [1]   Go Down
Author Topic: Propeller Clock with Arduino Nano  (Read 2441 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone,
I'm working on 8 leds propeller clock with arduino Nano. I wrote a code but it's not completed. Please help for rest of the code.

Code that I wrote :

unsigned int digits [][8] = {
 { 0xC1,0xBE,0xBE,0xBE,0xC1} ,// "0"
  {0xFF,0xDE,0x80,0xFE,0xFF},// "1"
 {0xDE,0xBC,0xBA,0xB6,0xCE}, // "2"
 {0xBD,0xBE,0xAE,0x96,0xB9}, // "3"
 {0xF3,0xEB,0xDB,0x80,0xFB}, // "4"
{0x8D,0xAE,0xAE,0xAE,0xB1}, // "5"
 {0xE1,0xD6,0xB6,0xB6,0xF9}, // "6"
 {0xBF,0xB8,0xB7,0xAF,0x9F}, // "7"
{0xC9,0xB6,0xB6,0xB6,0xC9}, // "8"
 {0xCF,0xB6,0xB6,0xB5,0xC3},// "9"
{0xFF,0xC9,0xC9,0xFF,0xFF}, // ":"
};
int numberSpace;
int dotTime = 100;

void setup()
{
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
}
int k=0;
void loop()
{
  for(int i = 0; i<8 ; i++)
  {
    digits[k];
    delay(dotTime);
  }
  k++;
  if(k==8){
    k=0;
  }
}
« Last Edit: May 24, 2012, 06:44:21 am by sergen03 » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46113
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm working on 8 leds propeller clock with arduino uno.
Define what a propeller clock is, please.

Quote
I wrote a code but it's not completed. Please help for rest of the code.
When is our homework due?

Quote
Code that I wrote :
The code AS YOU POSTED IT won't even compile. Not that posting properly (using the # icon) would have helped.

Code:
digits[k][i];
is about as useful as
Code:
0xBE;
which, of course, accomplishes nothing.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Firstly, I am not professional sorry for my faults,
I'm working on digital propeller clock with 8 leds like this : http://www.youtube.com/watch?NR=1&v=kE57dnBTsV0&feature=endscreen;
Homework due to 05.28.2012;
Code is compiling. ------->> http://imageshack.us/photo/my-images/193/adszsym.png/
I took digits from here -------->> http://www.bobblick.com/techref/projects/propclock/mclock8.asm
« Last Edit: May 24, 2012, 06:45:55 am by sergen03 » Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 314
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It might help to structure your code so you can see better what you are doing.  For example if you convert you hex to binary you could betters see your digits.
Code:
unsigned int digits [][8] = {/*0*/  { 0B11000001,      //  ..#####.
                                      0B10111110,      //  .#.....#
                                      0B10111110,      //  .#.....#
                                      0B10111110,      //  .#.....#
                                      0B11000001},     //  ..#####.
                             /*1*/  { 0B11111111,      //  ........
                                      0B11011110,      //  ..#....#
                                      0B10000000,      //  .#######
                                      0B11111110,      //  .......#
                                      0B11111111},     //  ........
                             /*2*/  { 0B11011110,      //  ..#....#
                                      0B10111100,      //  .#....##
                                      0B10111010,      //  .#...#.#
                                      0B10110110,      //  .#..#..#
                                      0B11001110},     //  ..##...#
                             /*3*/  { 0B10111101,      //  .#....#.
                                      0B10111110,      //  .#.....#
                                      0B10101110,      //  .#.#...#
                                      0B10010110,      //  .##.#..#
                                      0B10111001},     //  .#...##.
                             /*4*/  { 0B11110011,      //  ....##..
                                      0B11101011,      //  ...#.#..
                                      0B11011011,      //  ..#..#..
                                      0B10000000,      //  .#######
                                      0B11111011},     //  .....#..
                             /*5*/  { 0B10001101,      //  .###..#.
                                      0B10101110,      //  .#.#...#
                                      0B10101110,      //  .#.#...#
                                      0B10101110,      //  .#.#...#
                                      0B10110001},     //  .#..###.
                             /*6*/  { 0B11100001,      //  ...####.
                                      0B11010110,      //  ..#.#..#
                                      0B10110110,      //  .#..#..#
                                      0B10110110,      //  .#..#..#
                                      0B11111001},     //  .....##.
                             /*7*/  { 0B10111111,      //  .#......
                                      0B10111000,      //  .#...###
                                      0B10110111,      //  .#..#...
                                      0B10101111,      //  .#.#....
                                      0B10011111},     //  .##.....
                             /*8*/  { 0B11001001,      //  ..##.##.
                                      0B10110110,      //  .#..#..#
                                      0B10110110,      //  .#..#..#
                                      0B10110110,      //  .#..#..#
                                      0B11001001},     //  ..##.##.
                             /*9*/  { 0B11001111,      //  ..##....
                                      0B10110110,      //  .#..#..#
                                      0B10110110,      //  .#..#..#
                                      0B10110101,      //  .#..#.#.
                                      0B11000011},     //  ..####..
                             /*:*/  { 0B11111111,      //  ........
                                      0B11001001,      //  ..##.##.
                                      0B11001001,      //  ..##.##.
                                      0B11111111,      //  ........
                                      0B11111111},     //  ........
};
It is more lines of code but it is more readable.

You set up all your output pins but you are not outputting anything.

You also don't have a sync source.  A Propeller Clock will only work if you have a place in your rotation where you can start your display.
Some people use and IR sensor, some use a Hall Effect sensor, but you need something.
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

These kind of projects are also known as POV: persistence of vision.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



You set up all your output pins but you are not outputting anything.

You also don't have a sync source.  A Propeller Clock will only work if you have a place in your rotation where you can start your display.
Some people use and IR sensor, some use a Hall Effect sensor, but you need something.

We tried to use Hall Effect sensor (HAL505) but it has low sensitivity, it did not work properly.
Thanks for your response, it was useful for us.
Logged

Pages: [1]   Go Up
Jump to: