Sei sulla pagina 1di 6

Materiale si structure inteligente

Arduino proiect

Mecatronica 10308

Studenti : Nica Robert Catalin

Craciun Stefanita

Prezentare proiect : Ceas cu leduri


Materiale folosite:

-o cutie de carton

-12 leduri

-12 rezistente de 330 ohmi

-o placuta Arduino UNO

-fire

Spatele ceasului:
Arduino UNO , pini folositi :GND, 1, 2, 3 ,
4, 5, 6, 7, 8, 9, 10, 11, 12

Schema electrica :
Cod sursa:
int y=1000;
int i=1, j=1;

void setup() {

pinMode(1, OUTPUT);

pinMode(2, OUTPUT);

pinMode(3, OUTPUT);

pinMode(4, OUTPUT);

pinMode(5, OUTPUT);

pinMode(6, OUTPUT);

pinMode(7, OUTPUT);

pinMode(8, OUTPUT);

pinMode(9, OUTPUT);

pinMode(10, OUTPUT);

pinMode(11, OUTPUT);

pinMode(12, OUTPUT);

void loop() {

for (j=1;j<=12;j++){

digitalWrite(i,HIGH);

digitalWrite(j,HIGH);

delay(y);

digitalWrite(j,LOW);
delay(y);

digitalWrite(j,HIGH);

delay(y);

digitalWrite(j,LOW);

delay(y);

digitalWrite(j,HIGH);

delay(y);

digitalWrite(j,LOW);

if(j==12){

j=0;

digitalWrite(i,LOW);

i++;

if(i==13){

i=1;