Profile cover photo
Profile photo
Guido Raffaelli
6 followers
6 followers
About
Communities and Collections
Posts

Post has attachment
Add a comment...

Ora aggiungo lo sketch da me creato
con un filmato del funzionamento
int R = 3;
int G = 5;
int B = 6;
int r = 9;
int g = 10;
int b = 11;

int brightness = 0;
int DELAY = 10;
int DEL = 250;
void setup() {

pinMode(R, OUTPUT);
pinMode(G, OUTPUT);
pinMode(B, OUTPUT);
pinMode(r, OUTPUT);
pinMode(g, OUTPUT);
pinMode(b, OUTPUT);}

void loop() {

// Gioco 1 sequenza passo 1/2

digitalWrite(R, HIGH);
digitalWrite(b, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(b, LOW);

digitalWrite(G, HIGH);
digitalWrite(r, HIGH);
delay(500);
digitalWrite(G, LOW);
digitalWrite(r, LOW);

digitalWrite(B, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(g, LOW);

digitalWrite(R, HIGH);
digitalWrite(b, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(b, LOW);
digitalWrite(G, LOW);
digitalWrite(g, LOW);

digitalWrite(B, HIGH);
digitalWrite(r, HIGH);
digitalWrite(G, HIGH);
digitalWrite(b, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(r, LOW);
digitalWrite(G, LOW);
digitalWrite(b, LOW);

digitalWrite(B, HIGH);
digitalWrite(r, HIGH);
digitalWrite(R, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(r, LOW);
digitalWrite(R, LOW);
digitalWrite(g, LOW);

digitalWrite(B, HIGH);
digitalWrite(r, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
digitalWrite(R, HIGH);
digitalWrite(b, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(r, LOW);
digitalWrite(G, LOW);
digitalWrite(g, LOW);
digitalWrite(R, LOW);
digitalWrite(b, LOW);

// Gioco 1 sequenza passo 2/2

digitalWrite(R, HIGH);
digitalWrite(b, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(b, LOW);

digitalWrite(G, HIGH);
digitalWrite(r, HIGH);
delay(500);
digitalWrite(G, LOW);
digitalWrite(r, LOW);

digitalWrite(B, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(g, LOW);

digitalWrite(R, HIGH);
digitalWrite(b, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(b, LOW);
digitalWrite(G, LOW);
digitalWrite(g, LOW);

digitalWrite(B, HIGH);
digitalWrite(r, HIGH);
digitalWrite(G, HIGH);
digitalWrite(b, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(r, LOW);
digitalWrite(G, LOW);
digitalWrite(b, LOW);

digitalWrite(B, HIGH);
digitalWrite(r, HIGH);
digitalWrite(R, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(r, LOW);
digitalWrite(R, LOW);
digitalWrite(g, LOW);

digitalWrite(B, HIGH);
digitalWrite(r, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
digitalWrite(R, HIGH);
digitalWrite(b, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(r, LOW);
digitalWrite(G, LOW);
digitalWrite(g, LOW);
digitalWrite(R, LOW);
digitalWrite(b, LOW);

// Gioco 2 Riempimento passo 1/2

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
delay(2000);

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(2000);

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
delay(2000);

digitalWrite(B, LOW);
digitalWrite(b, LOW);
delay(2000);

digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(2000);

digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(2000);

digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
delay(2000);

digitalWrite(B, LOW);
digitalWrite(b, LOW);
delay(2000);

digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(2000);

digitalWrite(R, LOW);
digitalWrite(r, LOW);

// Gioco 2 Riempimento passo 2/2

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
delay(2000);

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(2000);

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
delay(2000);

digitalWrite(B, LOW);
digitalWrite(b, LOW);
delay(2000);

digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(2000);

digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(2000);

digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
delay(2000);

digitalWrite(B, LOW);
digitalWrite(b, LOW);
delay(2000);

digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(2000);

digitalWrite(R, LOW);
digitalWrite(r, LOW);

// Gioco 3 dissolvenza Passo 1/2

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(R, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 255);
analogWrite(b, 255);

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(G, brightness);
analogWrite(r, brightness);
delay(DELAY);
}
analogWrite(G, 255);
analogWrite(r, 255);

for (brightness = 255; brightness > 0; brightness --) {
analogWrite(R, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 0);
analogWrite(b, 0);

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(B, brightness);
analogWrite(g, brightness);
delay(DELAY);
}
analogWrite(B, 255);
analogWrite(g, 255);

for (brightness = 255; brightness > 0; brightness --) {
analogWrite(G, brightness);
analogWrite(r, brightness);
delay(DELAY);
}
analogWrite(G, 0);
analogWrite(r, 0);

for (brightness = 255; brightness < 0; brightness --) {
analogWrite(B, brightness);
analogWrite(g, brightness);
delay(DELAY);
}
analogWrite(B, 0);
analogWrite(g, 0);

// Gioco 3 dissolvenza X Passo 2/2

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(R, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 255);
analogWrite(b, 255);

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(G, brightness);
analogWrite(r, brightness);
delay(DELAY);
}
analogWrite(G, 255);
analogWrite(r, 255);

for (brightness = 255; brightness > 0; brightness --) {
analogWrite(R, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 0);
analogWrite(b, 0);

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(B, brightness);
analogWrite(g, brightness);
delay(DELAY);
}
analogWrite(B, 255);
analogWrite(g, 255);

for (brightness = 255; brightness > 0; brightness --) {
analogWrite(G, brightness);
analogWrite(r, brightness);
delay(DELAY);
}
analogWrite(G, 0);
analogWrite(r, 0);

for (brightness = 255; brightness < 0; brightness --) {
analogWrite(B, brightness);
analogWrite(g, brightness);
delay(DELAY);
}
analogWrite(B, 0);
analogWrite(g, 0);

// Gioco 4 Lampeggi passo 1/2

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(r, LOW);
delay(500);

digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(500);

digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(b, LOW);
delay(500);

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(r, LOW);
digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(500);

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(r, LOW);
digitalWrite(B, LOW);
digitalWrite(b, LOW);
delay(500);

digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(b, LOW);
digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(500);

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(r, LOW);
digitalWrite(B, LOW);
digitalWrite(b, LOW);
digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(500);

// Gioco 4 Lampeggi passo 2/2

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(r, LOW);
delay(500);

digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(500);

digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(b, LOW);
delay(500);

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(r, LOW);
digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(500);

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(r, LOW);
digitalWrite(B, LOW);
digitalWrite(b, LOW);
delay(500);

digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(B, LOW);
digitalWrite(b, LOW);
digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(500);

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
digitalWrite(B, HIGH);
digitalWrite(b, HIGH);
digitalWrite(G, HIGH);
digitalWrite(g, HIGH);
delay(500);
digitalWrite(R, LOW);
digitalWrite(r, LOW);
digitalWrite(B, LOW);
digitalWrite(b, LOW);
digitalWrite(G, LOW);
digitalWrite(g, LOW);
delay(500);

// Gioco 5 Lampeggi Alternati passo 1/2

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
delay(1000);

digitalWrite(G, HIGH);
digitalWrite(R, LOW);
delay(1000);

digitalWrite(g, HIGH);
digitalWrite(r, LOW);
delay(1000);

digitalWrite(B, HIGH);
digitalWrite(G, LOW);
delay(1000);

digitalWrite(b, HIGH);
digitalWrite(g, LOW);
delay(1000);

digitalWrite(R, HIGH);
digitalWrite(B, LOW);
delay(1000);

digitalWrite(b, LOW);

// Gioco 5 Lampeggi Alternati passo 2/2

digitalWrite(R, HIGH);
digitalWrite(r, HIGH);
delay(1000);

digitalWrite(G, HIGH);
digitalWrite(R, LOW);
delay(1000);

digitalWrite(g, HIGH);
digitalWrite(r, LOW);
delay(1000);

digitalWrite(B, HIGH);
digitalWrite(G, LOW);
delay(1000);

digitalWrite(b, HIGH);
digitalWrite(g, LOW);
delay(1000);

digitalWrite(R, HIGH);
digitalWrite(B, LOW);
delay(1000);

digitalWrite(b, LOW);

// Gioco 6 dissolvenza passo 1/2

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(R, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 255);
analogWrite(b, 255);

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(G, brightness);
analogWrite(r, brightness);
delay(DELAY);
}
analogWrite(G, 255);
analogWrite(r, 255);

for (brightness = 255; brightness > 0; brightness --) {
analogWrite(R, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 0);
analogWrite(b, 0);

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(B, brightness);
analogWrite(g, brightness);
delay(DELAY);
}
analogWrite(B, 255);
analogWrite(g, 255);

for (brightness = 255; brightness > 0; brightness --) {
analogWrite(G, brightness);
analogWrite(r, brightness);
delay(DELAY);
}
analogWrite(G, 0);
analogWrite(r, 0);

for (brightness = 255; brightness < 0; brightness --) {
analogWrite(B, brightness);
analogWrite(g, brightness);
delay(DELAY);
}
analogWrite(B, 0);
analogWrite(g, 0);

// Gioco 6 dissolvenza passo 2/2

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(R, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 255);
analogWrite(b, 255);

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(G, brightness);
analogWrite(r, brightness);
delay(DELAY);
}
analogWrite(G, 255);
analogWrite(r, 255);

for (brightness = 255; brightness > 0; brightness --) {
analogWrite(R, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 0);
analogWrite(b, 0);

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(B, brightness);
analogWrite(g, brightness);
delay(DELAY);
}
analogWrite(B, 255);
analogWrite(g, 255);

for (brightness = 255; brightness > 0; brightness --) {
analogWrite(G, brightness);
analogWrite(r, brightness);
delay(DELAY);
}
analogWrite(G, 0);
analogWrite(r, 0);

for (brightness = 255; brightness < 0; brightness --) {
analogWrite(B, brightness);
analogWrite(g, brightness);
delay(DELAY);
}
analogWrite(B, 0);
analogWrite(g, 0);

// Gioco 7 Lampeggio singolo passo 1/3

digitalWrite(R, HIGH);
delay(DEL);
digitalWrite(R, LOW);
delay(DEL);

digitalWrite(b, HIGH);
delay(DEL);
digitalWrite(b, LOW);
delay(DEL);

digitalWrite(G, HIGH);
delay(DEL);
digitalWrite(G, LOW);
delay(DEL);

digitalWrite(r, HIGH);
delay(DEL);
digitalWrite(r, LOW);
delay(DEL);

digitalWrite(B, HIGH);
delay(DEL);
digitalWrite(B, LOW);
delay(DEL);

digitalWrite(g, HIGH);
delay(DEL);
digitalWrite(g, LOW);
delay(DEL);

// Gioco 7 Lampeggio singolo passo 2/3

digitalWrite(R, HIGH);
delay(DEL);
digitalWrite(R, LOW);
delay(DEL);

digitalWrite(b, HIGH);
delay(DEL);
digitalWrite(b, LOW);
delay(DEL);

digitalWrite(G, HIGH);
delay(DEL);
digitalWrite(G, LOW);
delay(DEL);

digitalWrite(r, HIGH);
delay(DEL);
digitalWrite(r, LOW);
delay(DEL);

digitalWrite(B, HIGH);
delay(DEL);
digitalWrite(B, LOW);
delay(DEL);

digitalWrite(g, HIGH);
delay(DEL);
digitalWrite(g, LOW);
delay(DEL);

// Gioco 7 Lampeggio singolo passo 3/3

digitalWrite(R, HIGH);
delay(DEL);
digitalWrite(R, LOW);
delay(DEL);

digitalWrite(b, HIGH);
delay(DEL);
digitalWrite(b, LOW);
delay(DEL);

digitalWrite(G, HIGH);
delay(DEL);
digitalWrite(G, LOW);
delay(DEL);

digitalWrite(r, HIGH);
delay(DEL);
digitalWrite(r, LOW);
delay(DEL);

digitalWrite(B, HIGH);
delay(DEL);
digitalWrite(B, LOW);
delay(DEL);

digitalWrite(g, HIGH);
delay(DEL);
digitalWrite(g, LOW);
delay(DEL);

// Gioco 8 dissolvenza bianca passo 1/2

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(R, brightness);
analogWrite(G, brightness);
analogWrite(B, brightness);
analogWrite(r, brightness);
analogWrite(g, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 255);
analogWrite(G, 255);
analogWrite(B, 255);
analogWrite(r, 255);
analogWrite(g, 255);
analogWrite(b, 255);

for (brightness = 255; brightness > 0; brightness --) {
analogWrite(R, brightness);
analogWrite(G, brightness);
analogWrite(B, brightness);
analogWrite(r, brightness);
analogWrite(g, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 0);
analogWrite(G, 0);
analogWrite(B, 0);
analogWrite(r, 0);
analogWrite(g, 0);
analogWrite(b, 0);

// Gioco 8 dissolvenza bianca passo 2/2

for (brightness = 0; brightness < 255; brightness ++) {
analogWrite(R, brightness);
analogWrite(G, brightness);
analogWrite(B, brightness);
analogWrite(r, brightness);
analogWrite(g, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 255);
analogWrite(G, 255);
analogWrite(B, 255);
analogWrite(r, 255);
analogWrite(g, 255);
analogWrite(b, 255);

for (brightness = 255; brightness > 0; brightness --) {
analogWrite(R, brightness);
analogWrite(G, brightness);
analogWrite(B, brightness);
analogWrite(r, brightness);
analogWrite(g, brightness);
analogWrite(b, brightness);
delay(DELAY);
}
analogWrite(R, 0);
analogWrite(G, 0);
analogWrite(B, 0);
analogWrite(r, 0);
analogWrite(g, 0);
analogWrite(b, 0);




}
Add a comment...

Post has attachment
Buon Giorno a tutti di seguito vi illustro meglio che posso il progetto da me eseguito:
Partiamo dall’alimentatore
Foto 7
Io ho usato un alimentatore per PC (anche se il suo uso non è tanto indicato) dal quale prendiamo sia i 12 V che ci servono per alimentare gli strip led che i 5 V che ci servono per alimentare arduino.
Foto 6
Come vedete dalla foto dal cavetto che comunemente alimentiamo hard disk e dvd sono andato a prendere le due tensioni che ci servono filo giallo +12 filo rosso + 5 filo nero gnd.
A questo punto dobbiamo fare in modo che l’alimentatore si accenda e per fare questo ho ponticellato sul connettore che alimenta la scheda madre il filo verde con il filo nero come da foto:
foto 8
A questo punto andiamo a preparare le unità di potenza per pilotare i led
Il primo shield ho usato lo schema di futura e lo ho montato su una mille fori
Foto 3
Di seguito schema e componenti
Foto 9
Foto 13
Per quanto riguarda il secondo shield ho usato un vecchio faretto rgb e ne sono andato a modificare la scheda di potenza:
foto 4
foto 10
Come si vede dalle foto ho usato solo i darlington tip122
Foto 15
e la resitenza di base da 330 ohm e di seguito mostrato il circuito
foto 11
Fatto questo non ci resta che collegare il tutto
Foto 14
Sopra uno schema a blocchi fatto in maniera più semplice possibile sperando che sia leggibile.
Queste sono alcune immagini del mio progetto:
foto 1
foto 2
foto 5
PhotoPhotoPhotoPhotoPhoto
20/10/16
15 Photos - View album
Add a comment...

Post has attachment
Buon Giorno a tutti di seguito vi illustro meglio che posso il progetto da me eseguito:
Partiamo dall’alimentatore
Foto 7
Io ho usato un alimentatore per PC (anche se il suo uso non è tanto indicato) dal quale prendiamo sia i 12 V che ci servono per alimentare gli strip led che i 5 V che ci servono per alimentare arduino.
Foto 6
Come vedete dalla foto dal cavetto che comunemente alimentiamo hard disk e dvd sono andato a prendere le due tensioni che ci servono filo giallo +12 filo rosso + 5 filo nero gnd.
A questo punto dobbiamo fare in modo che l’alimentatore si accenda e per fare questo ho ponticellato sul connettore che alimenta la scheda madre il filo verde con il filo nero come da foto:
foto 8
A questo punto andiamo a preparare le unità di potenza per pilotare i led
Il primo shield ho usato lo schema di futura e lo ho montato su una mille fori
Foto 3
Di seguito schema e componenti
Foto 9
Foto 13
Per quanto riguarda il secondo shield ho usato un vecchio faretto rgb e ne sono andato a modificare la scheda di potenza:
foto 4
foto 10
Come si vede dalle foto ho usato solo i darlington tip122
Foto 15
e la resitenza di base da 330 ohm e di seguito mostrato il circuito
foto 11
Fatto questo non ci resta che collegare il tutto
Foto 14
Sopra uno schema a blocchi fatto in maniera più semplice possibile sperando che sia leggibile.
Queste sono alcune immagini del mio progetto:
foto 1
foto 2
foto 5
PhotoPhotoPhotoPhotoPhoto
20/10/16
15 Photos - View album
Add a comment...
Wait while more posts are being loaded