Stap 4: Upload de Code
\\
VOID Setup
{
pinMode (2, OUTPUT);
pinMode (3, OUTPUT);
pinMode (4, OUTPUT);
pinMode (5, OUTPUT);
pinMode (6, OUTPUT);
pinMode (7, OUTPUT);
int een willekeurige = (1, 6);
if(a == 1)
{
digitalWrite (1, hoog);
}
if(a == 2)
{
digitalWrite (1, hoog);
digitalWrite (2, HIGH);
}
if(a == 3)
{
digitalWrite (1, hoog);
digitalWrite (2, HIGH);
digitalWrite (3, hoge);
}
if(a == 4)
{
digitalWrite (1, hoog);
digitalWrite (2, HIGH);
digitalWrite (3, hoge);
digitalWrite (4, HIGH);
}
if(a == 5)
{
digitalWrite (1, hoog);
digitalWrite (2, HIGH);
digitalWrite (3, hoge);
digitalWrite (4, HIGH);
digitalWrite (5, hoge);
}
if(a == 6)
{
digitalWrite (1, hoog);
digitalWrite (2, HIGH);
digitalWrite (3, hoge);
digitalWrite (4, HIGH);
digitalWrite (5, hoge);
digitalWrite (6, hoge);
}
}
void loop
{
}
\\