Hauptmenü

heisser draht für zwei 2 spieler

 

 

heisser draht fuer 2 zwei spieler bauanleitung

 

 

Code 

----------------------------------------------------------------------------------------------------------------------------

 

#include <Adafruit_NeoPixel.h>

int start = 0 ;
int startlinks = 0 ;
int startrechts = 0 ;
int a;
int fehlerlinks = 0 ;
int fehlerrechts = 0 ;
int helligkeit = 0 ;
Adafruit_NeoPixel strip_pin5 = Adafruit_NeoPixel(8,5, NEO_RGB + NEO_KHZ800);

void Unterprogramm9();
void Unterprogramm();
void Unterprogramm12();
void Unterprogramm1();
void Unterprogramm2();
void Unterprogramm3();
void Unterprogramm8();

void setup()
{
pinMode( 3 , INPUT);
pinMode( 2 , INPUT);
pinMode( 10 , INPUT);
pinMode( 9 , INPUT);
pinMode( 11 , INPUT);
pinMode( 12 , INPUT);
pinMode( 7 , OUTPUT);
digitalWrite(12, HIGH);
digitalWrite(11, HIGH);
digitalWrite(10, HIGH);
digitalWrite(9, HIGH);
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
strip_pin5.begin();
strip_pin5.show();
Unterprogramm();

Unterprogramm8();

}

void loop()
{
if (( ( !( digitalRead(10) ) || !( digitalRead(12) ) ) && ( ( start ) == ( 0 ) ) ))
{
Unterprogramm8();
start = 1 ;
startlinks = 1 ;
startrechts = 1 ;
digitalWrite( 7 , HIGH );
for (a=1; a<= ( 3 ); ++a )
{
tone(6, 500, 500);
delay( 1000 );
}
tone(6, 800, 1000);
delay( 1000 );
digitalWrite( 7 , LOW );
}
Unterprogramm1();
Unterprogramm2();
Unterprogramm3();
}

void Unterprogramm12()
{
digitalWrite( 7 , HIGH );
tone(6, 900, 3000);
delay( 3000 );
digitalWrite( 7 , LOW );
}

void Unterprogramm9()
{
fehlerlinks = 5 ;
startrechts = 5 ;
startlinks = 5 ;
fehlerrechts = 5 ;
start = 0 ;
}

void Unterprogramm()
{
fehlerlinks = 5 ;
startrechts = 0 ;
startlinks = 0 ;
fehlerrechts = 5 ;
helligkeit = 180 ;
start = 0 ;
}

void Unterprogramm3()
{
if (( !( digitalRead(2) ) && ( ( fehlerrechts ) == ( 0 ) ) ))
{
Unterprogramm9();
strip_pin5.setBrightness(helligkeit);
strip_pin5.setPixelColor(0,0 ,0 ,120 );
strip_pin5.setPixelColor(1,0 ,0 ,120 );
strip_pin5.setPixelColor(2,0 ,0 ,120 );
strip_pin5.setPixelColor(5,0 ,120 ,0 );
strip_pin5.setPixelColor(6,0 ,120 ,0 );
strip_pin5.setPixelColor(7,0 ,120 ,0 );
strip_pin5.show();
Unterprogramm12();
}
if (( !( digitalRead(3) ) && ( ( fehlerlinks ) == ( 0 ) ) ))
{
Unterprogramm9();
strip_pin5.setBrightness(helligkeit);
strip_pin5.setPixelColor(5,0 ,0 ,120 );
strip_pin5.setPixelColor(6,0 ,0 ,120 );
strip_pin5.setPixelColor(7,0 ,0 ,120 );
strip_pin5.setPixelColor(0,0 ,120 ,0 );
strip_pin5.setPixelColor(1,0 ,120 ,0 );
strip_pin5.setPixelColor(2,0 ,120 ,0 );
strip_pin5.show();
Unterprogramm12();
}
}

void Unterprogramm1()
{
if (( !( digitalRead(10) ) && ( ( startrechts ) == ( 1 ) ) ))
{
fehlerrechts = 0 ;
strip_pin5.setBrightness(helligkeit);
strip_pin5.setPixelColor(0,120 ,0 ,0 );
strip_pin5.setPixelColor(1,120 ,0 ,0 );
strip_pin5.setPixelColor(2,120 ,0 ,0 );
strip_pin5.show();
}
if (( !( digitalRead(12) ) && ( ( startlinks ) == ( 1 ) ) ))
{
fehlerlinks = 0 ;
strip_pin5.setBrightness(helligkeit);
strip_pin5.setPixelColor(5,120 ,0 ,0 );
strip_pin5.setPixelColor(6,120 ,0 ,0 );
strip_pin5.setPixelColor(7,120 ,0 ,0 );
strip_pin5.show();
}
}

void Unterprogramm2()
{
if (( ( ( startrechts ) == ( 1 ) ) && !( digitalRead(9) ) ))
{
fehlerrechts = 1 ;
strip_pin5.setBrightness(helligkeit);
strip_pin5.setPixelColor(0,0 ,120 ,0 );
strip_pin5.setPixelColor(1,0 ,120 ,0 );
strip_pin5.setPixelColor(2,0 ,120 ,0 );
strip_pin5.show();
}
if (( ( ( startlinks ) == ( 1 ) ) && !( digitalRead(11) ) ))
{
fehlerlinks = 1 ;
strip_pin5.setBrightness(helligkeit);
strip_pin5.setPixelColor(5,0 ,120 ,0 );
strip_pin5.setPixelColor(6,0 ,120 ,0 );
strip_pin5.setPixelColor(7,0 ,120 ,0 );
strip_pin5.show();
}
}

void Unterprogramm8()
{
strip_pin5.setBrightness(helligkeit);
strip_pin5.setPixelColor(0,0 ,0 ,0 );
strip_pin5.setPixelColor(1,0 ,0 ,0 );
strip_pin5.setPixelColor(2,0 ,0 ,0 );
strip_pin5.setPixelColor(3,0 ,0 ,70 );
strip_pin5.setPixelColor(4,0 ,0 ,70 );
strip_pin5.setPixelColor(5,0 ,0 ,0 );
strip_pin5.setPixelColor(6,0 ,0 ,0 );
strip_pin5.setPixelColor(7,0 ,0 ,0 );
strip_pin5.show();
}

Kontaktformular

Mittlerweile bekomme ich relativ viele Anfragen insbesondere zur Arduino Programmierung. Ich helfe gern, schreibe auch mal den ein oder anderen Code und helfe auch sonst gerne weiter, wenn ich kann. Als kleines Dankeschön für einen fertigen Code, für eine Antwort die weitergeholfen hat oder ein Problem dass ich lösen konnte, würde ich mich über einen Besuch meiner Amazon Wunschliste freuen. Hier gibt für das kleine und große Danke alles zu finden. Versteht mich nicht falsch aber ich mache diese Seite einfach so in meiner Freizeit, neben meinem Beruf, Familie, Kinder, Haus und Ehrenamt, da freut man sich über ein kleines Dankeschön einfach. Es muss aber nicht unbedingt Amazon sein, über ein paypal Dankeschön freue ich mich auch. 

Amazon Wunschliste von Ronnie.

Palypal Seite von Ronnie.

 

Hier geht es zum Kontaktformular.

heißer draht mit zwei servomotoren

Heißer Draht bei dem hilfe von zwei Servomatoren die Zeit und die Fehler angezeigt werden. 

heisser draht servo auf steckplatine schaltplan

 


 

#include <Servo.h>

int startstopp = 0 ;
int fehler = 0 ;
int zeit = 0 ;
int servo = 0 ;
int start = 0 ;
Servo servo_pin_9;
Servo servo_pin_11;

void Unterprogramm1();
void Unterprogramm3();

void setup()
{
pinMode( 3 , INPUT);
pinMode( 2 , INPUT);
digitalWrite(3, HIGH);
digitalWrite(2, HIGH);
pinMode( 7 , OUTPUT);
servo_pin_11.attach(11);
servo_pin_9.attach(9);
Serial.begin(9600);
pinMode( 7 , OUTPUT);


startstopp = 0 ;

fehler = 0 ;

zeit = 1000 ;

servo = 5 ;

start = 0 ;

digitalWrite( 7 , LOW );

servo_pin_9.attach(9);
servo_pin_11.attach(11);
servo_pin_11.write( 0 );

servo_pin_9.write( 5 );

delay( 1000 );

servo_pin_9.detach();

servo_pin_11.detach();

}

void loop()
{
Serial.print("startstopp");
Serial.print(startstopp);
Serial.println();
if (!( digitalRead(2) ))
{
startstopp = ( startstopp + 1 ) ;
delay( 1000 );
Serial.print("startstopp");
Serial.print(startstopp);
Serial.println();
}
if (( ( startstopp ) == ( 1 ) ))
{
servo_pin_9.attach(9);
long current=millis();
while(current+6000>=millis())
{
if (( ( 180 ) >= ( servo ) ))
{
servo_pin_9.attach(9);
servo_pin_9.write( servo );
}
if (( ( 181 ) <= ( servo ) ))
{
digitalWrite( 7 , HIGH );
delay( 2000 );
digitalWrite( 7 , LOW );
startstopp = ( startstopp + 1 ) ;
delay( 500 );
Serial.print("startstopp");
Serial.print(startstopp);
Serial.println();
}
if (!( digitalRead(2) ))
{
startstopp = ( startstopp + 1 ) ;
delay( 1000 );
Serial.print("startstopp");
Serial.print(startstopp);
Serial.println();
}
if (!( digitalRead(3) ))
{
servo = ( servo + 5 ) ;
fehler = ( fehler + 1 ) ;
Unterprogramm1();
}
}
servo = ( servo + 6 ) ;
Serial.print("servo");
Serial.print(servo);
Serial.println();
}
if (( ( startstopp ) == ( 2 ) ))
{
servo_pin_11.detach();
servo_pin_9.detach();
digitalWrite( 7 , LOW );
}
if (( ( ( startstopp ) == ( 3 ) ) || ( ( ( startstopp ) == ( 4 ) ) || ( ( startstopp ) == ( 5 ) ) ) ))
{
startstopp = 0 ;
fehler = 0 ;
zeit = 1000 ;
servo = 5 ;
start = 0 ;
digitalWrite( 7 , LOW );
servo_pin_9.attach(9);
servo_pin_11.attach(11);
servo_pin_11.write( 0 );
servo_pin_9.write( 5 );
delay( 500 );
servo_pin_9.detach();
servo_pin_11.detach();
}
}

void Unterprogramm3()
{
digitalWrite( 7 , HIGH );
delay( 1000 );
digitalWrite( 7 , LOW );
servo_pin_11.detach();
}

void Unterprogramm1()
{
if (( ( fehler ) == ( 1 ) ))
{
servo_pin_11.attach(11);
delay( 5 );
servo_pin_11.write( 18 );
Unterprogramm3();
}
if (( ( fehler ) == ( 2 ) ))
{
servo_pin_11.attach(11);
delay( 5 );
servo_pin_11.write( 36 );
Unterprogramm3();
}
if (( ( fehler ) == ( 3 ) ))
{
servo_pin_11.attach(11);
delay( 5 );
servo_pin_11.write( 54 );
Unterprogramm3();
}
if (( ( fehler ) == ( 4 ) ))
{
servo_pin_11.attach(11);
delay( 5 );
servo_pin_11.write( 72 );
Unterprogramm3();
}
if (( ( fehler ) == ( 5 ) ))
{
servo_pin_11.attach(11);
delay( 5 );
servo_pin_11.write( 90 );
Unterprogramm3();
}
if (( ( fehler ) == ( 6 ) ))
{
servo_pin_11.attach(11);
delay( 5 );
servo_pin_11.write( 108 );
Unterprogramm3();
}
if (( ( fehler ) == ( 7 ) ))
{
servo_pin_11.attach(11);
delay( 5 );
servo_pin_11.write( 126 );
Unterprogramm3();
}
if (( ( fehler ) == ( 8 ) ))
{
servo_pin_11.attach(11);
delay( 5 );
servo_pin_11.write( 144 );
Unterprogramm3();
}
if (( ( fehler ) == ( 9 ) ))
{
servo_pin_11.attach(11);
delay( 5 );
servo_pin_11.write( 162 );
Unterprogramm3();
}
if (( ( fehler ) == ( 10 ) ))
{
digitalWrite( 7 , HIGH );
delay( 2000 );
digitalWrite( 7 , LOW );
servo_pin_11.attach(11);
delay( 10 );
servo_pin_11.write( 180 );
delay( 1000 );
servo_pin_11.detach();
fehler = 0 ;
startstopp = 3 ;
}
}

 

heisser Draht spiel mit 8x8 LED Matrix Arduino Code

 

 

