Good projects for the arduino

View previous topic View next topic Go down

Good projects for the arduino

Post by jamied_uk on 13th September 2014, 17:56

Good projects for the arduino

http://www.tech-zen.tv/episodes/shows/make-it-work/episodes

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

My custom  Traffic Lights!


Code:
// my customized version!


int ledred=10;  
int ledyellow=7;
int ledgreen=4;
void setup()
{
   pinMode(ledred,OUTPUT);
   pinMode(ledyellow,OUTPUT);
   pinMode(ledgreen,OUTPUT);
}
void loop()
{
   digitalWrite(ledred,HIGH);
   delay(1000);
   digitalWrite(ledyellow,HIGH);
   digitalWrite(ledred,LOW);
   delay(200);
   digitalWrite(ledgreen,HIGH);
   digitalWrite(ledyellow,LOW);
   delay(1000);
   digitalWrite(ledgreen,LOW);
}



Knight Ryder LED's project

http://arduino.cc/en/Tutorial/Array
 
Code:

// all Led's need a 220 ohm resister

 
int timer = 100;

int ledPins[] = { 2, 7, 4, 6, 5, 3 }; // can be any pins or any amount of pins

 
int pinCount = 6; // needs to be accurate

 
void setup() {

int thisPin;

for (int thisPin = 0; thisPin < pinCount; thisPin++)  {

    pinMode(ledPins[thisPin], OUTPUT);

    }

}

 
void loop() {

for (int thisPin = 0; thisPin < pinCount; thisPin++) {

digitalWrite(ledPins[thisPin], HIGH);

delay(timer);

digitalWrite(ledPins[thisPin], LOW);

}

 
for (int thisPin = pinCount -1; thisPin >=0; thisPin--) {

digitalWrite(ledPins[thisPin], HIGH);

delay(timer);

digitalWrite(ledPins[thisPin], LOW);

    }

}




Home Security System!





More projects for arduino

Note: Download the tutorial & code here:


avatar
jamied_uk
Admin

Posts : 2268
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum