Go Down

Topic: Led Clock (Read 1 time) previous topic - next topic

AWOL

OK, here's a couple of clues:
1) x and y are unrelated, so the loops should not be nested
2) "column" does not have 13 elements.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

josephchrzempiec

what do i change it too when i try to do a upload of the sketch with the new minute change i get a error in orange  says a function-definition is not allowed here before '{' token and in black says

lite_brite_code.ino: In function 'void loop()':
lite_brite_code:163: error: a function-definition is not allowed here before '{' token
lite_brite_code:712: error: expected `}' at end of input

1ChicagoDave

Hint:

The numbers in bold below are line numbers. Look at those lines (and/or lines before & after).

lite_brite_code.ino: In function 'void loop()':
lite_brite_code:163: error: a function-definition is not allowed here before '{' token
lite_brite_code:712: error: expected `}' at end of input


Questions to ask yourself-
How does the formatting on those lines differ from similar-looking sections in other areas of the code?
What did I change?
What is before "{"?
....where was the "{" before I changed things?
What does "{" do?

http://arduino.cc/en/Reference/HomePage

josephchrzempiec

got the clock working with the 2 push buttons but can someone please help me on adding a alarm function please I'm not good at coding can someone please help me to change this i have included the text sketch below.

AWOL

I see you still haven't taken the hint, so I'll spell it out.
Code: [Select]
#define ARRAY_SIZE(x) (sizeof (x) / sizeof (x[0]))
void allOn()
{
  for(int x = 0; x < ARRAY_SIZE (row); x++){
    digitalWrite(row[x], LOW);
  }
  for(int y = 0; y < ARRAY_SIZE (column); y++){
    digitalWrite(column[y], HIGH);
  }
}

void allOff()
{
  for(int x = 0; x < ARRAY_SIZE (row); x++){
    digitalWrite(row[x], HIGH);
  }
  for(int y = 0; y < ARRAY_SIZE (column); y++){
    digitalWrite(column[y], LOW);
  }
}
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

josephchrzempiec

hello I'm sorry but I'm not a programer i was trying to explain that before i can not program for nothing I'm good at hardware i can build anything but i can not program i try say this when i started this topic. this is why i come in here for the help.

josephchrzempiec

Awol i thank you for the help i put put that part in there.

Go Up