8x8 led matrix heissen draht bauen zahlen

 

Code


#include <Sprite.h>
#include <Matrix.h>

int fehler = 0 ;
int zeit ;

Matrix mesLeds121110 = Matrix(12,11,10,1);
int X[] = {
0,7,6,5,4,3,2,1};
int Y[] = {
7,6,5,4,3,2,1,0};

void Unterprogramm0();

void setup()
{
pinMode( 7 , INPUT);
pinMode( 5 , OUTPUT);
mesLeds121110.clear();
mesLeds121110.setBrightness(15);
fehler = 0 ;
delay(5);

{
for (zeit; zeit<= ( 5 ); ++zeit )
{
mesLeds121110.write(X[0],Y[1],HIGH);
mesLeds121110.write(X[1],Y[1],HIGH);
mesLeds121110.write(X[2],Y[1],HIGH);
mesLeds121110.write(X[3],Y[1],HIGH);
mesLeds121110.write(X[4],Y[1],HIGH);
mesLeds121110.write(X[5],Y[1],HIGH);
mesLeds121110.write(X[6],Y[1],HIGH);
mesLeds121110.write(X[7],Y[1],HIGH);

mesLeds121110.write(X[0],Y[2],HIGH);
mesLeds121110.write(X[1],Y[2],HIGH);
mesLeds121110.write(X[2],Y[2],HIGH);
mesLeds121110.write(X[3],Y[2],HIGH);
mesLeds121110.write(X[4],Y[2],HIGH);
mesLeds121110.write(X[5],Y[2],HIGH);
mesLeds121110.write(X[6],Y[2],HIGH);
mesLeds121110.write(X[7],Y[2],HIGH);

mesLeds121110.write(X[0],Y[5],HIGH);
mesLeds121110.write(X[1],Y[5],HIGH);
mesLeds121110.write(X[2],Y[5],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);
mesLeds121110.write(X[4],Y[5],HIGH);
mesLeds121110.write(X[5],Y[5],HIGH);
mesLeds121110.write(X[6],Y[5],HIGH);
mesLeds121110.write(X[7],Y[5],HIGH);

mesLeds121110.write(X[0],Y[6],HIGH);
mesLeds121110.write(X[1],Y[6],HIGH);
mesLeds121110.write(X[2],Y[6],HIGH);
mesLeds121110.write(X[3],Y[6],HIGH);
mesLeds121110.write(X[4],Y[6],HIGH);
mesLeds121110.write(X[5],Y[6],HIGH);
mesLeds121110.write(X[6],Y[6],HIGH);
mesLeds121110.write(X[7],Y[6],HIGH);

mesLeds121110.write(X[7],Y[3],HIGH);
mesLeds121110.write(X[7],Y[4],HIGH);
mesLeds121110.write(X[6],Y[3],HIGH);
mesLeds121110.write(X[6],Y[4],HIGH);

mesLeds121110.write(X[0],Y[3],HIGH);
mesLeds121110.write(X[0],Y[4],HIGH);
mesLeds121110.write(X[1],Y[3],HIGH);
mesLeds121110.write(X[1],Y[4],HIGH);

delay(300);

mesLeds121110.write(X[0],Y[1],LOW);
mesLeds121110.write(X[1],Y[1],LOW);
mesLeds121110.write(X[2],Y[1],LOW);
mesLeds121110.write(X[3],Y[1],LOW);
mesLeds121110.write(X[4],Y[1],LOW);
mesLeds121110.write(X[5],Y[1],LOW);
mesLeds121110.write(X[6],Y[1],LOW);
mesLeds121110.write(X[7],Y[1],LOW);

mesLeds121110.write(X[0],Y[2],LOW);
mesLeds121110.write(X[1],Y[2],LOW);
mesLeds121110.write(X[2],Y[2],LOW);
mesLeds121110.write(X[3],Y[2],LOW);
mesLeds121110.write(X[4],Y[2],LOW);
mesLeds121110.write(X[5],Y[2],LOW);
mesLeds121110.write(X[6],Y[2],LOW);
mesLeds121110.write(X[7],Y[2],LOW);

mesLeds121110.write(X[0],Y[5],LOW);
mesLeds121110.write(X[1],Y[5],LOW);
mesLeds121110.write(X[2],Y[5],LOW);
mesLeds121110.write(X[3],Y[5],LOW);
mesLeds121110.write(X[4],Y[5],LOW);
mesLeds121110.write(X[5],Y[5],LOW);
mesLeds121110.write(X[6],Y[5],LOW);
mesLeds121110.write(X[7],Y[5],LOW);

mesLeds121110.write(X[0],Y[6],LOW);
mesLeds121110.write(X[1],Y[6],LOW);
mesLeds121110.write(X[2],Y[6],LOW);
mesLeds121110.write(X[3],Y[6],LOW);
mesLeds121110.write(X[4],Y[6],LOW);
mesLeds121110.write(X[5],Y[6],LOW);
mesLeds121110.write(X[6],Y[6],LOW);
mesLeds121110.write(X[7],Y[6],LOW);

mesLeds121110.write(X[7],Y[3],LOW);
mesLeds121110.write(X[7],Y[4],LOW);
mesLeds121110.write(X[6],Y[3],LOW);
mesLeds121110.write(X[6],Y[4],LOW);

mesLeds121110.write(X[0],Y[3],LOW);
mesLeds121110.write(X[0],Y[4],LOW);
mesLeds121110.write(X[1],Y[3],LOW);
mesLeds121110.write(X[1],Y[4],LOW);

delay (300);

}

mesLeds121110.write(X[0],Y[1],HIGH);
mesLeds121110.write(X[1],Y[1],HIGH);
mesLeds121110.write(X[2],Y[1],HIGH);
mesLeds121110.write(X[3],Y[1],HIGH);
mesLeds121110.write(X[4],Y[1],HIGH);
mesLeds121110.write(X[5],Y[1],HIGH);
mesLeds121110.write(X[6],Y[1],HIGH);
mesLeds121110.write(X[7],Y[1],HIGH);

mesLeds121110.write(X[0],Y[2],HIGH);
mesLeds121110.write(X[1],Y[2],HIGH);
mesLeds121110.write(X[2],Y[2],HIGH);
mesLeds121110.write(X[3],Y[2],HIGH);
mesLeds121110.write(X[4],Y[2],HIGH);
mesLeds121110.write(X[5],Y[2],HIGH);
mesLeds121110.write(X[6],Y[2],HIGH);
mesLeds121110.write(X[7],Y[2],HIGH);

mesLeds121110.write(X[0],Y[5],HIGH);
mesLeds121110.write(X[1],Y[5],HIGH);
mesLeds121110.write(X[2],Y[5],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);
mesLeds121110.write(X[4],Y[5],HIGH);
mesLeds121110.write(X[5],Y[5],HIGH);
mesLeds121110.write(X[6],Y[5],HIGH);
mesLeds121110.write(X[7],Y[5],HIGH);

mesLeds121110.write(X[0],Y[6],HIGH);
mesLeds121110.write(X[1],Y[6],HIGH);
mesLeds121110.write(X[2],Y[6],HIGH);
mesLeds121110.write(X[3],Y[6],HIGH);
mesLeds121110.write(X[4],Y[6],HIGH);
mesLeds121110.write(X[5],Y[6],HIGH);
mesLeds121110.write(X[6],Y[6],HIGH);
mesLeds121110.write(X[7],Y[6],HIGH);

mesLeds121110.write(X[7],Y[3],HIGH);
mesLeds121110.write(X[7],Y[4],HIGH);
mesLeds121110.write(X[6],Y[3],HIGH);
mesLeds121110.write(X[6],Y[4],HIGH);

mesLeds121110.write(X[0],Y[3],HIGH);
mesLeds121110.write(X[0],Y[4],HIGH);
mesLeds121110.write(X[1],Y[3],HIGH);
mesLeds121110.write(X[1],Y[4],HIGH);

}

}

