Show Posts
Pages: [1]
1  Using Arduino / Sensors / Re: PING controlling Multiple LEDs on: February 19, 2013, 08:01:48 pm
At the end of you loop you will have to store the distance in a separate variablie: prevInches

Then you if statement should look like:

Code:
 if (inches < prevInches) {
    digitalWrite(led,HIGH);
    digitalWrite(led2,LOW);
  }
  if (inches > prevInches) {
    digitalWrite(led,LOW);
    digitalWrite(led2,HIGH);
  }
prevInches=inches;

Globally declare the variable and set it to 0 in Setup()

Let us know how you go.
2  Using Arduino / LEDs and Multiplexing / Re: My First Cube on: February 11, 2013, 02:42:35 am
Hey, Thanks for the comments.
Yea, new to Arduino, have done electronics from age 5 to 14 then stopped for 10 years and started programming.
Its great to be able to Integrate programming with Hardware.
Its a great learning platform as well for programming and electronics, sort of killing two birds with one stone.

What value resistors are you using Pedro?

Im about to start a 8x8x8 cube using 595 (8 for all columns and a 9th for layer control)
A complete code redesign to be for flexible with animation rather then just frame-by-frame definition.
But will take a while because my first child is due in 2 weeks smiley

thanks again guys.
3  Using Arduino / LEDs and Multiplexing / My First Cube on: February 08, 2013, 05:38:54 pm
Hi All.
Im new to Arduino, only been playing for 3-4 weeks.
I have made my first 3x3x3 cube and wrote all the code myself.

I feel I have done a great job with the code keeping it simple yet functional, so i thought I would share it with everyone.

Any feedback or suggested improvements would be great.

Video and all detail can be found: http://www.muffymc.com.au/?p=103
Pages: [1]