Go Down

Topic: need MULTIPLEXING 7 segment help (Read 1 time) previous topic - next topic

zhiyongx

yeah, i noticed it. So how do i show AA for a time then change to BB ? by putting a delay in between or another way?

marco_c

#6
Jun 28, 2012, 04:07 am Last Edit: Jun 28, 2012, 06:03 am by marco_c Reason: 1
Code: [Select]

void loop()
AA();
delay(1000);
BB();
delay(1000);
}


Clear is not needed in between because you set all the pins.

Also your delay(0.1) is the same as delay(0). I am surprised that it compiles, as delay expects an integer value.
Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Grumpy_Mike

That code is very long winded. You need to learn how to use arrays. See:-
http://www.thebox.myzen.co.uk/Tutorial/Arrays.html

zhiyongx


Code: [Select]

void loop()
AA();
delay(1000);
BB();
delay(1000);
}


Clear is not needed in between because you set all the pins.

Also your delay(0.1) is the same as delay(0). I am surprised that it compiles, as delay expects an integer value.

hi, sorry. Now i know how to change from AA to BB in one segment. But i wan to change the whole segment like A,B,C,D,E to E,D,C,B,A . any ideas?

Grumpy_Mike

Quote
any ideas?

Well you could try and read that link and try to understand it.
In that way you might start asking questions using the words that the rest of the world uses to describe things. For example:-
Quote
Now i know how to change from AA to BB in one segment.

Glad you know because I haven't got a clue as to what you are on about.

Basically you are going about it all wrong. You need to have an area of memory ( that will be an array ) that contains the bit pattern you want to display. A function that displays that bit pattern at a regular rate, and then all you need to do is to change the bit pattern in the array and that changes what you display.

What part of
Quote
You should put your code in a code 'box' on the screen. Use the # tool in the menu when you post.

do you not understand? You can modify that post, highlight the code and hit the # icon, then save. At least it will show you are paying attention to some of what we are saying.

Go Up