void loop()
{
if (digitalRead(7))
{
fehler = ( fehler + 1 ) ;
digitalWrite( 5 , HIGH );
delay( 200 );
Unterprogramm0();
delay( 50 );

if (( ( fehler ) == ( 1 ) ))
{

mesLeds121110.write(X[0],Y[4],HIGH);
mesLeds121110.write(X[1],Y[4],HIGH);
mesLeds121110.write(X[2],Y[4],HIGH);
mesLeds121110.write(X[3],Y[4],HIGH);
mesLeds121110.write(X[4],Y[4],HIGH);
mesLeds121110.write(X[5],Y[4],HIGH);
mesLeds121110.write(X[6],Y[4],HIGH);
mesLeds121110.write(X[7],Y[4],HIGH);

mesLeds121110.write(X[0],Y[5],HIGH);
mesLeds121110.write(X[1],Y[5],HIGH);
mesLeds121110.write(X[2],Y[5],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);
mesLeds121110.write(X[4],Y[5],HIGH);
mesLeds121110.write(X[5],Y[5],HIGH);
mesLeds121110.write(X[6],Y[5],HIGH);
mesLeds121110.write(X[7],Y[5],HIGH);

mesLeds121110.write(X[6],Y[3],HIGH);
mesLeds121110.write(X[5],Y[2],HIGH);
mesLeds121110.write(X[4],Y[1],HIGH);

mesLeds121110.write(X[5],Y[3],HIGH);
mesLeds121110.write(X[4],Y[2],HIGH);
mesLeds121110.write(X[3],Y[1],HIGH);

delay( 600 );
digitalWrite( 5 , LOW );

}

if (( ( fehler ) == ( 2 ) ))
{

mesLeds121110.write(X[7],Y[1],HIGH);
mesLeds121110.write(X[7],Y[2],HIGH);
mesLeds121110.write(X[7],Y[3],HIGH);
mesLeds121110.write(X[7],Y[4],HIGH);
mesLeds121110.write(X[7],Y[5],HIGH);
mesLeds121110.write(X[7],Y[6],HIGH);

mesLeds121110.write(X[6],Y[1],HIGH);
mesLeds121110.write(X[6],Y[2],HIGH);
mesLeds121110.write(X[6],Y[3],HIGH);
mesLeds121110.write(X[6],Y[4],HIGH);
mesLeds121110.write(X[6],Y[5],HIGH);
mesLeds121110.write(X[6],Y[6],HIGH);

mesLeds121110.write(X[4],Y[1],HIGH);
mesLeds121110.write(X[4],Y[2],HIGH);
mesLeds121110.write(X[4],Y[3],HIGH);
mesLeds121110.write(X[4],Y[4],HIGH);
mesLeds121110.write(X[4],Y[5],HIGH);
mesLeds121110.write(X[4],Y[6],HIGH);

mesLeds121110.write(X[3],Y[1],HIGH);
mesLeds121110.write(X[3],Y[2],HIGH);
mesLeds121110.write(X[3],Y[3],HIGH);
mesLeds121110.write(X[3],Y[4],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);
mesLeds121110.write(X[3],Y[6],HIGH);

mesLeds121110.write(X[1],Y[1],HIGH);
mesLeds121110.write(X[1],Y[2],HIGH);
mesLeds121110.write(X[1],Y[3],HIGH);
mesLeds121110.write(X[1],Y[4],HIGH);
mesLeds121110.write(X[1],Y[5],HIGH);
mesLeds121110.write(X[1],Y[6],HIGH);

mesLeds121110.write(X[0],Y[1],HIGH);
mesLeds121110.write(X[0],Y[2],HIGH);
mesLeds121110.write(X[0],Y[3],HIGH);
mesLeds121110.write(X[0],Y[4],HIGH);
mesLeds121110.write(X[0],Y[5],HIGH);
mesLeds121110.write(X[0],Y[6],HIGH);

mesLeds121110.write(X[2],Y[1],HIGH);
mesLeds121110.write(X[2],Y[2],HIGH);

mesLeds121110.write(X[5],Y[5],HIGH);
mesLeds121110.write(X[5],Y[6],HIGH);

delay( 600 );
digitalWrite( 5 , LOW );

}

if (( ( fehler ) == ( 3 ) ))
{

mesLeds121110.write(X[7],Y[1],HIGH);
mesLeds121110.write(X[7],Y[2],HIGH);
mesLeds121110.write(X[7],Y[3],HIGH);
mesLeds121110.write(X[7],Y[4],HIGH);
mesLeds121110.write(X[7],Y[5],HIGH);
mesLeds121110.write(X[7],Y[6],HIGH);

mesLeds121110.write(X[6],Y[1],HIGH);
mesLeds121110.write(X[6],Y[2],HIGH);
mesLeds121110.write(X[6],Y[3],HIGH);
mesLeds121110.write(X[6],Y[4],HIGH);
mesLeds121110.write(X[6],Y[5],HIGH);
mesLeds121110.write(X[6],Y[6],HIGH);

mesLeds121110.write(X[4],Y[1],HIGH);
mesLeds121110.write(X[4],Y[2],HIGH);
mesLeds121110.write(X[4],Y[3],HIGH);
mesLeds121110.write(X[4],Y[4],HIGH);
mesLeds121110.write(X[4],Y[5],HIGH);
mesLeds121110.write(X[4],Y[6],HIGH);

mesLeds121110.write(X[3],Y[1],HIGH);
mesLeds121110.write(X[3],Y[2],HIGH);
mesLeds121110.write(X[3],Y[3],HIGH);
mesLeds121110.write(X[3],Y[4],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);
mesLeds121110.write(X[3],Y[6],HIGH);

mesLeds121110.write(X[1],Y[1],HIGH);
mesLeds121110.write(X[1],Y[2],HIGH);
mesLeds121110.write(X[1],Y[3],HIGH);
mesLeds121110.write(X[1],Y[4],HIGH);
mesLeds121110.write(X[1],Y[5],HIGH);
mesLeds121110.write(X[1],Y[6],HIGH);

mesLeds121110.write(X[0],Y[1],HIGH);
mesLeds121110.write(X[0],Y[2],HIGH);
mesLeds121110.write(X[0],Y[3],HIGH);
mesLeds121110.write(X[0],Y[4],HIGH);
mesLeds121110.write(X[0],Y[5],HIGH);
mesLeds121110.write(X[0],Y[6],HIGH);

mesLeds121110.write(X[2],Y[5],HIGH);
mesLeds121110.write(X[2],Y[6],HIGH);

mesLeds121110.write(X[5],Y[5],HIGH);
mesLeds121110.write(X[5],Y[6],HIGH);

delay( 600 );
digitalWrite( 5 , LOW );

}


if (( ( fehler ) == ( 4 ) ))
{

mesLeds121110.write(X[7],Y[1],HIGH);
mesLeds121110.write(X[6],Y[1],HIGH);
mesLeds121110.write(X[5],Y[1],HIGH);
mesLeds121110.write(X[4],Y[1],HIGH);
mesLeds121110.write(X[3],Y[1],HIGH);
mesLeds121110.write(X[2],Y[1],HIGH);

mesLeds121110.write(X[7],Y[2],HIGH);
mesLeds121110.write(X[6],Y[2],HIGH);
mesLeds121110.write(X[5],Y[2],HIGH);
mesLeds121110.write(X[4],Y[2],HIGH);
mesLeds121110.write(X[3],Y[2],HIGH);
mesLeds121110.write(X[2],Y[2],HIGH);

mesLeds121110.write(X[0],Y[5],HIGH);
mesLeds121110.write(X[1],Y[5],HIGH);
mesLeds121110.write(X[2],Y[5],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);

mesLeds121110.write(X[0],Y[4],HIGH);
mesLeds121110.write(X[1],Y[4],HIGH);
mesLeds121110.write(X[2],Y[4],HIGH);
mesLeds121110.write(X[3],Y[4],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);

mesLeds121110.write(X[2],Y[3],HIGH);
mesLeds121110.write(X[3],Y[3],HIGH);

mesLeds121110.write(X[4],Y[4],HIGH);
mesLeds121110.write(X[4],Y[5],HIGH);

mesLeds121110.write(X[2],Y[6],HIGH);
mesLeds121110.write(X[3],Y[6],HIGH);

delay( 600 );
digitalWrite( 5 , LOW );

}

if (( ( fehler ) == ( 5 ) ))
{

mesLeds121110.write(X[7],Y[1],HIGH);
mesLeds121110.write(X[7],Y[2],HIGH);
mesLeds121110.write(X[7],Y[3],HIGH);
mesLeds121110.write(X[7],Y[4],HIGH);
mesLeds121110.write(X[7],Y[5],HIGH);
mesLeds121110.write(X[7],Y[6],HIGH);

mesLeds121110.write(X[6],Y[1],HIGH);
mesLeds121110.write(X[6],Y[2],HIGH);
mesLeds121110.write(X[6],Y[3],HIGH);
mesLeds121110.write(X[6],Y[4],HIGH);
mesLeds121110.write(X[6],Y[5],HIGH);
mesLeds121110.write(X[6],Y[6],HIGH);

mesLeds121110.write(X[4],Y[1],HIGH);
mesLeds121110.write(X[4],Y[2],HIGH);
mesLeds121110.write(X[4],Y[3],HIGH);
mesLeds121110.write(X[4],Y[4],HIGH);
mesLeds121110.write(X[4],Y[5],HIGH);
mesLeds121110.write(X[4],Y[6],HIGH);

mesLeds121110.write(X[3],Y[1],HIGH);
mesLeds121110.write(X[3],Y[2],HIGH);
mesLeds121110.write(X[3],Y[3],HIGH);
mesLeds121110.write(X[3],Y[4],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);
mesLeds121110.write(X[3],Y[6],HIGH);

mesLeds121110.write(X[1],Y[1],HIGH);
mesLeds121110.write(X[1],Y[2],HIGH);
mesLeds121110.write(X[1],Y[3],HIGH);
mesLeds121110.write(X[1],Y[4],HIGH);
mesLeds121110.write(X[1],Y[5],HIGH);
mesLeds121110.write(X[1],Y[6],HIGH);

mesLeds121110.write(X[0],Y[1],HIGH);
mesLeds121110.write(X[0],Y[2],HIGH);
mesLeds121110.write(X[0],Y[3],HIGH);
mesLeds121110.write(X[0],Y[4],HIGH);
mesLeds121110.write(X[0],Y[5],HIGH);
mesLeds121110.write(X[0],Y[6],HIGH);

mesLeds121110.write(X[2],Y[5],HIGH);
mesLeds121110.write(X[2],Y[6],HIGH);

mesLeds121110.write(X[5],Y[1],HIGH);
mesLeds121110.write(X[5],Y[2],HIGH);

delay( 600 );
digitalWrite( 5 , LOW );

}


if (( ( fehler ) == ( 6 ) ))
{

mesLeds121110.write(X[7],Y[1],HIGH);
mesLeds121110.write(X[7],Y[2],HIGH);
mesLeds121110.write(X[7],Y[3],HIGH);
mesLeds121110.write(X[7],Y[4],HIGH);
mesLeds121110.write(X[7],Y[5],HIGH);
mesLeds121110.write(X[7],Y[6],HIGH);

mesLeds121110.write(X[6],Y[1],HIGH);
mesLeds121110.write(X[6],Y[2],HIGH);
mesLeds121110.write(X[6],Y[3],HIGH);
mesLeds121110.write(X[6],Y[4],HIGH);
mesLeds121110.write(X[6],Y[5],HIGH);
mesLeds121110.write(X[6],Y[6],HIGH);

mesLeds121110.write(X[4],Y[1],HIGH);
mesLeds121110.write(X[4],Y[2],HIGH);
mesLeds121110.write(X[4],Y[3],HIGH);
mesLeds121110.write(X[4],Y[4],HIGH);
mesLeds121110.write(X[4],Y[5],HIGH);
mesLeds121110.write(X[4],Y[6],HIGH);

mesLeds121110.write(X[3],Y[1],HIGH);
mesLeds121110.write(X[3],Y[2],HIGH);
mesLeds121110.write(X[3],Y[3],HIGH);
mesLeds121110.write(X[3],Y[4],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);
mesLeds121110.write(X[3],Y[6],HIGH);

mesLeds121110.write(X[1],Y[1],HIGH);
mesLeds121110.write(X[1],Y[2],HIGH);
mesLeds121110.write(X[1],Y[3],HIGH);
mesLeds121110.write(X[1],Y[4],HIGH);
mesLeds121110.write(X[1],Y[5],HIGH);
mesLeds121110.write(X[1],Y[6],HIGH);

mesLeds121110.write(X[0],Y[1],HIGH);
mesLeds121110.write(X[0],Y[2],HIGH);
mesLeds121110.write(X[0],Y[3],HIGH);
mesLeds121110.write(X[0],Y[4],HIGH);
mesLeds121110.write(X[0],Y[5],HIGH);
mesLeds121110.write(X[0],Y[6],HIGH);

mesLeds121110.write(X[2],Y[5],HIGH);
mesLeds121110.write(X[2],Y[6],HIGH);

mesLeds121110.write(X[5],Y[1],HIGH);
mesLeds121110.write(X[5],Y[2],HIGH);

mesLeds121110.write(X[2],Y[1],HIGH);
mesLeds121110.write(X[2],Y[2],HIGH);

delay( 600 );
digitalWrite( 5 , LOW );

}

if (( ( fehler ) == ( 7 ) ))
{

mesLeds121110.write(X[0],Y[3],HIGH);
mesLeds121110.write(X[1],Y[3],HIGH);
mesLeds121110.write(X[2],Y[4],HIGH);
mesLeds121110.write(X[3],Y[4],HIGH);
mesLeds121110.write(X[4],Y[5],HIGH);
mesLeds121110.write(X[5],Y[5],HIGH);
mesLeds121110.write(X[6],Y[5],HIGH);
mesLeds121110.write(X[7],Y[5],HIGH);

mesLeds121110.write(X[0],Y[4],HIGH);
mesLeds121110.write(X[1],Y[4],HIGH);
mesLeds121110.write(X[2],Y[5],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);
mesLeds121110.write(X[4],Y[6],HIGH);
mesLeds121110.write(X[5],Y[6],HIGH);
mesLeds121110.write(X[6],Y[6],HIGH);
mesLeds121110.write(X[7],Y[6],HIGH);

mesLeds121110.write(X[6],Y[1],HIGH);
mesLeds121110.write(X[6],Y[2],HIGH);
mesLeds121110.write(X[6],Y[3],HIGH);
mesLeds121110.write(X[6],Y[4],HIGH);
mesLeds121110.write(X[6],Y[5],HIGH);

mesLeds121110.write(X[7],Y[1],HIGH);
mesLeds121110.write(X[7],Y[2],HIGH);
mesLeds121110.write(X[7],Y[3],HIGH);
mesLeds121110.write(X[7],Y[4],HIGH);
mesLeds121110.write(X[7],Y[5],HIGH);


delay( 600 );
digitalWrite( 5 , LOW );

}



if (( ( fehler ) == ( 8 ) ))
{

mesLeds121110.write(X[7],Y[1],HIGH);
mesLeds121110.write(X[7],Y[2],HIGH);
mesLeds121110.write(X[7],Y[3],HIGH);
mesLeds121110.write(X[7],Y[4],HIGH);
mesLeds121110.write(X[7],Y[5],HIGH);
mesLeds121110.write(X[7],Y[6],HIGH);

mesLeds121110.write(X[6],Y[1],HIGH);
mesLeds121110.write(X[6],Y[2],HIGH);
mesLeds121110.write(X[6],Y[3],HIGH);
mesLeds121110.write(X[6],Y[4],HIGH);
mesLeds121110.write(X[6],Y[5],HIGH);
mesLeds121110.write(X[6],Y[6],HIGH);

mesLeds121110.write(X[4],Y[1],HIGH);
mesLeds121110.write(X[4],Y[2],HIGH);
mesLeds121110.write(X[4],Y[3],HIGH);
mesLeds121110.write(X[4],Y[4],HIGH);
mesLeds121110.write(X[4],Y[5],HIGH);
mesLeds121110.write(X[4],Y[6],HIGH);

mesLeds121110.write(X[3],Y[1],HIGH);
mesLeds121110.write(X[3],Y[2],HIGH);
mesLeds121110.write(X[3],Y[3],HIGH);
mesLeds121110.write(X[3],Y[4],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);
mesLeds121110.write(X[3],Y[6],HIGH);

mesLeds121110.write(X[1],Y[1],HIGH);
mesLeds121110.write(X[1],Y[2],HIGH);
mesLeds121110.write(X[1],Y[3],HIGH);
mesLeds121110.write(X[1],Y[4],HIGH);
mesLeds121110.write(X[1],Y[5],HIGH);
mesLeds121110.write(X[1],Y[6],HIGH);

mesLeds121110.write(X[0],Y[1],HIGH);
mesLeds121110.write(X[0],Y[2],HIGH);
mesLeds121110.write(X[0],Y[3],HIGH);
mesLeds121110.write(X[0],Y[4],HIGH);
mesLeds121110.write(X[0],Y[5],HIGH);
mesLeds121110.write(X[0],Y[6],HIGH);

mesLeds121110.write(X[2],Y[5],HIGH);
mesLeds121110.write(X[2],Y[6],HIGH);

mesLeds121110.write(X[5],Y[1],HIGH);
mesLeds121110.write(X[5],Y[2],HIGH);

mesLeds121110.write(X[2],Y[1],HIGH);
mesLeds121110.write(X[2],Y[2],HIGH);

mesLeds121110.write(X[5],Y[5],HIGH);
mesLeds121110.write(X[5],Y[6],HIGH);

delay( 600 );
digitalWrite( 5 , LOW );

}


if (( ( fehler ) == ( 9 ) ))
{

mesLeds121110.write(X[7],Y[1],HIGH);
mesLeds121110.write(X[7],Y[2],HIGH);
mesLeds121110.write(X[7],Y[3],HIGH);
mesLeds121110.write(X[7],Y[4],HIGH);
mesLeds121110.write(X[7],Y[5],HIGH);
mesLeds121110.write(X[7],Y[6],HIGH);

mesLeds121110.write(X[6],Y[1],HIGH);
mesLeds121110.write(X[6],Y[2],HIGH);
mesLeds121110.write(X[6],Y[3],HIGH);
mesLeds121110.write(X[6],Y[4],HIGH);
mesLeds121110.write(X[6],Y[5],HIGH);
mesLeds121110.write(X[6],Y[6],HIGH);

mesLeds121110.write(X[4],Y[1],HIGH);
mesLeds121110.write(X[4],Y[2],HIGH);
mesLeds121110.write(X[4],Y[3],HIGH);
mesLeds121110.write(X[4],Y[4],HIGH);
mesLeds121110.write(X[4],Y[5],HIGH);
mesLeds121110.write(X[4],Y[6],HIGH);

mesLeds121110.write(X[3],Y[1],HIGH);
mesLeds121110.write(X[3],Y[2],HIGH);
mesLeds121110.write(X[3],Y[3],HIGH);
mesLeds121110.write(X[3],Y[4],HIGH);
mesLeds121110.write(X[3],Y[5],HIGH);
mesLeds121110.write(X[3],Y[6],HIGH);

mesLeds121110.write(X[1],Y[1],HIGH);
mesLeds121110.write(X[1],Y[2],HIGH);
mesLeds121110.write(X[1],Y[3],HIGH);
mesLeds121110.write(X[1],Y[4],HIGH);
mesLeds121110.write(X[1],Y[5],HIGH);
mesLeds121110.write(X[1],Y[6],HIGH);

mesLeds121110.write(X[0],Y[1],HIGH);
mesLeds121110.write(X[0],Y[2],HIGH);
mesLeds121110.write(X[0],Y[3],HIGH);
mesLeds121110.write(X[0],Y[4],HIGH);
mesLeds121110.write(X[0],Y[5],HIGH);
mesLeds121110.write(X[0],Y[6],HIGH);

mesLeds121110.write(X[2],Y[5],HIGH);
mesLeds121110.write(X[2],Y[6],HIGH);

mesLeds121110.write(X[5],Y[1],HIGH);
mesLeds121110.write(X[5],Y[2],HIGH);

mesLeds121110.write(X[5],Y[5],HIGH);
mesLeds121110.write(X[5],Y[6],HIGH);

delay( 600 );
digitalWrite( 5 , LOW );
delay( 32000 );
delay( 32000 );
delay( 32000 );
delay( 32000 );
delay( 32000 );
delay( 32000 );
delay( 32000 );
delay( 32000 );
delay( 32000 );
}

}
}


