Now we want to light up the white LEDs on BOB3’s tummy.
This is done by using the new method:
bob3.setWhiteLeds(led3, led4);
The tummy LEDs are extra bright white LEDs and can be turned on or off.
Our new method
setWhiteLeds(led3, led4)
has two parameters:led3
and led4
You have to replace the words 'led3' and 'led4' with the uppercase words 'ON' respectively 'OFF':
In the place of led3
, we have to write whether LED 3 is ON
or OFF
.
In the place of led4
, we have to write whether LED 4 is ON
or OFF
.
Change the source code in line 10 so that both of the tummy LEDs are on.
Test out your program on your BOB3!
Now change your program to make the white tummy LEDs flash alternately.
Compile your new program and test it on your BOB3.