I wrote an animation that's similar to those green words from the Matrix trilogy movie. I want to repeat a part of the animation as long as the Arduino is powered, but it kept stopped at some point, at one frame after repeating multiple times already. The frame requires the LED matrix to scan through the matrix, so I don't think Arduino stop working. Does anyone know what's going on?
the code is from below, if you think you need to check it. It's pretty long though, got like 40 maps.
Subject: RE: [tronixstuff: 2156] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
If I was doing what you want, I would create a two dimensional array to put
the data in, and then use nested loops to process the array.
Secondly, you need to be able to debug what is actually happening, so put in
Serial.println("info.."); with the info showing where you are in the program
and also print variables to show what values you have got. Otherwise you are
going to have to "run the program" on paper writing down what all the
variables are as you work your way through the code. This can work, but is
very slow and it is easy to write down what you think should be happening
instead of what actually happens. I think that the best way with an Arduino
without a proper debugger is to use Serial.print(...) statements.
Regards,
Hamilton
From: tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com] On
Behalf Of Roger Lo
Sent: 24 August 2012 20:48
To: tronixstuff@googlegroups.com
Subject: [tronixstuff: 2156] I used my Arduino to perform an animation on an
8x8 LED matrix, and the animation stopped at some point but I told it to
goes on forever.
I wrote an animation that's similar to those green words from the Matrix
trilogy movie. I want to repeat a part of the animation as long as the
Arduino is powered, but it kept stopped at some point, at one frame after
repeating multiple times already. The frame requires the LED matrix to scan
through the matrix, so I don't think Arduino stop working. Does anyone know
what's going on?
the code is from below, if you think you need to check it. It's pretty long
though, got like 40 maps.
On Saturday, 25 August 2012 05:47:46 UTC+10, Roger Lo wrote:
> I wrote an animation that's similar to those green words from the Matrix > trilogy movie. I want to repeat a part of the animation as long as the > Arduino is powered, but it kept stopped at some point, at one frame after > repeating multiple times already. The frame requires the LED matrix to scan > through the matrix, so I don't think Arduino stop working. Does anyone know > what's going on?
> the code is from below, if you think you need to check it. It's pretty > long though, got like 40 maps.
Subject: Re: [tronixstuff: 2159] Re: I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
On Sat, Aug 25, 2012 at 7:10 PM, craig <cr...@millspringfarm.com.au> wrote:
> hi
> whats this line for ? while(int drone = 1){ ?
> craig
> On Saturday, 25 August 2012 05:47:46 UTC+10, Roger Lo wrote:
>> I wrote an animation that's similar to those green words from the Matrix
>> trilogy movie. I want to repeat a part of the animation as long as the
>> Arduino is powered, but it kept stopped at some point, at one frame after
>> repeating multiple times already. The frame requires the LED matrix to scan
>> through the matrix, so I don't think Arduino stop working. Does anyone know
>> what's going on?
>> the code is from below, if you think you need to check it. It's pretty
>> long though, got like 40 maps.
Subject: Re: [tronixstuff: 2157] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
Hi Hamilton,
Do you mean you right a array, and let the function scan different part of
the array?
Just like that? Serial.printIn("info....")? or that info... is suppose to
be something else? Sorry, I only just got my first Arduino board this
summer, I'm still learning how to use it.
On Sat, Aug 25, 2012 at 5:06 PM, Hamilton Elliott <helli...@microflex.ie>wrote:
> If I was doing what you want, I would create a two dimensional array to
> put the data in, and then use nested loops to process the array.****
> Secondly, you need to be able to debug what is actually happening, so put
> in Serial.println(“info….”); with the info showing where you are in the
> program and also print variables to show what values you have got.
> Otherwise you are going to have to “run the program” on paper writing down
> what all the variables are as you work your way through the code. This can
> work, but is very slow and it is easy to write down what you think should
> be happening instead of what actually happens. I think that the best way
> with an Arduino without a proper debugger is to use Serial.print(…..)
> statements.****
> ** **
> Regards,****
> Hamilton****
> ** **
> *From:* tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com]
> *On Behalf Of *Roger Lo
> *Sent:* 24 August 2012 20:48
> *To:* tronixstuff@googlegroups.com
> *Subject:* [tronixstuff: 2156] I used my Arduino to perform an animation
> on an 8x8 LED matrix, and the animation stopped at some point but I told it
> to goes on forever.****
> ** **
> I wrote an animation that's similar to those green words from the Matrix
> trilogy movie. I want to repeat a part of the animation as long as the
> Arduino is powered, but it kept stopped at some point, at one frame after
> repeating multiple times already. The frame requires the LED matrix to scan
> through the matrix, so I don't think Arduino stop working. Does anyone know
> what's going on?****
> ** **
> the code is from below, if you think you need to check it. It's pretty
> long though, got like 40 maps.****
Subject: RE: [tronixstuff: 2161] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
Instead of telling you what was wrong in the program I was trying to show
you how to find the bugs yourself. I didn't look at your code in detail so I
didn't see the error. I also wasn't sure of your level of programming
skills.
In the array you want 20 items each 8 bytes long so define it as:
Byte dots[20][8] = { .. }; // substitute your values for the ..
I have attached my code in a file. I think that attachments are allowed.
This will test that!
Always try to think of loops that you can use to reduce the code that you
have to type and it also makes the program smaller.
Adopt a style of indents and stick to it. I use a tab (4 spaces) when I have
a loop. You can see what I mean in my code.
The Serial.print() function shows in the serial monitor window. Don't forget
the Serial.begin(9600); to start it up!
In my previous example Serial.println("info.."); the info is something that
means something to you about what is happening in the program.
I usually us something like Serial.print("Now doing the loop ");
Serial.println(loopcounter); and I would get an output like this:
Now doing the loop 0
Now doing the loop 1
Now doing the loop 2
etc.
When I have a piece of code working I don't remove the print statements, I
just comment them. For a large program I use #define and #ifdef so that I
can turn on a lot of print statements for a section of the program. Ask if
you want me to explain more.
Regards,
Hamilton
From: tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com] On
Behalf Of Roger Lo
Sent: 25 August 2012 15:41
To: tronixstuff@googlegroups.com
Subject: Re: [tronixstuff: 2161] I used my Arduino to perform an animation
on an 8x8 LED matrix, and the animation stopped at some point but I told it
to goes on forever.
Hi Hamilton,
Do you mean you right a array, and let the function scan different part of
the array?
Just like that? Serial.printIn("info....")? or that info... is suppose to be
something else? Sorry, I only just got my first Arduino board this summer,
I'm still learning how to use it.
On Sat, Aug 25, 2012 at 5:06 PM, Hamilton Elliott <helli...@microflex.ie>
wrote:
Hi Roger,
If I was doing what you want, I would create a two dimensional array to put
the data in, and then use nested loops to process the array.
Secondly, you need to be able to debug what is actually happening, so put in
Serial.println("info.."); with the info showing where you are in the program
and also print variables to show what values you have got. Otherwise you are
going to have to "run the program" on paper writing down what all the
variables are as you work your way through the code. This can work, but is
very slow and it is easy to write down what you think should be happening
instead of what actually happens. I think that the best way with an Arduino
without a proper debugger is to use Serial.print(...) statements.
Regards,
Hamilton
From: tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com] On
Behalf Of Roger Lo
Sent: 24 August 2012 20:48
To: tronixstuff@googlegroups.com
Subject: [tronixstuff: 2156] I used my Arduino to perform an animation on an
8x8 LED matrix, and the animation stopped at some point but I told it to
goes on forever.
I wrote an animation that's similar to those green words from the Matrix
trilogy movie. I want to repeat a part of the animation as long as the
Arduino is powered, but it kept stopped at some point, at one frame after
repeating multiple times already. The frame requires the LED matrix to scan
through the matrix, so I don't think Arduino stop working. Does anyone know
what's going on?
the code is from below, if you think you need to check it. It's pretty long
though, got like 40 maps.
Subject: Re: [tronixstuff: 2162] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
Subject: RE: [tronixstuff: 2163] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
I would use hex because its shorter, each 8 bits can be referenced as
binary, hex or you could also use a character or a decimal number but hex or
binary makes sense in this context. It doesn't matter what way you specify
the values of the 8 bits. B01100011 = 0x63 = 'c' = 99.
Do you understand how to process the array(s) in one loop embedded in the
other?
Regards,
Hamilton
From: tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com] On
Behalf Of Roger Lo
Sent: 25 August 2012 17:09
To: tronixstuff@googlegroups.com
Subject: Re: [tronixstuff: 2163] I used my Arduino to perform an animation
on an 8x8 LED matrix, and the animation stopped at some point but I told it
to goes on forever.
Oh, I understand the checking part. But I can't understand the array. Did
you turn a row in my sketch into a hex number?
On Sat, Aug 25, 2012 at 11:54 PM, Hamilton Elliott <helli...@microflex.ie>
wrote:
-- You received this message because you are subscribed to the Google
Groups "tronixstuff" group. Thanks!
** To send a new post or reply to the entire group, send email to
tronixstuff@googlegroups.com **
** To privately email the group manager, send email to j...@tronixstuff.com
To unsubscribe from this group, send email to
tronixstuff+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tronixstuff?hl=en
Subject: Re: [tronixstuff: 2164] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
> I would use hex because its shorter, each 8 bits can be referenced as
> binary, hex or you could also use a character or a decimal number but hex
> or binary makes sense in this context. It doesn’t matter what way you
> specify the values of the 8 bits. B01100011 = 0x63 = ‘c’ = 99.****
> Do you understand how to process the array(s) in one loop embedded in the
> other?****
> ** **
> Regards,****
> Hamilton****
> ** **
> *From:* tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com]
> *On Behalf Of *Roger Lo
> *Sent:* 25 August 2012 17:09
> *To:* tronixstuff@googlegroups.com
> *Subject:* Re: [tronixstuff: 2163] I used my Arduino to perform an
> animation on an 8x8 LED matrix, and the animation stopped at some point but
> I told it to goes on forever.****
> ** **
> Oh, I understand the checking part. But I can't understand the array. Did
> you turn a row in my sketch into a hex number?****
> On Sat, Aug 25, 2012 at 11:54 PM, Hamilton Elliott <helli...@microflex.ie>
> wrote:****
> --
> You received this message because you are subscribed to the Google
> Groups "tronixstuff" group. Thanks!
> ** To send a new post or reply to the entire group, send email to
> tronixstuff@googlegroups.com **
> ** To privately email the group manager, send email to
> j...@tronixstuff.com
> To unsubscribe from this group, send email to
> tronixstuff+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/tronixstuff?hl=en****
> --
> You received this message because you are subscribed to the Google
> Groups "tronixstuff" group. Thanks!
> ** To send a new post or reply to the entire group, send email to
> tronixstuff@googlegroups.com **
> ** To privately email the group manager, send email to
> j...@tronixstuff.com
> To unsubscribe from this group, send email to
> tronixstuff+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/tronixstuff?hl=en
Subject: Re: [tronixstuff: 2164] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
Maybe if you think of the arduino only understanding directions in English. Suppose it needs to be told to go to a certain place. Now if the instructions were in English it could just do it. What if the instructions were in French or Spanish. Now we might have written the instructions in one or other of those languages ( if we knew them ) but the arduino would not understand. If an interpreter was available they could translate it for the arduino.
The compiler is like the interpreter. The arduino only stores the information in binary. However when we write the program we can use various number formats. When we verify and upload the code to the arduino our code is compiled by the compiler part of the IDE into binary and then uploads it to the arduino. If we write in our code B1100011 then the B tells the compiler that the 1100011 following it is a binary number so just uses it to compile the code directly. If we write in our code Ox63 then it understands that Ox means that the 63 following it is a hexadecimal number so converts it to binary which means the arduino gets the code it understands.
On Sunday, 26 August 2012 05:46:33 UTC+1, Roger Lo wrote:
> But how do I let the program read 0x63 as B01100011?
> Not quite sure what do you mean, is it similar to recursion?
> Roger
> On Sun, Aug 26, 2012 at 1:02 AM, Hamilton Elliott <hell...@microflex.ie<javascript:>
> > wrote:
>> Roger,****
>> I would use hex because its shorter, each 8 bits can be referenced as >> binary, hex or you could also use a character or a decimal number but hex >> or binary makes sense in this context. It doesn’t matter what way you >> specify the values of the 8 bits. B01100011 = 0x63 = ‘c’ = 99.****
>> Do you understand how to process the array(s) in one loop embedded in the >> other?****
>> ** **
>> Regards,****
>> Hamilton****
>> ** **
>> *From:* troni...@googlegroups.com <javascript:> [mailto:
>> troni...@googlegroups.com <javascript:>] *On Behalf Of *Roger Lo
>> *Sent:* 25 August 2012 17:09
>> *To:* troni...@googlegroups.com <javascript:>
>> *Subject:* Re: [tronixstuff: 2163] I used my Arduino to perform an >> animation on an 8x8 LED matrix, and the animation stopped at some point but >> I told it to goes on forever.****
>> ** **
>> Oh, I understand the checking part. But I can't understand the array. Did >> you turn a row in my sketch into a hex number?****
>> On Sat, Aug 25, 2012 at 11:54 PM, Hamilton Elliott <hell...@microflex.ie<javascript:>> >> wrote:****
>> -- >> You received this message because you are subscribed to the Google
>> Groups "tronixstuff" group. Thanks!
>> ** To send a new post or reply to the entire group, send email to >> troni...@googlegroups.com <javascript:> **
>> ** To privately email the group manager, send email to >> jo...@tronixstuff.com <javascript:>
>> To unsubscribe from this group, send email to
>> tronixstuff...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/tronixstuff?hl=en****
>> -- >> You received this message because you are subscribed to the Google
>> Groups "tronixstuff" group. Thanks!
>> ** To send a new post or reply to the entire group, send email to >> troni...@googlegroups.com <javascript:> **
>> ** To privately email the group manager, send email to >> jo...@tronixstuff.com <javascript:>
>> To unsubscribe from this group, send email to
>> tronixstuff...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/tronixstuff?hl=en
Subject: RE: [tronixstuff: 2165] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
You can use whichever form you want and is most convenient. It will produce
the same effect in the program. Don't get hung up on this as your way of
specifying the bit patterns is NOT wrong, it just uses lots of lines and in
MY opinion is harder to read than putting it on less lines.
You could also put each block of 8 bytes on the same line as:
which would also use less lines and be easier to read again in my opinion.
Sorry for getting you confused on this, but I suspect that there was/is a
basic misunderstanding of binary/hex etc that is probably a good thing to
get cleared up.
Recursion is very different. It is having a piece of code run itself. For
instance having a function call itself, possibly repeatedly and is something
to be avoided unless you have a very good reason and not something for
beginners.
Regards,
Hamilton
PS In Norman's reply he uses on example for hex as Ox, it should be 0x (zero
x)
From: tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com] On
Behalf Of Roger Lo
Sent: 26 August 2012 05:47
To: tronixstuff@googlegroups.com
Subject: Re: [tronixstuff: 2165] I used my Arduino to perform an animation
on an 8x8 LED matrix, and the animation stopped at some point but I told it
to goes on forever.
But how do I let the program read 0x63 as B01100011?
Not quite sure what do you mean, is it similar to recursion?
Roger
On Sun, Aug 26, 2012 at 1:02 AM, Hamilton Elliott <helli...@microflex.ie>
wrote:
Roger,
I would use hex because its shorter, each 8 bits can be referenced as
binary, hex or you could also use a character or a decimal number but hex or
binary makes sense in this context. It doesn't matter what way you specify
the values of the 8 bits. B01100011 = 0x63 = 'c' = 99.
Do you understand how to process the array(s) in one loop embedded in the
other?
Regards,
Hamilton
From: tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com] On
Behalf Of Roger Lo
Sent: 25 August 2012 17:09
To: tronixstuff@googlegroups.com
Subject: Re: [tronixstuff: 2163] I used my Arduino to perform an animation
on an 8x8 LED matrix, and the animation stopped at some point but I told it
to goes on forever.
Oh, I understand the checking part. But I can't understand the array. Did
you turn a row in my sketch into a hex number?
Subject: Re: [tronixstuff: 2165] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
On Sunday, 26 August 2012 11:52:19 UTC+1, Hamilton wrote:
> Roger,
> A line having:
> dots = B01100011;
> is exactly the same to the Arduino/compiler as
> dots = 0x63;
> or
> dots = ‘c’;
> or
> dots = 99;
> You can use whichever form you want and is most convenient. It will > produce the same effect in the program. Don’t get hung up on this as your > way of specifying the bit patterns is NOT wrong, it just uses lots of lines > and in MY opinion is harder to read than putting it on less lines.
> You could also put each block of 8 bytes on the same line as:
> which would also use less lines and be easier to read again *in my opinion
> *. Sorry for getting you confused on this, but I suspect that there > was/is a basic misunderstanding of binary/hex etc that is probably a good > thing to get cleared up.
> Recursion is very different. It is having a piece of code run itself. For > instance having a function call itself, possibly repeatedly and is > something to be avoided unless you have a very good reason and not > something for beginners.
> Regards,
> Hamilton
> PS In Norman’s reply he uses on example for hex as Ox, it should be 0x > (zero x)
> troni...@googlegroups.com <javascript:>] *On Behalf Of *Roger Lo
> *Sent:* 26 August 2012 05:47
> *To:* troni...@googlegroups.com <javascript:>
> *Subject:* Re: [tronixstuff: 2165] I used my Arduino to perform an > animation on an 8x8 LED matrix, and the animation stopped at some point but > I told it to goes on forever.
> But how do I let the program read 0x63 as B01100011?
> Not quite sure what do you mean, is it similar to recursion?
> Roger
> On Sun, Aug 26, 2012 at 1:02 AM, Hamilton Elliott <hell...@microflex.ie<javascript:>> > wrote:
> Roger,
> I would use hex because its shorter, each 8 bits can be referenced as > binary, hex or you could also use a character or a decimal number but hex > or binary makes sense in this context. It doesn’t matter what way you > specify the values of the 8 bits. B01100011 = 0x63 = ‘c’ = 99.
> Do you understand how to process the array(s) in one loop embedded in the > other?
> Regards,
> Hamilton
> *From:* troni...@googlegroups.com <javascript:> [mailto:
> troni...@googlegroups.com <javascript:>] *On Behalf Of *Roger Lo
> *Sent:* 25 August 2012 17:09
> *To:* troni...@googlegroups.com <javascript:>
> *Subject:* Re: [tronixstuff: 2163] I used my Arduino to perform an > animation on an 8x8 LED matrix, and the animation stopped at some point but > I told it to goes on forever.
> Oh, I understand the checking part. But I can't understand the array. Did > you turn a row in my sketch into a hex number?
Subject: Re: [tronixstuff: 2169] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
Thanks you guys, I understand how to use hex numbers, but Hamilton, what
did you mean by " process the array(s) in one loop embedded in the other, "
I don't really understand.
Roger
On Sun, Aug 26, 2012 at 8:36 PM, Norman Elliott <norman.elli...@gmail.com>wrote:
> On Sunday, 26 August 2012 11:52:19 UTC+1, Hamilton wrote:
>> Roger,
>> A line having:
>> dots = B01100011;
>> is exactly the same to the Arduino/compiler as
>> dots = 0x63;
>> or
>> dots = ‘c’;
>> or
>> dots = 99;
>> You can use whichever form you want and is most convenient. It will
>> produce the same effect in the program. Don’t get hung up on this as your
>> way of specifying the bit patterns is NOT wrong, it just uses lots of lines
>> and in MY opinion is harder to read than putting it on less lines.
>> You could also put each block of 8 bytes on the same line as:
>> which would also use less lines and be easier to read again *in my
>> opinion*. Sorry for getting you confused on this, but I suspect that
>> there was/is a basic misunderstanding of binary/hex etc that is probably a
>> good thing to get cleared up.
>> Recursion is very different. It is having a piece of code run itself. For
>> instance having a function call itself, possibly repeatedly and is
>> something to be avoided unless you have a very good reason and not
>> something for beginners.
>> Regards,
>> Hamilton
>> PS In Norman’s reply he uses on example for hex as Ox, it should be 0x
>> (zero x)
> Good catch Hamilton,
> Norman
> *From:* troni...@googlegroups.com [mailto:troni...@**googlegroups.com] *On
>> Behalf Of *Roger Lo
>> *Sent:* 26 August 2012 05:47
>> *To:* troni...@googlegroups.com
>> *Subject:* Re: [tronixstuff: 2165] I used my Arduino to perform an
>> animation on an 8x8 LED matrix, and the animation stopped at some point but
>> I told it to goes on forever.
>> But how do I let the program read 0x63 as B01100011?
>> Not quite sure what do you mean, is it similar to recursion?
>> Roger
>> On Sun, Aug 26, 2012 at 1:02 AM, Hamilton Elliott <hell...@microflex.ie>
>> wrote:
>> Roger,
>> I would use hex because its shorter, each 8 bits can be referenced as
>> binary, hex or you could also use a character or a decimal number but hex
>> or binary makes sense in this context. It doesn’t matter what way you
>> specify the values of the 8 bits. B01100011 = 0x63 = ‘c’ = 99.
>> Do you understand how to process the array(s) in one loop embedded in the
>> other?
>> Regards,
>> Hamilton
>> *From:* troni...@googlegroups.com [mailto:troni...@**googlegroups.com] *On
>> Behalf Of *Roger Lo
>> *Sent:* 25 August 2012 17:09
>> *To:* troni...@googlegroups.com
>> *Subject:* Re: [tronixstuff: 2163] I used my Arduino to perform an
>> animation on an 8x8 LED matrix, and the animation stopped at some point but
>> I told it to goes on forever.
>> Oh, I understand the checking part. But I can't understand the array. Did
>> you turn a row in my sketch into a hex number?
>> --
> You received this message because you are subscribed to the Google
> Groups "tronixstuff" group. Thanks!
> ** To send a new post or reply to the entire group, send email to
> tronixstuff@googlegroups.com **
> ** To privately email the group manager, send email to
> j...@tronixstuff.com
> To unsubscribe from this group, send email to
> tronixstuff+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/tronixstuff?hl=en
Subject: RE: [tronixstuff: 2169] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
If you look at the attachment that I sent a couple of emails back. You will
see that I used two "for" loops, one using i as an index and the other using
i1 as the index and one loop is inside the other. Then I used both i and i1
to reference the dots array as in dots[i][i1] so that it processes the i1
loop eight times for each time it processes the i loop.
Regards,
Hamilton
From: tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com] On
Behalf Of Roger Lo
Sent: 26 August 2012 13:53
To: tronixstuff@googlegroups.com
Subject: Re: [tronixstuff: 2169] I used my Arduino to perform an animation
on an 8x8 LED matrix, and the animation stopped at some point but I told it
to goes on forever.
Thanks you guys, I understand how to use hex numbers, but Hamilton, what did
you mean by " process the array(s) in one loop embedded in the other, " I
don't really understand.
Roger
On Sun, Aug 26, 2012 at 8:36 PM, Norman Elliott <norman.elli...@gmail.com>
wrote:
On Sunday, 26 August 2012 11:52:19 UTC+1, Hamilton wrote:
Roger,
A line having:
dots = B01100011;
is exactly the same to the Arduino/compiler as
dots = 0x63;
or
dots = 'c';
or
dots = 99;
You can use whichever form you want and is most convenient. It will produce
the same effect in the program. Don't get hung up on this as your way of
specifying the bit patterns is NOT wrong, it just uses lots of lines and in
MY opinion is harder to read than putting it on less lines.
You could also put each block of 8 bytes on the same line as:
which would also use less lines and be easier to read again in my opinion.
Sorry for getting you confused on this, but I suspect that there was/is a
basic misunderstanding of binary/hex etc that is probably a good thing to
get cleared up.
Recursion is very different. It is having a piece of code run itself. For
instance having a function call itself, possibly repeatedly and is something
to be avoided unless you have a very good reason and not something for
beginners.
Regards,
Hamilton
PS In Norman's reply he uses on example for hex as Ox, it should be 0x (zero
x)
Good catch Hamilton,
Norman
From: troni...@googlegroups.com [mailto:troni...@googlegroups.com] On Behalf
Of Roger Lo
Sent: 26 August 2012 05:47
To: troni...@googlegroups.com
Subject: Re: [tronixstuff: 2165] I used my Arduino to perform an animation
on an 8x8 LED matrix, and the animation stopped at some point but I told it
to goes on forever.
But how do I let the program read 0x63 as B01100011?
Not quite sure what do you mean, is it similar to recursion?
Roger
On Sun, Aug 26, 2012 at 1:02 AM, Hamilton Elliott <hell...@microflex.ie>
wrote:
Roger,
I would use hex because its shorter, each 8 bits can be referenced as
binary, hex or you could also use a character or a decimal number but hex or
binary makes sense in this context. It doesn't matter what way you specify
the values of the 8 bits. B01100011 = 0x63 = 'c' = 99.
Do you understand how to process the array(s) in one loop embedded in the
other?
Regards,
Hamilton
From: troni...@googlegroups.com [mailto:troni...@googlegroups.com] On Behalf
Of Roger Lo
Sent: 25 August 2012 17:09
To: troni...@googlegroups.com
Subject: Re: [tronixstuff: 2163] I used my Arduino to perform an animation
on an 8x8 LED matrix, and the animation stopped at some point but I told it
to goes on forever.
Oh, I understand the checking part. But I can't understand the array. Did
you turn a row in my sketch into a hex number?
-- You received this message because you are subscribed to the Google
Groups "tronixstuff" group. Thanks!
** To send a new post or reply to the entire group, send email to
tronixstuff@googlegroups.com **
** To privately email the group manager, send email to j...@tronixstuff.com
To unsubscribe from this group, send email to
tronixstuff+unsubscribe@googlegroups.com
<mailto:tronixstuff%2Bunsubscribe@googlegroups.com> For more options, visit this group at
http://groups.google.com/group/tronixstuff?hl=en
-- You received this message because you are subscribed to the Google
Groups "tronixstuff" group. Thanks!
** To send a new post or reply to the entire group, send email to
tronixstuff@googlegroups.com **
** To privately email the group manager, send email to j...@tronixstuff.com
To unsubscribe from this group, send email to
tronixstuff+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tronixstuff?hl=en
Subject: Re: [tronixstuff: 2170] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
> If you look at the attachment that I sent a couple of emails back. You
> will see that I used two “for” loops, one using i as an index and the other
> using i1 as the index and one loop is inside the other. Then I used both i
> and i1 to reference the dots array as in dots[i][i1] so that it processes
> the i1 loop eight times for each time it processes the i loop.****
> ** **
> Regards,****
> Hamilton****
> ** **
> *From:* tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com]
> *On Behalf Of *Roger Lo
> *Sent:* 26 August 2012 13:53
> *To:* tronixstuff@googlegroups.com
> *Subject:* Re: [tronixstuff: 2169] I used my Arduino to perform an
> animation on an 8x8 LED matrix, and the animation stopped at some point but
> I told it to goes on forever.****
> ** **
> Thanks you guys, I understand how to use hex numbers, but Hamilton, what
> did you mean by " process the array(s) in one loop embedded in the other, "
> I don't really understand.
> Roger****
> On Sun, Aug 26, 2012 at 8:36 PM, Norman Elliott <norman.elli...@gmail.com>
> wrote:****
> On Sunday, 26 August 2012 11:52:19 UTC+1, Hamilton wrote:****
> Roger,****
> A line having:****
> dots = B01100011;****
> is exactly the same to the Arduino/compiler as****
> dots = 0x63;****
> or****
> dots = ‘c’;****
> or ****
> dots = 99;****
> You can use whichever form you want and is most convenient. It will
> produce the same effect in the program. Don’t get hung up on this as your
> way of specifying the bit patterns is NOT wrong, it just uses lots of lines
> and in MY opinion is harder to read than putting it on less lines.****
> You could also put each block of 8 bytes on the same line as:****
> which would also use less lines and be easier to read again *in my opinion
> *. Sorry for getting you confused on this, but I suspect that there
> was/is a basic misunderstanding of binary/hex etc that is probably a good
> thing to get cleared up. ****
> ****
> ****
> Recursion is very different. It is having a piece of code run itself. For
> instance having a function call itself, possibly repeatedly and is
> something to be avoided unless you have a very good reason and not
> something for beginners. ****
> ****
> Regards,****
> Hamilton****
> ****
> PS In Norman’s reply he uses on example for hex as Ox, it should be 0x
> (zero x)****
> ****
> ****
> ** **
> Good catch Hamilton,****
> Norman ****
> ** **
> *From:* troni...@googlegroups.com [mailto:troni...@googlegroups.com<troni...@googlegroups.com>]
> *On Behalf Of *Roger Lo****
> *Sent:* 26 August 2012 05:47****
> *To:* troni...@googlegroups.com****
> *Subject:* Re: [tronixstuff: 2165] I used my Arduino to perform an
> animation on an 8x8 LED matrix, and the animation stopped at some point but
> I told it to goes on forever.****
> ****
> But how do I let the program read 0x63 as B01100011?
> Not quite sure what do you mean, is it similar to recursion?
> Roger****
> ****
> On Sun, Aug 26, 2012 at 1:02 AM, Hamilton Elliott <hell...@microflex.ie>
> wrote:****
> Roger,****
> I would use hex because its shorter, each 8 bits can be referenced as
> binary, hex or you could also use a character or a decimal number but hex
> or binary makes sense in this context. It doesn’t matter what way you
> specify the values of the 8 bits. B01100011 = 0x63 = ‘c’ = 99.****
> Do you understand how to process the array(s) in one loop embedded in the
> other?****
> ****
> Regards,****
> Hamilton****
> ****
> *From:* troni...@googlegroups.com [mailto:troni...@googlegroups.com<troni...@googlegroups.com>]
> *On Behalf Of *Roger Lo****
> *Sent:* 25 August 2012 17:09****
> *To:* troni...@googlegroups.com****
> *Subject:* Re: [tronixstuff: 2163] I used my Arduino to perform an
> animation on an 8x8 LED matrix, and the animation stopped at some point but
> I told it to goes on forever.****
> ****
> Oh, I understand the checking part. But I can't understand the array. Did
> you turn a row in my sketch into a hex number?****
> --
> You received this message because you are subscribed to the Google
> Groups "tronixstuff" group. Thanks!
> ** To send a new post or reply to the entire group, send email to
> tronixstuff@googlegroups.com **
> ** To privately email the group manager, send email to
> j...@tronixstuff.com
> To unsubscribe from this group, send email to
> tronixstuff+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/tronixstuff?hl=en****
> ** **
> --
> You received this message because you are subscribed to the Google
> Groups "tronixstuff" group. Thanks!
> ** To send a new post or reply to the entire group, send email to
> tronixstuff@googlegroups.com **
> ** To privately email the group manager, send email to
> j...@tronixstuff.com
> To unsubscribe from this group, send email to
> tronixstuff+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/tronixstuff?hl=en****
> --
> You received this message because you are subscribed to the Google
> Groups "tronixstuff" group. Thanks!
> ** To send a new post or reply to the entire group, send email to
> tronixstuff@googlegroups.com **
> ** To privately email the group manager, send email to
> j...@tronixstuff.com
> To unsubscribe from this group, send email to
> tronixstuff+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/tronixstuff?hl=en
Subject: RE: [tronixstuff: 2171] I used my Arduino to perform an animation on an 8x8 LED matrix, and the animation stopped at some point but I told it to goes on forever.
Let us know how the project works out and if you have any more questions -
ask.
Regards,
Hamilton
From: tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com] On
Behalf Of Roger Lo
Sent: 26 August 2012 16:56
To: tronixstuff@googlegroups.com
Subject: Re: [tronixstuff: 2171] I used my Arduino to perform an animation
on an 8x8 LED matrix, and the animation stopped at some point but I told it
to goes on forever.
Hamilton,
Oh, I understand now. Thank you all for the help.
Roger
On Sun, Aug 26, 2012 at 10:44 PM, Hamilton Elliott <helli...@microflex.ie>
wrote:
Roger,
If you look at the attachment that I sent a couple of emails back. You will
see that I used two "for" loops, one using i as an index and the other using
i1 as the index and one loop is inside the other. Then I used both i and i1
to reference the dots array as in dots[i][i1] so that it processes the i1
loop eight times for each time it processes the i loop.
Regards,
Hamilton
From: tronixstuff@googlegroups.com [mailto:tronixstuff@googlegroups.com] On
Behalf Of Roger Lo
Sent: 26 August 2012 13:53
To: tronixstuff@googlegroups.com
Subject: Re: [tronixstuff: 2169] I used my Arduino to perform an animation
on an 8x8 LED matrix, and the animation stopped at some point but I told it
to goes on forever.
Thanks you guys, I understand how to use hex numbers, but Hamilton, what did
you mean by " process the array(s) in one loop embedded in the other, " I
don't really understand.
Roger
On Sun, Aug 26, 2012 at 8:36 PM, Norman Elliott <norman.elli...@gmail.com>
wrote:
On Sunday, 26 August 2012 11:52:19 UTC+1, Hamilton wrote:
Roger,
A line having:
dots = B01100011;
is exactly the same to the Arduino/compiler as
dots = 0x63;
or
dots = 'c';
or
dots = 99;
You can use whichever form you want and is most convenient. It will produce
the same effect in the program. Don't get hung up on this as your way of
specifying the bit patterns is NOT wrong, it just uses lots of lines and in
MY opinion is harder to read than putting it on less lines.
You could also put each block of 8 bytes on the same line as:
which would also use less lines and be easier to read again in my opinion.
Sorry for getting you confused on this, but I suspect that there was/is a
basic misunderstanding of binary/hex etc that is probably a good thing to
get cleared up.
Recursion is very different. It is having a piece of code run itself. For
instance having a function call itself, possibly repeatedly and is something
to be avoided unless you have a very good reason and not something for
beginners.
Regards,
Hamilton
PS In Norman's reply he uses on example for hex as Ox, it should be 0x (zero
x)
Good catch Hamilton,
Norman
From: troni...@googlegroups.com [mailto:troni...@googlegroups.com] On Behalf
Of Roger Lo
Sent: 26 August 2012 05:47
To: troni...@googlegroups.com
Subject: Re: [tronixstuff: 2165] I used my Arduino to perform an animation
on an 8x8 LED matrix, and the animation stopped at some point but I told it
to goes on forever.
But how do I let the program read 0x63 as B01100011?
Not quite sure what do you mean, is it similar to recursion?
Roger
On Sun, Aug 26, 2012 at 1:02 AM, Hamilton Elliott <hell...@microflex.ie>
wrote:
Roger,
I would use hex because its shorter, each 8 bits can be referenced as
binary, hex or you could also use a character or a decimal number but hex or
binary makes sense in this context. It doesn't matter what way you specify
the values of the 8 bits. B01100011 = 0x63 = 'c' = 99.
Do you understand how to process the array(s) in one loop embedded in the
other?
Regards,
Hamilton
From: troni...@googlegroups.com [mailto:troni...@googlegroups.com] On Behalf
Of Roger Lo
Sent: 25 August 2012 17:09
To: troni...@googlegroups.com
Subject: Re: [tronixstuff: 2163] I used my Arduino to perform an animation
on an 8x8 LED matrix, and the animation stopped at some point but I told it
to goes on forever.
Oh, I understand the checking part. But I can't understand the array. Did
you turn a row in my sketch into a hex number?
-- You received this message because you are subscribed to the Google
Groups "tronixstuff" group. Thanks!
** To send a new post or reply to the entire group, send email to
tronixstuff@googlegroups.com **
** To privately email the group manager, send email to j...@tronixstuff.com
To unsubscribe from this group, send email to
tronixstuff+unsubscribe@googlegroups.com
<mailto:tronixstuff%2Bunsubscribe@googlegroups.com> For more options, visit this group at
http://groups.google.com/group/tronixstuff?hl=en
-- You received this message because you are subscribed to the Google
Groups "tronixstuff" group. Thanks!
** To send a new post or reply to the entire group, send email to
tronixstuff@googlegroups.com **
** To privately email the group manager, send email to j...@tronixstuff.com
To unsubscribe from this group, send email to
tronixstuff+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tronixstuff?hl=en
-- You received this message because you are subscribed to the Google
Groups "tronixstuff" group. Thanks!
** To send a new post or reply to the entire group, send email to
tronixstuff@googlegroups.com **
** To privately email the group manager, send email to j...@tronixstuff.com
To unsubscribe from this group, send email to
tronixstuff+unsubscribe@googlegroups.com
<mailto:tronixstuff%2Bunsubscribe@googlegroups.com> For more options, visit this group at
http://groups.google.com/group/tronixstuff?hl=en
-- You received this message because you are subscribed to the Google
Groups "tronixstuff" group. Thanks!
** To send a new post or reply to the entire group, send email to
tronixstuff@googlegroups.com **
** To privately email the group manager, send email to j...@tronixstuff.com
To unsubscribe from this group, send email to
tronixstuff+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tronixstuff?hl=en
Hi Roger, I don't know much about how this works but couldn't you use output compare interrupt to load the next pattern? If you use Timer 1 It could be use to make a 100ms delay to show pattern. Don