void Unterprogramm0()
{
mesLeds121110.write(X[0],Y[0],LOW);
mesLeds121110.write(X[0],Y[1],LOW);
mesLeds121110.write(X[0],Y[2],LOW);
mesLeds121110.write(X[0],Y[3],LOW);
mesLeds121110.write(X[0],Y[4],LOW);
mesLeds121110.write(X[0],Y[5],LOW);
mesLeds121110.write(X[0],Y[6],LOW);
mesLeds121110.write(X[0],Y[7],LOW);

mesLeds121110.write(X[1],Y[0],LOW);
mesLeds121110.write(X[1],Y[1],LOW);
mesLeds121110.write(X[1],Y[2],LOW);
mesLeds121110.write(X[1],Y[3],LOW);
mesLeds121110.write(X[1],Y[4],LOW);
mesLeds121110.write(X[1],Y[5],LOW);
mesLeds121110.write(X[1],Y[6],LOW);
mesLeds121110.write(X[1],Y[7],LOW);

mesLeds121110.write(X[2],Y[0],LOW);
mesLeds121110.write(X[2],Y[1],LOW);
mesLeds121110.write(X[2],Y[2],LOW);
mesLeds121110.write(X[2],Y[3],LOW);
mesLeds121110.write(X[2],Y[4],LOW);
mesLeds121110.write(X[2],Y[5],LOW);
mesLeds121110.write(X[2],Y[6],LOW);
mesLeds121110.write(X[2],Y[7],LOW);

mesLeds121110.write(X[3],Y[0],LOW);
mesLeds121110.write(X[3],Y[1],LOW);
mesLeds121110.write(X[3],Y[2],LOW);
mesLeds121110.write(X[3],Y[3],LOW);
mesLeds121110.write(X[3],Y[4],LOW);
mesLeds121110.write(X[3],Y[5],LOW);
mesLeds121110.write(X[3],Y[6],LOW);
mesLeds121110.write(X[3],Y[7],LOW);

mesLeds121110.write(X[4],Y[0],LOW);
mesLeds121110.write(X[4],Y[1],LOW);
mesLeds121110.write(X[4],Y[2],LOW);
mesLeds121110.write(X[4],Y[3],LOW);
mesLeds121110.write(X[4],Y[4],LOW);
mesLeds121110.write(X[4],Y[5],LOW);
mesLeds121110.write(X[4],Y[6],LOW);
mesLeds121110.write(X[4],Y[7],LOW);

mesLeds121110.write(X[5],Y[0],LOW);
mesLeds121110.write(X[5],Y[1],LOW);
mesLeds121110.write(X[5],Y[2],LOW);
mesLeds121110.write(X[5],Y[3],LOW);
mesLeds121110.write(X[5],Y[4],LOW);
mesLeds121110.write(X[5],Y[5],LOW);
mesLeds121110.write(X[5],Y[6],LOW);
mesLeds121110.write(X[5],Y[7],LOW);

mesLeds121110.write(X[6],Y[0],LOW);
mesLeds121110.write(X[6],Y[1],LOW);
mesLeds121110.write(X[6],Y[2],LOW);
mesLeds121110.write(X[6],Y[3],LOW);
mesLeds121110.write(X[6],Y[4],LOW);
mesLeds121110.write(X[6],Y[5],LOW);
mesLeds121110.write(X[6],Y[6],LOW);
mesLeds121110.write(X[6],Y[7],LOW);

mesLeds121110.write(X[7],Y[0],LOW);
mesLeds121110.write(X[7],Y[1],LOW);
mesLeds121110.write(X[7],Y[2],LOW);
mesLeds121110.write(X[7],Y[3],LOW);
mesLeds121110.write(X[7],Y[4],LOW);
mesLeds121110.write(X[7],Y[5],LOW);
mesLeds121110.write(X[7],Y[6],LOW);
mesLeds121110.write(X[7],Y[7],LOW);

}

heisser draht ohne betrügen mit 3 led grün gelb rot und arduino

 

heisser draht ohne betreugen led rot gruen

 

--------------------------------------------------------

int spiel = 0 ;
int ersterstart = 0 ;

void setup()
{
pinMode( 3 , INPUT);
pinMode( 5 , INPUT);
pinMode( 4 , INPUT);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
pinMode( 10 , OUTPUT);
pinMode( 11 , OUTPUT);
pinMode( 12 , OUTPUT);
Serial.begin(9600);

spiel = 0 ;

ersterstart = 0 ;

digitalWrite( 10 , LOW );

digitalWrite( 11 , HIGH );

digitalWrite( 12 , LOW );

}

void loop()
{
if (( !( digitalRead(3) ) && ( ( ersterstart ) == ( 0 ) ) ))
{
spiel = ( spiel + 1 ) ;
ersterstart = ( ersterstart + 10 ) ;
digitalWrite( 11 , LOW );
digitalWrite( 12 , HIGH );
}
Serial.print("spiel gesperrt");
Serial.println();
while ( ( !( digitalRead(4) ) && ( ( spiel ) == ( 1 ) ) ) )
{
spiel = ( spiel + 1 ) ;
while ( ( ( spiel ) == ( 2 ) ) )
{
digitalWrite( 12 , LOW );
digitalWrite( 11 , HIGH );
if (!( digitalRead(3) ))
{
spiel = 1 ;
digitalWrite( 12 , HIGH );
digitalWrite( 11 , LOW );
}
Serial.print("spiel gesperrt");
Serial.println();
}

}

while ( ( !( digitalRead(5) ) && ( ( spiel ) == ( 1 ) ) ) )
{
spiel = ( spiel + 1 ) ;
while ( ( ( spiel ) == ( 2 ) ) )
{
digitalWrite( 10 , HIGH );
digitalWrite( 11 , LOW );
digitalWrite( 12 , LOW );
if (!( digitalRead(3) ))
{
spiel = 1 ;
digitalWrite( 12 , HIGH );
digitalWrite( 11 , LOW );
digitalWrite( 10 , LOW );
}
Serial.print("spiel gemeistert");
Serial.println();
}

}

}

Vielen dank für ihre Bestellung

Sie erhalten in den nächsten Tagen eine e-mail mit der Rechnung für ihre Bestellung. Bitte überweisen sie den Betrag auf das auf der Rechnung angegeben Konto. Mit der Überweisung ist der Kaufvertrag dann zustande gekommen und ich versende so schnell wie möglich aber innerhalb von 10 Werktagen die Schaltung oder das Spiel an sie. 

Wenn sie ein Angebot oder eine Frage abgesendet haben erhalten sie ebenfalls in den nächsten Tage eine Antwort oder ein konkretes Angebot. 

Viele Grüße ihr Team von kreativekiste.de

 

Hier geht es zur Startseite von KreativeKiste.de

 

Hier geht es zur Heißen-Draht-Manufaktur.de

 

 

heisser draht mit Neo Pixel für Arduino

heisser draht neo pixel anzeige 12 fehler anzeige bauen

 

 

#include <Adafruit_NeoPixel.h>

Adafruit_NeoPixel strip_pin6 = Adafruit_NeoPixel(12,6, NEO_RGB + NEO_KHZ800);
int zaeler = 0 ;
int pixel = 0 ;
int fehler = 0 ;
int farbe = 0 ;
bool entprellen= false ;
int entprellenstopp = 0 ;
int summerstopp = 0 ;
int rot = 0 ;
int greun = 0 ;
int blau = 0 ;
int rot1 = 0 ;
int greun1 = 0 ;
int blau1 = 0 ;
int farben = 0 ;

void Unterprogramm1();
void Unterprogramm2();
void Unterprogramm3();
void Unterprogramm4();

void setup()
{
pinMode( 2 , INPUT);
pinMode( 4 , INPUT);
strip_pin6.begin();
strip_pin6.show();
pinMode( 4 , OUTPUT);
Serial.begin(9600);
randomSeed(analogRead(A0) + analogRead(A1) + analogRead(A2));

strip_pin6.setBrightness(200);

zaeler = -1 ;

pixel = -1 ;

fehler = 0 ;

farbe = 0 ;

entprellen = LOW ;

entprellenstopp = 0 ;

summerstopp = 0 ;

rot = 0 ;

greun = 0 ;

blau = 0 ;

rot1 = 0 ;

greun1 = 0 ;

blau1 = 0 ;

farben = 0 ;

}

void loop()
{
long current=millis();
while(current+100>=millis())
{
if (( digitalRead(2) && !( entprellen ) ))
{
fehler = ( fehler + 1 ) ;
entprellen = HIGH ;
digitalWrite( 4 , HIGH );
}
}
zaeler = ( zaeler + 1 ) ;
farben = ( farben + 1 ) ;
Serial.print(farben);
Serial.println();
Unterprogramm2();
Unterprogramm3();
Unterprogramm4();
}

void Unterprogramm3()
{
if (( ( zaeler ) <= ( 12 ) ))
{
pixel = ( pixel + 1 ) ;
strip_pin6.setPixelColor(pixel,rot ,greun ,blau );
Unterprogramm1();
strip_pin6.show();
}
if (( ( zaeler ) == ( 13 ) ))
{
pixel = -1 ;
zaeler = 14 ;
}
if (( ( zaeler ) >= ( 14 ) ))
{
pixel = ( pixel + 1 ) ;
strip_pin6.setPixelColor(pixel,rot1 ,greun1 ,blau1 );
Unterprogramm1();
strip_pin6.show();
}
if (( ( zaeler ) == ( 25 ) ))
{
zaeler = 0 ;
pixel = -1 ;
}
}

