void setup()
{
pinMode( 4 , INPUT);
pinMode( 5 , INPUT);
pinMode( 6 , INPUT);
pinMode( 4 , OUTPUT);
pinMode( 5 , OUTPUT);
pinMode( 6 , OUTPUT);
pinMode( 8 , OUTPUT);
pinMode( 9 , OUTPUT);
pinMode( 10 , OUTPUT);
pinMode( 11 , OUTPUT);
digitalWrite( 4 , LOW );
digitalWrite( 5 , LOW );
digitalWrite( 6 , LOW );
digitalWrite( 8 , HIGH );
digitalWrite( 9 , HIGH );
digitalWrite( 10 , HIGH );
digitalWrite( 11 , HIGH );
}
void loop()
{
if ( digitalRead( 4))
{
digitalWrite( 8 , LOW );
}
if ( digitalRead( 5))
{
digitalWrite( 8 , HIGH );
digitalWrite( 9 , LOW );
delay( 40000 );
digitalWrite( 9 , HIGH );
digitalWrite( 10 , LOW );
delay( 700000 );
digitalWrite( 8 , LOW );
delay( 5000 );
}
if ( digitalRead( 6))
{
digitalWrite( 8 , HIGH );
delay( 5000 );
digitalWrite( 11 , LOW );
delay( 30000 );
digitalWrite( 11 , HIGH );
digitalWrite( 8 , LOW );
delay( 10000 );
}
}
Fix Ice Making Machine
My ice maker blew its controller board and I needed to make a plan to replace it. So I used an Arduino to control it!
Comments