PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Good projects for the arduino

Go down

Good projects for the arduino Empty Good projects for the arduino

Post by jamied_uk 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:


jamied_uk
jamied_uk
Admin

Posts : 2952
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

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