void Unterprogramm2()
{
if (entprellen)
{
entprellenstopp = ( entprellenstopp + 1 ) ;
}
if (digitalRead(4))
{
summerstopp = ( summerstopp + 1 ) ;
}
if (( ( entprellenstopp ) == ( 10 ) ))
{
entprellen = LOW ;
entprellenstopp = 0 ;
}
if (( ( summerstopp ) == ( 30 ) ))
{
summerstopp = 0 ;
digitalWrite( 4 , LOW );
}
}

void Unterprogramm4()
{
if (( ( farben ) == ( 1 ) ))
{
rot1 = random( 50 ) ;
greun1 = random( 50 ) ;
blau1 = random( 50 ) ;
}
if (( ( farben ) == ( 24 ) ))
{
rot = random( 50 ) ;
greun = random( 50 ) ;
blau = random( 50 ) ;
farben = 0 ;
}
}

void Unterprogramm1()
{
if (( ( 1 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(0,2 ,255 ,2 );
strip_pin6.show();
}
if (( ( 2 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(1,2 ,255 ,2 );
strip_pin6.show();
}
if (( ( 3 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(2,2 ,255 ,2 );
strip_pin6.show();
}
if (( ( 4 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(3,2 ,255 ,2 );
strip_pin6.show();
}
if (( ( 5 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(4,2 ,255 ,2 );
strip_pin6.show();
}
if (( ( 6 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(5,2 ,255 ,2 );
strip_pin6.show();
}
if (( ( 7 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(6,2 ,255 ,2 );
strip_pin6.show();
}
if (( ( 8 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(7,2 ,255 ,2 );
strip_pin6.show();
}
if (( ( 9 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(8,2 ,255 ,2 );
strip_pin6.show();
}
if (( ( 10 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(9,2 ,255 ,2 );
strip_pin6.show();
}
if (( ( 11 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(10,2 ,255 ,2 );
strip_pin6.show();
}
if (( ( 12 ) <= ( fehler ) ))
{
strip_pin6.setPixelColor(11,2 ,255 ,2 );
strip_pin6.show();
}
}

heisser Draht one chance arduino code

 

hot wire game heisser draht led summer reset

 

 

int a;

void setup()
{
pinMode( 4 , INPUT);
pinMode( 1 , OUTPUT);
pinMode( 0 , OUTPUT);
pinMode( 1 , OUTPUT);
pinMode( 2 , OUTPUT);
pinMode( 0 , OUTPUT);
analogWrite(0 , 115);

digitalWrite( 1 , LOW );

digitalWrite( 2 , LOW );

}

void loop()
{
if (digitalRead(4))
{
digitalWrite( 0 , LOW );
analogWrite(1 , 115);
digitalWrite( 2 , HIGH );
delay( 1500 );
digitalWrite( 2 , LOW );
for (a=1; a<= ( 32000 ); ++a )
{
delay( 32000 );
delay( 32000 );
}
}
delay( 1 );
}

heisser-draht-fehler-led-summer-code

 

hot wire game play build

 

 

void setup()
{
pinMode( 0 , INPUT);
pinMode( 1 , OUTPUT);
pinMode( 1 , OUTPUT);
pinMode( 2 , OUTPUT);
analogWrite(1 , 150);

delay( 300 );

digitalWrite( 1 , LOW );

delay( 300 );

analogWrite(1 , 150);

delay( 300 );

digitalWrite( 1 , LOW );

delay( 300 );

}

void loop()
{
if (digitalRead(0))
{
analogWrite(1 , 150);
digitalWrite( 2 , HIGH );
delay( 900 );
digitalWrite( 1 , LOW );
digitalWrite( 2 , LOW );
}
delay( 2 );
}

heißer Draht mit sieben Segment Anzeige bauen Code

heisser draht mit attiny 44 sieben segmentanzeige



int fehler = 0 ; void setup() { pinMode( 7 , INPUT); pinMode( 9 , OUTPUT); pinMode( 10 , OUTPUT); pinMode( 0 , OUTPUT); pinMode( 1 , OUTPUT); pinMode( 2 , OUTPUT); pinMode( 3 , OUTPUT); pinMode( 4 , OUTPUT); pinMode( 5 , OUTPUT); pinMode( 6 , OUTPUT); fehler = 0 ; } void loop() { if ( digitalRead( 7)) { fehler = ( fehler + 1 ) ; delay( 5 ); digitalWrite( 9 , HIGH ); digitalWrite( 10 , HIGH ); delay( 1000 ); digitalWrite( 9 , LOW ); digitalWrite( 10 , LOW ); } if (( ( fehler ) == ( 0 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , HIGH ); digitalWrite( 3 , LOW ); digitalWrite( 4 , LOW ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 10 ); } if (( ( fehler ) == ( 1 ) )) { digitalWrite( 0 , HIGH ); digitalWrite( 1 , LOW ); digitalWrite( 2 , HIGH ); digitalWrite( 3 , LOW ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , HIGH ); digitalWrite( 6 , HIGH ); delay( 5 ); } if (( ( fehler ) == ( 2 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , HIGH ); digitalWrite( 2 , LOW ); digitalWrite( 3 , LOW ); digitalWrite( 4 , LOW ); digitalWrite( 5 , HIGH ); digitalWrite( 6 , LOW ); delay( 5 ); } if (( ( fehler ) == ( 3 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , LOW ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , HIGH ); digitalWrite( 6 , LOW ); delay( 10 ); } if (( ( fehler ) == ( 4 ) )) { digitalWrite( 0 , HIGH ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , LOW ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , LOW ); digitalWrite( 6 , HIGH ); delay( 5 ); } if (( ( fehler ) == ( 5 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , HIGH ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 5 ); } if (( ( fehler ) == ( 6 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , HIGH ); digitalWrite( 4 , LOW ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 10 ); } if (( ( fehler ) == ( 7 ) )) { digitalWrite( 0 , HIGH ); digitalWrite( 1 , LOW ); digitalWrite( 2 , HIGH ); digitalWrite( 3 , LOW ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , HIGH ); digitalWrite( 6 , LOW ); delay( 5 ); } if (( ( fehler ) == ( 8 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , LOW ); digitalWrite( 4 , LOW ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 5 ); } if (( ( fehler ) == ( 9 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , LOW ); digitalWrite( 3 , LOW ); digitalWrite( 4 , HIGH ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 10 ); } if (( ( fehler ) == ( 10 ) )) { digitalWrite( 0 , LOW ); digitalWrite( 1 , LOW ); digitalWrite( 2 , HIGH ); digitalWrite( 3 , LOW ); digitalWrite( 4 , LOW ); digitalWrite( 5 , LOW ); digitalWrite( 6 , LOW ); delay( 5 ); VAR_1_fehler = 0 ; digitalWrite( 9 , HIGH ); digitalWrite( 10 , HIGH ); delay( 3000 ); digitalWrite( 9 , LOW ); digitalWrite( 10 , LOW ); } }

heißer Draht mit LCD Display Fehler und Zeit Messung

// software for http://www.kreativekiste.de/elektro/dem-heissen-draht-auf-der-spur
// developed by Timo Denk (Nov 2014)
//
// wiring:
// 0: start
// 1: stop
// 2: mistake
// 3: buzzer
// A0: penalty time
// A4: display SDA
// A5: display SCL

// libraries
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3F,20,4);

const byte startPin = 0, stopPin = 1, mistakePin = 2, buzzerPin = 3, penaltyTimePin = A0;
const byte minPenaltyTime = 1, maxPenaltyTime = 17; // [t] = 1 s

const String penaltyTimeString = "Fehler", finalTimeString = "Endzeit", timeString = "Zeit", commercialString = "www.kreativekiste.de", mistakeString = "Berührt!!!", totalTime = "Gesamtzeit";

long millisStart, millisEnd;

int mistakes, penaltyTime, lastPenaltyTime;

void setup() {
lcd.init();
lcd.backlight();

pinMode(startPin, INPUT);
pinMode(stopPin, INPUT);
pinMode(mistakePin, INPUT);
pinMode(buzzerPin, OUTPUT);
digitalWrite(buzzerPin, LOW);
digitalWrite(startPin, HIGH);
digitalWrite(stopPin, HIGH);
digitalWrite(mistakePin, HIGH);
}

void loop() {
clearScreen();
printStringCenter(1, "Heisser Draht");

printStringCenter(2, "Strafzeit einstellen");
lastPenaltyTime = 0, penaltyTime = 0;
// waiting for game to start
while (digitalRead(startPin) == HIGH) {
penaltyTime = (byte)round(map(analogRead(penaltyTimePin), 0, 1023, minPenaltyTime, maxPenaltyTime));
if (penaltyTime != lastPenaltyTime) {
clearRow(3);
printStringCenter(3, String(penaltyTime) + " s");
lastPenaltyTime = penaltyTime;
}
}

// game running
millisStart = millis();
clearScreen();
mistakes = 0;
while (digitalRead(stopPin) == HIGH) {
// check for mistakes
printStatusOnScreen();
if (digitalRead(mistakePin) == LOW) {
mistakes++;
digitalWrite(buzzerPin, HIGH);
printStatusOnScreen();
delay(500);
digitalWrite(buzzerPin, LOW);
}
delay(10);
}

// game finished
millisEnd = millis();
clearScreen();
clearRow(0);
printStringCenter(0, "Spiel beendet!");
printStatusOnScreen();
delay(10000);
}

void printStatusOnScreen() {
int playingTime = round((millis() - millisStart)/1000), penaltyTimeSum = mistakes * penaltyTime;
printStringCenter(1, "Spielzeit: " + sec2MinSecString(playingTime));
printStringCenter(2, "Fehler: " + String(mistakes) + " x " + String(penaltyTime) + "s");
printStringCenter(3, "Gesamt: " + sec2MinSecString(playingTime + penaltyTimeSum));
}

void showCommercial() {
clearRow(0);
printStringCenter(0, commercialString);
}

void clearScreen() {
for (byte i = 0; i < 4; i++)
clearRow(i);

showCommercial();
}

void printStringCenter(byte row, String string) {
lcd.setCursor((int)((20 - string.length()) / 2), row);
lcd.print(string);
}

void clearRow(byte row) {
lcd.setCursor(0, row);
lcd.print(" ");
}

String sec2MinSecString(int input) { // converts seconds to a string like "minutes:seconds"
String minutes = String((int)(input / 60));
String seconds = String(input % 60);
if (seconds.length() == 1)
seconds = "0" + seconds;
//if (minutes.length() == 1)
// minutes = "0" + minutes;
return minutes + ":" + seconds + " ";
}

8x7 Segment Anzeige MAX7219CWG Stoppuhr Counter heißer Draht

Heißer Draht Code mit Stoppuhr (8-Stellige 7-Segmentanzeige mit serieller Ansteuerung (MAX7219), Arduino komp.) und Summer.

heisser draht mit stoppuhr bauanleitung

 

 

// code by:   Hugo T. 

 

#include "LedControl.h"
LedControl lc = LedControl(12, 11, 10,1 );

const int buttonPin = 2;    // Start, Stopp, Reset PIN
const int failurePin = 4;    // Fehler PIN
const int beeepPin = 13;  // Summer Pin (je nach Summer über einen Transitor)

void setup() {
lc.shutdown(0, false);
lc.clearDisplay(0);
lc.setIntensity(0, 15);

// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
pinMode(failurePin, INPUT);
pinMode(beeepPin, OUTPUT);
}

void printDashes() {

lc.setChar(0, 0, '-', false);
lc.setChar(0, 1, '-', false);
lc.setChar(0, 2, '-', false);
lc.setChar(0, 3, '-', false);
lc.setChar(0, 4, '-', false);
lc.setChar(0, 5, '-', false);
lc.setChar(0, 6, '-', false);
lc.setChar(0, 7, '-', false);

}
void blink(int times)
{


for (int i = 0; i < times; i++) {

lc.setScanLimit(0, 7);
lc.clearDisplay(0);

printDashes();

delay(150);
lc.clearDisplay(0);

lc.setScanLimit(0, 0);
delay(150);
}


}

void countdown(int counter)
{

while (counter >= 0)
{

int maxDigit = 0;

int n = counter;
for (int i = 0; i < 8; i++) {
int digit = n % 10;
n = n / 10;

lc.setDigit(0, i, digit, false);
if (digit)
{
maxDigit = i;
}
}

lc.setScanLimit(0, maxDigit);

delay(500);
lc.clearDisplay(0);
delay(100);

counter--;
}

}

void displayNumbers(int counter, int seconds, int minutes)
{
int maxDigit = 0;

showTime(counter, 0);
showTime(seconds, 3);
showTime(minutes, 6);

lc.setChar(0, 2, '-', false);
lc.setChar(0, 5, '-', false);


}

void showTime(int value, int positionStart) {
int maxDigit = 0;
int n = value;
int positionEnd = positionStart+2;
for (int i = positionStart; i < positionEnd; i++) {
int digit = n % 10;
n = n / 10;

lc.setDigit(0, i, digit, false);
if (digit)
{
maxDigit = i;
}
}

}

int counter = 0;
int seconds = 0;
int minutes = 0;
int didStart = 0;
int startButtonState = 0;
int failureButtonState = 0;

void loop() {
if (counter > 100) {
counter = 0;
seconds++;
}

if (seconds > 60) {
seconds = 0;
minutes++;
}

displayNumbers(counter, seconds, minutes);
startButtonState = digitalRead(buttonPin);
failureButtonState = digitalRead(failurePin);

if (didStart == 1 | startButtonState == 1)
{
if (didStart == 0) {
digitalWrite(beeepPin, HIGH);
}

if (seconds > 1) {
digitalWrite(beeepPin, LOW);
}

didStart = 1;

if (seconds > 1 & startButtonState == 1)
{
digitalWrite(beeepPin, HIGH);
delay(1500);
digitalWrite(beeepPin, LOW);
do
{
startButtonState = digitalRead(buttonPin);
} while (startButtonState == 0 );
counter = 0;
seconds = 0;
minutes = 0;
displayNumbers(counter, seconds, minutes);
didStart = 0;
delay(200);
}

if(failureButtonState == 1){
counter = 0;
seconds = 0;
minutes = 0;
displayNumbers(counter, seconds, minutes);
didStart = 0;
digitalWrite(beeepPin, HIGH);
delay(3000);
digitalWrite(beeepPin, LOW);
}

if (didStart != 0) {
delay(10);
lc.clearDisplay(0);
counter++;
}
}

//lc.clearDisplay(0);
}

99 Sekunden Timer für einen Attiny attiny 2013, heißer draht

99 SEKUNDEN Timer für einen heißen Draht. Die Verdrahtung eurer sieben Segment Anzeige entnehmt ihr bitte aus dem Datenblatt und gleicht mit (void set1(byte value)) für die erste und (void set10(byte value) für die zweite stelle ab. 

 heiser draht mit countdown anzeige bauen 

Arduino Code:

------------------------------------------------------------------------------------

const byte startStopPin = 0, mistakePin = 1, buzzerPin = 16;

long startMillis;

void setup()
{
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);
pinMode(13, OUTPUT);
pinMode(14, OUTPUT);
pinMode(15, OUTPUT);

pinMode(startStopPin, INPUT);
pinMode(mistakePin, INPUT);
pinMode(buzzerPin, OUTPUT);

displayNumber(0);
while(digitalRead(startStopPin) == LOW) // wait for the start signal
{ ; }

startMillis = millis();
}

void loop()
{
long number = 99 - (millis() - startMillis) / 1000;

if (number <= 0)
{
gameOver();
}

if (digitalRead(startStopPin) == HIGH && (millis() - startMillis) > 2000)
{
while(true)
{ ; }
}

if (digitalRead(mistakePin) == HIGH && (millis() - startMillis) > 2000)
{
gameOver();
}


displayNumber(number);
}

void displayNumber(byte x)
{
x %= 100;
set1(~dec27(x % 10));
set10(~dec27(x / 10));
}

void set1(byte value)
{
digitalWrite(2, bitRead(value, 0)); // segment a
digitalWrite(3, bitRead(value, 1)); // segment b
digitalWrite(4, bitRead(value, 2)); // segment c
digitalWrite(5, bitRead(value, 3)); // segment d
digitalWrite(6, bitRead(value, 4)); // segment e
digitalWrite(7, bitRead(value, 5)); // segment f
digitalWrite(8, bitRead(value, 6)); // segment g
}

void set10(byte value)
{
digitalWrite(9, bitRead(value, 0)); // segment a
digitalWrite(10, bitRead(value, 1)); // segment b
digitalWrite(11, bitRead(value, 2)); // segment c
digitalWrite(12, bitRead(value, 3)); // segment d
digitalWrite(13, bitRead(value, 4)); // segment e
digitalWrite(14, bitRead(value, 5)); // segment f
digitalWrite(15, bitRead(value, 6)); // segment g
}

byte dec27(byte decimal) {
if (decimal == 0)
return B00111111;
if (decimal == 1)
return B00000110;
if (decimal == 2)
return B01011011;
if (decimal == 3)
return B01001111;
if (decimal == 4)
return B01100110;
if (decimal == 5)
return B01101101;
if (decimal == 6)
return B01111101;
if (decimal == 7)
return B0000111;
if (decimal == 8)
return B01111111;
if (decimal == 9)
return B01101111;

return 0;
}

void gameOver()
{
displayNumber(0);
digitalWrite(buzzerPin, HIGH);
delay(3000);
digitalWrite(buzzerPin, LOW);
while (true)
{ ; }
}

Attiny Blaulicht mit Sirene für Feuerwehr & Polizei

Einfacher Sketch für ein Blaulicht mit Sirene.

Weiterlesen: Attiny Blaulicht mit Sirene für Feuerwehr & Polizei

Attiny 44 Ampel für zwei Ampelphasen

void setup()
{
pinMode( 0 , OUTPUT);
pinMode( 3 , OUTPUT);
pinMode( 1 , OUTPUT);
pinMode( 2 , OUTPUT);
pinMode( 4 , OUTPUT);
pinMode( 5 , OUTPUT);
digitalWrite( 0 , HIGH );

digitalWrite( 3 , HIGH );

delay( 4000 );

}

void loop()
{
digitalWrite( 1 , LOW );
digitalWrite( 0 , HIGH );
delay( 9500 );
digitalWrite( 1 , HIGH );
delay( 3100 );
digitalWrite( 0 , LOW );
digitalWrite( 1 , LOW );
digitalWrite( 2 , HIGH );
delay( 15000 );
digitalWrite( 2 , LOW );
digitalWrite( 1 , HIGH );
delay( 3300 );
digitalWrite( 1 , LOW );
digitalWrite( 0 , HIGH );
delay( 3100 );
digitalWrite( 4 , LOW );
digitalWrite( 3 , HIGH );
delay( 9500 );
digitalWrite( 4 , HIGH );
delay( 3100 );
digitalWrite( 3 , LOW );
digitalWrite( 4 , LOW );
digitalWrite( 5 , HIGH );
delay( 15000 );
digitalWrite( 5 , LOW );
digitalWrite( 4 , HIGH );
delay( 3300 );
digitalWrite( 3 , HIGH );
digitalWrite( 4 , LOW );
delay( 3100 );
}

Hinweise zur Batterieentsorgung

Im Zusammenhang mit dem Vertrieb von Batterien oder mit der Lieferung von Geräten, die Batterien enthalten, ist der Verkäufer verpflichtet, Sie auf Folgendes hinzuweisen:

Sie sind zur Rückgabe gebrauchter Batterien als Endnutzer gesetzlich verpflichtet. Sie können Batterien nach Gebrauch an den Verkäufer oder in den dafür vorgesehenen Rücknahmestellen (z.B. in Kommunalen Sammelstellen oder im Handel) unentgeltlich zurückgeben. Sie können die Batterien auch per Post an den Verkäufer zurücksenden. 

Die auf den Batterien abgebildeten Symbole haben folgende Bedeutung:

Hinweise zur Batterieentsorgung

Das Symbol der durchgekreuzten Mülltonne bedeutet, dass die Batterie nicht in den Hausmüll gegeben werden darf.

Pb = Batterie enthält mehr als 0,004 Masseprozent Blei
Cd = Batterie enthält mehr als 0,002 Masseprozent Cadmium
Hg = Batterie enthält mehr als 0,0005 Masseprozent Quecksilber."

 

 

Auszüge und Erklärung zu den Gesetzestexten:

1. Rücknahmepflicht
Gem. § 9 Abs.1 BattG ist jeder Vertreiber von Batterien verpflichtet, vom Endnutzer Altbatterien an oder in unmittelbarer Nähe der Verkaufsstelle unentgeltlich
zurückzunehmen.

  • Die Rücknahmepflicht ist allerdings auf Altbatterien der Art beschränkt, die der Vertreiber als Neubatterien im Sortiment führt oder geführt hat.
  • Der Kunde ist also nicht dahingehend beschränkt, ausschließlich die Batterien zurückzugeben, die er beim Vertreiber auch tatsächlich erworben hat - er darf aber auch keine „sortimentsfremden“ Altbatterien zurückgeben.

2. Hinweisplicht
Jeder Vertreiber, der gewerblich Batterien an Endnutzer abgibt, hat den Kunden gem. § 18 Abs.1 BattG durch gut sicht- und lesbare, im unmittelbaren Sichtbereich des Hauptkundenstroms platzierte Schrift- oder Bildtafeln darauf hinzuweisen: 

  • dass Batterien nach Gebrauch an der Verkaufsstelle unentgeltlich zurückgegeben werden können;
  • dass der Endnutzer zur Rückgabe von Altbatterien gesetzlich verpflichtet ist;
  • welche Bedeutung das Symbol der durchgestrichene Mülltonne gem. § 17 Abs.1 BattG hat;
  • welche Bedeutung die nachfolgenden chemischen Zeichen Hg, Cd, Pb nach § 17 Abs.3 BattG haben

 

 

 

Bestellen Sie hier ihre Schaltung oder ihren heißen Draht. Sie haben Fragen zu einem Spiel oder möchten ein individuelles Angebot, dann zögern Sie nicht und holen sich Ihr Angebot noch heute ein.

 

Heißer Draht Bestellung

Pflichtfeld *

---------------------------------------------


---------------------------------------------


---------------------------------------------


---------------------------------------------


---------------------------------------------


Adresse 


---------------------------------------------


Zu ihrer Sicherheit kommt der Kaufvertrag erst zustanden wenn sie eine Rechnung erhalten und überwiesen haben. 

  

 Sie erhalten eine Kopie dieser Nachricht an die angegeben E-Mail Adresse. 

 

 

Teetimer Arduinocode

arduino tee wecker anfaenger projekt

 

Arduino IDE Code


#include <Servo.h>

Servo servo_pin_11;
int zeit = 0 ;
int wiederhole = 0 ;
int fertig = 0 ;
int a;

void setup()
{
servo_pin_11.attach(11);
Serial.begin(9600);
pinMode( 10 , OUTPUT);
pinMode( 6 , OUTPUT);
servo_pin_11.write( 35 );

zeit = 0 ;

wiederhole = 5 ;

fertig = 40 ;

}

void loop()
{
Serial.print("programm start");
Serial.println();
servo_pin_11.attach(11);
digitalWrite( 10 , HIGH );
digitalWrite( 6 , LOW );
delay( 1000 );
servo_pin_11.write( 35 );
delay( 1000 );
servo_pin_11.detach();
Serial.print("poti auslesen");
Serial.println();
zeit = map ( analogRead(4) , 0 , 1023 , 0 , 30000 ) ;
for (a=1; a<= ( wiederhole ); ++a )
{
Serial.print("1 nach");
Serial.print(zeit);
Serial.println();
delay( zeit );
}
servo_pin_11.attach(11);
delay( 100 );
for (a=1; a<= ( 3 ); ++a )
{
Serial.print("ruetteln eins");
Serial.println();
servo_pin_11.write( 40 );
delay( 300 );
servo_pin_11.write( 30 );
delay( 300 );
}
servo_pin_11.detach();
for (a=1; a<= ( wiederhole ); ++a )
{
Serial.print("2 nach");
Serial.print(zeit);
Serial.println();
delay( zeit );
}
servo_pin_11.attach(11);
delay( 100 );
for (a=1; a<= ( 3 ); ++a )
{
Serial.print("rueteln zwei");
Serial.println();
servo_pin_11.write( 40 );
delay( 300 );
servo_pin_11.write( 30 );
delay( 300 );
}
servo_pin_11.detach();
for (a=1; a<= ( wiederhole ); ++a )
{
Serial.print("3 nach");
Serial.print(zeit);
Serial.println();
delay( zeit );
}
servo_pin_11.attach(11);
delay( 100 );
for (a=1; a<= ( 3 ); ++a )
{
Serial.print("rueteln drei");
Serial.println();
servo_pin_11.write( 40 );
delay( 300 );
servo_pin_11.write( 30 );
delay( 300 );
}
servo_pin_11.detach();
for (a=1; a<= ( wiederhole ); ++a )
{
Serial.print("4 nach");
Serial.print(zeit);
Serial.println();
delay( zeit );
}
servo_pin_11.attach(11);
delay( 100 );
Serial.print("Servo Endposition");
Serial.println();
for (a=1; a<= ( 44 ); ++a )
{
fertig = ( fertig + 1 ) ;
servo_pin_11.write( fertig );
delay( 30 );
}
servo_pin_11.write( 85 );
delay( 1000 );
Serial.print("summer start");
Serial.println();
servo_pin_11.detach();
digitalWrite( 6 , HIGH );
delay( 2000 );
digitalWrite( 6 , LOW );
delay( 3000 );
Serial.print("blink start");
Serial.println();
for (a=1; a<= ( 500 ); ++a )
{
Serial.print("blinken 500");
Serial.println();
digitalWrite( 10 , LOW );
delay( 2000 );
digitalWrite( 10 , HIGH );
delay( 300 );
}
}

attiny 45 Dimmerfunktion mit Sleepmodus über rest


 
#include <avr/sleep.h>
#include <avr/interrupt.h>
#define BODS 7                     //BOD Sleep bit in MCUCR
#define BODSE 2                  //BOD Sleep enable bit in MCUCR
uint8_t mcucr1, mcucr2;
int led0= 0;
int led1 = 1;
int lcount = 0;
int dimmer = 255  ;
void goToSleep(void) {
    // GIMSK |= _BV(INT0);                                      //enable INT0
    // MCUCR &= ~(_BV(ISC01) | _BV(ISC00));      //INT0 on low level
    ACSR |= _BV(ACD);                                           //disable the analog comparator
    ADCSRA &= ~_BV(ADEN);                                //disable ADC
    set_sleep_mode(SLEEP_MODE_PWR_DOWN);
    sleep_enable();
    //turn off the brown-out detector.
    //must have an ATtiny45 or ATtiny85 rev C or later for software to be able to disable the BOD.
    //current while sleeping will be <0.5uA if BOD is disabled, <25uA if not.
    cli();
    mcucr1 = MCUCR | _BV(BODS) | _BV(BODSE);  //turn off the brown-out detector
    mcucr2 = mcucr1 & ~_BV(BODSE);
    MCUCR = mcucr1;
    MCUCR = mcucr2;
    sei();                               //ensure interrupts enabled so we can wake up again
    sleep_cpu();                   //go to sleep
    cli();                                //wake up here, disable interrupts
    // GIMSK = 0x00;           //disable INT0
    sleep_disable();               
    sei();                              //enable interrupts again (but INT0 is disabled from above)
}
void setup() {
  pinMode(led0, OUTPUT);
  pinMode(led1, OUTPUT);
}
void loop() {
  lcount += 1;
  
  analogWrite(0 , dimmer);
  analogWrite(1 , dimmer);
  delay( 700 );
  dimmer = ( dimmer - 1 ) ;
  
  if (lcount > 250) { goToSleep(); }
}
 
 

dimmer schaltung 3 volt nachtlicht kinder
 
 
Der Sleepcode ist nicht von mir, sondern nur von mir angepasst. Das Orginal findet ihr hier:  https://gist.github.com/JChristensen/5616922
 

Arduino und Ardublock Programm heisser Draht

Programme für den heißen Draht mit Attiny 45.


 

Programm von der heißen Draht Seite, dass jeden Fehler für eine Sekunde optisch und akustisch darstellt.  

1 ardublock heisser draht game feuer anfaenger

void setup()
{
pinMode( 1 , INPUT);
pinMode( 0 , OUTPUT);
digitalWrite(1, HIGH);
pinMode( 4 , OUTPUT);
pinMode( 0 , OUTPUT);

}

void loop()
{
if (!( digitalRead(1) ))
{
analogWrite(0 , 100);
digitalWrite( 4 , HIGH );
delay( 900 );
digitalWrite( 0 , LOW );
digitalWrite( 4 , LOW );
}
delay( 2 );
}


Bei diesem Programm wird der analoge Eingang des Attiny verwendet. Damit lässt sich nicht nur ein HIGH oder LOW Signal auslesen, sondern ein variables Signal. Dies hat zur Folge, dass die Schwierigkeit verändert werden kann. So ist bereits ein zu nahe kommen des Drahtes oder ein richtiger Druck auf den Draht nötig um einen Fehler zu "machen". Möglich wäre auch die Zeit der Berührung wiederzugeben und erst ab einer bestimmten Zeit den Fehler anzeigen zu lassen. 

 

void setup() {
pinMode(1, OUTPUT);

}

void loop() {
if(analogRead(2) < 50)
{
for(int x = 0;x < 100; x++)
{
digitalWrite(1, HIGH);
delay(500);
digitalWrite(1, LOW);
delay(500);
}
}

}

 

 


Bei diesem Programm muss der Attiny über reset zurückgesetzt werden, da nach einem Fehler die DELAY Zeit extrem hoch ist. Bei diesem Spiel hat der Spieler also nach einem Fehler verloren. Über eine rote LED an Pin0 und eine grüne LED an PIN1 wird der Spielstand angezeigt. Nach dem reset leuchtet die grüne und nach einem Fehler die rote LED. Der Summer wird an PIN2 anschlossen (bei mehr als 40 ma bitte einen Transistor verwenden). Den Fehler bekommt der Attiny über ein HIGH Signal an PIN 4. Pin 4 bitte mit einem PULL DOWN-Widerstand versehen. 

one chance heisser draht programm c

void setup()
{
pinMode( 4 , INPUT);
pinMode( 0 , OUTPUT);
pinMode( 1 , OUTPUT);
pinMode( 2 , OUTPUT);
digitalWrite( 0 , HIGH );

digitalWrite( 1 , LOW );

}

void loop()
{
if (digitalRead(4))
{
digitalWrite( 0 , LOW );
digitalWrite( 1 , HIGH );
digitalWrite( 2 , HIGH );
delay( 900 );
digitalWrite( 2 , LOW );
delay( 9999999 );
}
delay( 1 );
}


 

Bei diesem Programm werden 3 LED nacheinander angeschaltet und bei jedem Fehler ertönt ein Summer. Somit ist das Spiel nicht nach einem Fehler aus, sondern nach drei Fehlern. Die Pin Belegung bitte aus dem Code entnehmen. 

 

int fehler = 0 ;
int zeit = 0 ;
int a;

void setup()
{
pinMode( 4 , INPUT);
pinMode( 0 , OUTPUT);
pinMode( 1 , OUTPUT);
pinMode( 2 , OUTPUT);
pinMode( 3 , OUTPUT);
fehler = 0 ;

zeit = 100 ;

for (a=1; a<= ( 2 ); ++a )
{
digitalWrite( 0 , LOW );
delay( zeit );
digitalWrite( 1 , LOW );
delay( zeit );
digitalWrite( 2 , LOW );
delay( zeit );
digitalWrite( 0 , HIGH );
delay( zeit );
digitalWrite( 1 , HIGH );
delay( zeit );
digitalWrite( 2 , HIGH );
delay( zeit );
}

digitalWrite( 0 , HIGH );

digitalWrite( 1 , HIGH );

digitalWrite( 2 , HIGH );

}

void loop()
{
if (digitalRead(4))
{
fehler = ( fehler + 1 ) ;
delay( 2 );
if (( ( fehler ) == ( 1 ) ))
{
digitalWrite( 0 , LOW );
digitalWrite( 3 , HIGH );
delay( 700 );
digitalWrite( 3 , LOW );
}
if (( ( fehler ) == ( 2 ) ))
{
digitalWrite( 1 , LOW );
digitalWrite( 3 , HIGH );
delay( 700 );
digitalWrite( 3 , LOW );
}
if (( ( fehler ) == ( 3 ) ))
{
digitalWrite( 2 , LOW );
digitalWrite( 3 , HIGH );
delay( 1100 );
digitalWrite( 3 , LOW );
for (a=1; a<= ( 3 ); ++a )
{
digitalWrite( 0 , LOW );
delay( zeit );
digitalWrite( 1 , LOW );
delay( zeit );
digitalWrite( 2 , LOW );
delay( zeit );
digitalWrite( 0 , HIGH );
delay( zeit );
digitalWrite( 1 , HIGH );
delay( zeit );
digitalWrite( 2 , HIGH );
delay( zeit );
}
digitalWrite( 0 , HIGH );
digitalWrite( 1 , HIGH );
digitalWrite( 2 , HIGH );
fehler = 0 ;
delay( 20 );
}
}
}

 


Bei diesem Programm werden 99 Sekunden auf einem Sieben-Segment Display herunter gezählt. Wird ein Fehler begangen, ist das Spiel sofort vorbei. Die Pin-Belegung bitte aus dem Code entnehmen.

 

const byte startStopPin = 0, mistakePin = 1, buzzerPin = 16;

long startMillis;

void setup()
{
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);
pinMode(13, OUTPUT);
pinMode(14, OUTPUT);
pinMode(15, OUTPUT);

pinMode(startStopPin, INPUT);
pinMode(mistakePin, INPUT);
pinMode(buzzerPin, OUTPUT);

displayNumber(0);
while(digitalRead(startStopPin) == LOW) // wait for the start signal
{ ; }

startMillis = millis();
}

void loop()
{
long number = 99 - (millis() - startMillis) / 1000;

if (number <= 0)
{
gameOver();
}

if (digitalRead(startStopPin) == HIGH && (millis() - startMillis) > 2000)
{
while(true)
{ ; }
}

if (digitalRead(mistakePin) == HIGH && (millis() - startMillis) > 2000)
{
gameOver();
}


displayNumber(number);
}

void displayNumber(byte x)
{
x %= 100;
set1(~dec27(x % 10));
set10(~dec27(x / 10));
}

void set1(byte value)
{
digitalWrite(2, bitRead(value, 0)); // segment a
digitalWrite(3, bitRead(value, 1)); // segment b
digitalWrite(4, bitRead(value, 2)); // segment c
digitalWrite(5, bitRead(value, 3)); // segment d
digitalWrite(6, bitRead(value, 4)); // segment e
digitalWrite(7, bitRead(value, 5)); // segment f
digitalWrite(8, bitRead(value, 6)); // segment g
}

void set10(byte value)
{
digitalWrite(9, bitRead(value, 0)); // segment a
digitalWrite(10, bitRead(value, 1)); // segment b
digitalWrite(11, bitRead(value, 2)); // segment c
digitalWrite(12, bitRead(value, 3)); // segment d
digitalWrite(13, bitRead(value, 4)); // segment e
digitalWrite(14, bitRead(value, 5)); // segment f
digitalWrite(15, bitRead(value, 6)); // segment g
}

byte dec27(byte decimal) {
if (decimal == 0)
return B00111111;
if (decimal == 1)
return B00000110;
if (decimal == 2)
return B01011011;
if (decimal == 3)
return B01001111;
if (decimal == 4)
return B01100110;
if (decimal == 5)
return B01101101;
if (decimal == 6)
return B01111101;
if (decimal == 7)
return B0000111;
if (decimal == 8)
return B01111111;
if (decimal == 9)
return B01101111;

return 0;
}

void gameOver()
{
displayNumber(0);
digitalWrite(buzzerPin, HIGH);
delay(3000);
digitalWrite(buzzerPin, LOW);
while (true)
{ ; }
}

 

 

heisser Draht mit c++ programmieren

Hier das einfache Script in c++ geschrieben. Wird ein Fehler an PIN 0 gemeldet, schaltet der Attiny 13, 23 oder 45 den Pin 1 auf high, wartet 700ms und schaltet ihn dann wieder auf low. Die MHz clock Frequenz bitte für euren Attiny nicht vergessen einzutragen. 
 
 
#include <avr/io.h>
#include <util/delay.h>
 
 
 
int main (void) {
 
 
  PORTB |= (1<<PB0);                              //  PB1 auf 0 -> als Eingang
 
  DDRB |=  (1<<PB1);                              //  PB1 auf 1 -> als Ausgang, LED über 220 Ohm anschließen, Summer über einen Transitor anschließen. 
 
  while(1) {
    if (PINB & (1<<PB0)) {                        //Bedingung für Fehler 
      PORTB |= (1<<PB1);                        //Ausgang PB1 auf 1 setzen
      _delay_ms(700); 
  }
 
    else {
      PORTB &= ~(1<<PB1);                      //Aus, wenn Bedingung nicht erfüllt. 
    }
  }
 
}
 
 
 
 
 

Raspberry-pi-Projekt, heißer Draht

developed by Timo Denk (Jan. 2015)

#!/usr/bin/env python
#coding=utf-8

import pygame, sys, time, os, RPi.GPIO as GPIO
from pygame.locals import *


#GPIO
startPin = 32
errorPin = 31
enableErrorTimeAddingPin = 15
shutdownPin = 3
buzzerPin = 12

GPIO.setmode(GPIO.BOARD)
GPIO.setup(startPin, GPIO.IN)
GPIO.setup(errorPin, GPIO.IN)
GPIO.setup(enableErrorTimeAddingPin, GPIO.IN)
GPIO.setup(shutdownPin, GPIO.IN)
GPIO.setup(buzzerPin, GPIO.OUT)

#other constants
timePerError = 5
screenSizeX = 640
screenSizeY = 400
startstop_delay = 3000
error_delay = 1000
game_over_screen_duration = 15
text_margin_top = 0
text_margin_left = 10
line_height = 150
buzzer_high = 2000

last_error_detection = 0
last_error_increment = 0

pygame.init()


#colors
redColor = pygame.Color(255, 255, 255)
blackColor = pygame.Color(0, 0, 0)
whiteColor = pygame.Color(255, 255, 255)
grayColor = pygame.Color(128, 128, 128)
mainFontColor = redColor

#fonts
font = pygame.font.Font('freesansbold.ttf', 100)

def toggle_fullscreen():
screen = pygame.display.get_surface()
tmp = screen.convert()
caption = pygame.display.get_caption()
cursor = pygame.mouse.get_cursor() # Duoas 16-04-2007

w,h = screen.get_width(),screen.get_height()
flags = screen.get_flags()
bits = screen.get_bitsize()

pygame.display.quit()
pygame.display.init()

screen = pygame.display.set_mode((w,h),flags^FULLSCREEN,bits)
screen.blit(tmp,(0,0))
pygame.display.set_caption(*caption)

pygame.key.set_mods(0) #HACK: work-a-round for a SDL bug??

pygame.mouse.set_cursor( *cursor ) # Duoas 16-04-2007

return screen

def clearScreen():
screen.fill(blackColor)
return

def handle_events():
time.sleep(0.04)
if GPIO.input(shutdownPin) == True:
shutdown_raspberry()
for event in pygame.event.get():
if event.type == KEYDOWN and event.key == K_ESCAPE:
shutdown_raspberry()
else:
if event.type == pygame.QUIT or event.type == KEYDOWN:
exit_application()

#buzzer
GPIO.output(buzzerPin, not(last_error_increment < get_millis() - buzzer_high))
#print str(not(last_error_increment < get_millis() - buzzer_high))
return

def exit_application():
pygame.quit()
sys.exit()
return

def shutdown_raspberry():
os.system("sudo shutdown -h now")
return

def getUnixTime():
return int(time.time())

def get_millis():
return int(round(time.time() * 1000))


pygame.mouse.set_visible(False) # hide mouse

screen = pygame.display.set_mode((screenSizeX, screenSizeY), pygame.FULLSCREEN)
#pygame.display.set_caption('Heisser Draht') # not required for fullscreen application

#screen = toggle_fullscreen()


while True: # main loop
#global label storage
time_surface = 0
errors_surface = 0
time_rectangle = 0
errors_rectangle = 0
last_error_detection = 0
last_error_increment = 0


header_surface = font.render('Let\'s play!', True, mainFontColor)
header_rectangle = header_surface.get_rect()
header_rectangle.midleft = (text_margin_left, (int)(screenSizeY / 2))

screen.blit(header_surface, header_rectangle)
pygame.display.flip()

while GPIO.input(startPin) == False: #wait for the user to press start button
handle_events()

start_time = getUnixTime()

errors = 0
errorAdded = False

justStarted = True


header_surface = font.render('', True, mainFontColor)

game_started = get_millis()

while True: # game running
handle_events()


if GPIO.input(errorPin) == True:
if errorAdded == False and last_error_increment < get_millis() - error_delay:
errors += 1
last_error_increment = get_millis()
else:
last_error_detection = get_millis()
errorAdded = True
else:
errorAdded = False
int_time = getUnixTime() - start_time
if GPIO.input(enableErrorTimeAddingPin) == True:
int_time = getUnixTime() - start_time + errors * timePerError
time_surface = font.render('Time: ' + str(int_time) + 's', True, mainFontColor)
time_rectangle = time_surface.get_rect()
time_rectangle.topleft = (text_margin_left, text_margin_top + line_height * 0.5)

errors_surface = font.render('Mistakes: ' + str(errors), True, mainFontColor)
errors_rectangle = errors_surface.get_rect()
errors_rectangle.topleft = (text_margin_left, text_margin_top + line_height * 1.5)


clearScreen()
screen.blit(errors_surface, errors_rectangle) #errors
screen.blit(time_surface, time_rectangle) #time

header_rectangle.midleft = (text_margin_left, text_margin_top)
screen.blit(header_surface, header_rectangle) #header

pygame.display.flip()

if GPIO.input(startPin) == False:
justStarted = False
if GPIO.input(startPin) == True and justStarted == False and game_started < get_millis() - startstop_delay:
break

clearScreen()


header_surface = font.render('Let\'s play!', True, mainFontColor)
#reposition for game over screen
header_rectangle.topleft = (text_margin_left, text_margin_top)
time_rectangle.topleft = (text_margin_left, text_margin_top + line_height * 1)
errors_rectangle.topleft = (text_margin_left, text_margin_top + line_height * 2)

screen.blit(errors_surface, errors_rectangle) #errors
screen.blit(time_surface, time_rectangle) #time
screen.blit(header_surface, header_rectangle) #header

pygame.display.flip()

gos_shown = get_millis()

while gos_shown > get_millis() - 15000:
handle_events()
if GPIO.input(startPin) == True and gos_shown < get_millis() - 1000:
gos_shown = 0

#while GPIO.input(startPin) == False:
# handle_events()

#while GPIO.input(startPin) == True:
# handle_events()

#while GPIO.input(startPin) == False:
# handle_events()*/

clearScreen()
time.sleep(1)

CODE (alt)

#!/usr/bin/env python
#coding=utf-8

import pygame, sys, time, os, RPi.GPIO as GPIO
from pygame.locals import *


#GPIO
startPin = 32
errorPin = 31
enableErrorTimeAddingPin = 15
shutdownPin = 3

GPIO.setmode(GPIO.BOARD)
GPIO.setup(startPin, GPIO.IN)
GPIO.setup(errorPin, GPIO.IN)
GPIO.setup(enableErrorTimeAddingPin, GPIO.IN)
GPIO.setup(shutdownPin, GPIO.IN)

#other constants
timePerError = 5
screenSizeX = 900
screenSizeY = 900


pygame.init()


#colors
redColor = pygame.Color(255, 0, 0)
blackColor = pygame.Color(0, 0, 0)
whiteColor = pygame.Color(255, 255, 255)
grayColor = pygame.Color(128, 128, 128)
mainFontColor = redColor

#fonts
font = pygame.font.Font('freesansbold.ttf', 90)

def toggle_fullscreen():
screen = pygame.display.get_surface()
tmp = screen.convert()
caption = pygame.display.get_caption()
cursor = pygame.mouse.get_cursor() # Duoas 16-04-2007

w,h = screen.get_width(),screen.get_height()
flags = screen.get_flags()
bits = screen.get_bitsize()

pygame.display.quit()
pygame.display.init()

screen = pygame.display.set_mode((w,h),flags^FULLSCREEN,bits)
screen.blit(tmp,(0,0))
pygame.display.set_caption(*caption)

pygame.key.set_mods(0) #HACK: work-a-round for a SDL bug??

pygame.mouse.set_cursor( *cursor ) # Duoas 16-04-2007

return screen

def clearScreen():
screen.fill(blackColor)
return

def handle_events():
if GPIO.input(shutdownPin) == True:
shutdown_raspberry()
for event in pygame.event.get():
if event.type == KEYDOWN and event.key == K_ESCAPE:
shutdown_raspberry()
else:
if event.type == pygame.QUIT or event.type == KEYDOWN:
exit_application()
return

def exit_application():
pygame.quit()
sys.exit()
return

def shutdown_raspberry():
os.system("sudo shutdown -h now")
return


pygame.mouse.set_visible(False) # hide mouse

screen = pygame.display.set_mode((screenSizeX, screenSizeY), pygame.FULLSCREEN)
#pygame.display.set_caption('Heisser Draht') # not required for fullscreen application

#screen = toggle_fullscreen()

while True: # main loop
#global label storage
time_surface = 0
errors_surface = 0
time_rectangle = 0
errors_rectangle = 0


header_surface = font.render('Dr' + u'ü' + 'cken Sie Start!', True, mainFontColor)
header_rectangle = header_surface.get_rect()
header_rectangle.topleft = (0, 100)

screen.blit(header_surface, header_rectangle)
pygame.display.flip()

while GPIO.input(startPin) == False: #wait for the user to press start button
handle_events()

start_time = int(time.time())

errors = 0
errorAdded = False

justStarted = True


header_surface = font.render('Spiel l' + u'ä' + 'uft!', True, mainFontColor)


while True: # game running
handle_events()


if GPIO.input(errorPin) == True:
if errorAdded == False:
errors += 1
errorAdded = True
else:
errorAdded = False
int_time = int(time.time()) - start_time
if GPIO.input(enableErrorTimeAddingPin) == True:
int_time = int(time.time()) - start_time + errors * timePerError
time_surface = font.render('Zeit: ' + str(int_time) + 's', True, mainFontColor)
time_rectangle = time_surface.get_rect()
time_rectangle.topleft = (0, 300)

errors_surface = font.render('Fehler: ' + str(errors), True, mainFontColor)
errors_rectangle = errors_surface.get_rect()
errors_rectangle.topleft = (0, 400)


clearScreen()
screen.blit(errors_surface, errors_rectangle) #errors
screen.blit(time_surface, time_rectangle) #time
screen.blit(header_surface, header_rectangle) #header

pygame.display.flip()

if GPIO.input(startPin) == False:
justStarted = False
if GPIO.input(startPin) == True and justStarted == False:
break

clearScreen()
header_surface = font.render('Game over!', True, mainFontColor)

screen.blit(errors_surface, errors_rectangle) #errors
screen.blit(time_surface, time_rectangle) #time
screen.blit(header_surface, header_rectangle) #header

pygame.display.flip()

while GPIO.input(startPin) == False:
handle_events()

while GPIO.input(startPin) == True:
handle_events()

while GPIO.input(startPin) == False:
handle_events()

clearScreen()
time.sleep(1)

Unterstützung für die Seite

Durch Werbung decke ich die laufenden Kosten dieser Seite ab, wie die Joomla Pflege und den Webspace. Für Werkzeug und Material reicht die Werbung aber nicht. Wenn dir die Seite gefällt und du öfters hier bist, würde ich mich über eine kleine Unterstützung und Anerkennung natürlich sehr freuen.

Weiterlesen: Unterstützung für die Seite

AGB

Allgemeine Geschäftsbedingungen

Angaben gemäß § 5 TMG:
Inhaber: Ronnie Berzins
Rechtsform: Kleingewerbe

www.kreativekiste.de

www.heisser-draht-manufaktur.de

"Kreative Kiste": Handel, Vermarktung und Bereitstellung von Kreativprodukten
Anschrift siehe unten. 

Weiterlesen: AGB

Hallo, schön dich hier zu sehen

Ich heiße Ronnie Berzins und auf meiner Seite gibt es die vielen kreativen Ideen, die sich seit 15 Jahren in meinem Berufsleben und meiner Arbeit mit Kindern, Jugendlichen und Erwachsenen angesammelt haben.

Neben vielen detaillierten Bastelanleitungen findest du auch Experimente, Andachten und Anleitungen, die ich einmal geschrieben habe, kannst dir Spielgeräte für deine Spielstraße nachbauen und vieles, vieles mehr.

Und nun viel Spaß beim Stöbern und Kreativ sein :-).

 

Impressum

Angaben gemäß § 5 TMG:

Inhaber: Ronnie Berzins
Rechtsform: Kleingewerbe
"Kreative Kiste" Handel, Vermarktung und Bereitstellung von Kreativprodukten

Weiterlesen: Impressum

über mich

Seit 16 Jahren schreibe ich nun Bastelanleitungen und veröffentliche sie schon 10 Jahre im Netz. Nach einer Ausbildung zum Kälteanlagenbauer und einem "Bachelor of Theologie", arbeite ich heute wieder als Kälteanlagenbauer, in diesem spannenden und vielseitigem Beruf. In diesem wird neben der Kältetechnik, Elektrotechnik und SPS Steuerungen genauso der Lüftungsbau, die Klimatechnik und diverse Flaschnerarbeiten gefordert. 

Neben dem Basteln gehört das Fahrradfahren und die Mitarbeit in der Kinderkirche zu meinen ganz großen Leidenschaften. Ich versuche mein Leben nach der einfachen Regel "ora et labora" zu gestallten. Mein Lebensmotto kommt von Albert Einstein: "Phantasie ist wichtiger als Wissen, denn Wissen ist begrenzt".

ronnie-berzins-logo

 Wenn du diese Seite unterstützen möchtest, kannst du das hier gern tun.

Suchen