Trompbots: verschil tussen versies
Naar navigatie springen
Naar zoeken springen
Regel 258: | Regel 258: | ||
! style="border-style: solid; border-width: 1px;"| Programma | ! style="border-style: solid; border-width: 1px;"| Programma | ||
|- | |- | ||
| style="border-style: solid; border-width: 1px"| [[Bestand:JenK.png|350px]] | | style="border-style: solid; border-width: 1px"| [[Bestand:JenK.png|350px]] <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>* | ||
| style="border-style: solid; border-width: 1px"| <syntaxhighlight> | | style="border-style: solid; border-width: 1px"| <syntaxhighlight> // schakelaar.ino - lees een schakelaar in, en schake led aan en uit | ||
#include <Servo.h> | |||
Servo motora; | |||
Servo motorb; | |||
int pos1 = 120; | |||
int pos2 = 70; | |||
int pos3 = 100; | |||
int pos4 = 75; | |||
void setup() | |||
{ | |||
pinMode(5, INPUT_PULLUP); // drukknop, als input | |||
pinMode(2, OUTPUT); // LED als output | |||
motora.attach(10); | |||
motorb.attach(13); | |||
} | |||
void slag_1() | |||
{ | |||
motora.write(pos1); | |||
delay(200); | |||
motora.write(pos2); | |||
delay(300); | |||
} | |||
void slag_2() | |||
{ | |||
motora.write(pos1); | |||
delay(200); | |||
motora.write(pos2); | |||
delay(800); | |||
} | |||
void slag_3() | |||
{ | |||
motora.write(pos1); | |||
delay(200); | |||
motora.write(pos2); | |||
delay(800); | |||
motora.write(pos1); | |||
delay(200); | |||
motora.write(pos2); | |||
delay(300); | |||
motora.write(pos1); | |||
delay(200); | |||
motora.write(pos2); | |||
} | |||
void slag_4() | |||
{ | |||
delay(250); | |||
motora.write(pos3); | |||
delay(150); | |||
motora.write(pos2); | |||
delay(100); | |||
motora.write(pos3); | |||
delay(150); | |||
motora.write(pos2); | |||
} | |||
void slag_5() | |||
{ | |||
delay(100); | |||
motora.write(pos3); | |||
delay(100); | |||
motora.write(pos2); | |||
delay(250); | |||
motora.write(pos3); | |||
delay(250); | |||
motora.write(pos2); | |||
delay(500); | |||
} | |||
void slag_6() | |||
{ | |||
motora.write(pos4); | |||
delay(50); | |||
motora.write(pos2); | |||
delay(50); | |||
motora.write(pos4); | |||
delay(50); | |||
motora.write(pos2); | |||
delay(50); | |||
} | |||
void samba_1() | |||
{ | |||
motorb.write(180); | |||
delay(600); | |||
motorb.write(20); | |||
delay(600); | |||
} | |||
void loop() | |||
{ | |||
{ | |||
if ( digitalRead(5) == HIGH ) | |||
digitalWrite(2, HIGH); | |||
else | |||
programma(); | |||
} | |||
} | |||
void programma() | |||
{ | |||
digitalWrite(2, LOW); | |||
motorb.write(0); | |||
delay(500); | |||
for(int teller=0; teller<4; teller= teller + 1) | |||
{ | |||
slag_2(); | |||
} | |||
delay(100); | |||
for(int teller=0; teller<4; teller= teller + 1) | |||
{ | |||
slag_1(); | |||
} | |||
delay(50); | |||
slag_3(); | |||
delay(150); | |||
delay(100); | |||
slag_4(); | |||
slag_4(); | |||
delay(500); | |||
for(int teller=0; teller<4; teller= teller + 1) | |||
{ | |||
slag_1(); | |||
} | |||
delay(1000); | |||
slag_2(); | |||
slag_5(); | |||
for(int teller=0; teller<5; teller= teller + 1) | |||
{ | |||
slag_6(); | |||
} | |||
delay(100); | |||
for(int teller=0; teller<5; teller= teller + 1) | |||
{ | |||
samba_1(); | |||
} | |||
delay(100); | |||
for(int teller=0; teller<5; teller= teller + 1) | |||
{ | |||
samba_1(); | |||
} | |||
delay(100); | |||
for(int teller=0; teller<5; teller= teller + 1) | |||
{ | |||
samba_1(); | |||
delay(50); | |||
} | |||
delay(100); | |||
motorb.write(0); | |||
delay(100); | |||
slag_5(); | |||
} </syntaxhighlight> | |||
|} | |} |
Versie van 21 okt 2012 23:01
Trompbots en Trompbot-orkesten gemaakt door leerlingen van het Dr Knippenberg College in Helmond
Orkesten
(Wordt nog verder ingevuld)
- Hip Hop orkest
- Samba orkest
- Salsa orkest, door:
Trompbots
Claire & Pim
Tekening | Programma |
---|---|
Programma |
Niek & Sanne
Tekening | Programma |
---|---|
Bestand:Vb1.png Bestand:Vb2.png |
Programma |
Cas & Doortje
Tekening | Programma |
---|---|
Bestand:Vb1.png Bestand:Vb2.png |
Programma |
Linda & Sam
Tekening | Programma |
---|---|
Bestand:Vb1.png Bestand:Vb2.png |
Programma |
Jeroen & Stef
Kim & Fleur
Tekening | Programma |
---|---|
Bestand:Vb1.png Bestand:Vb2.png |
Programma |
Daan & Eveline
Noortje & Thijn