Next, download code_day1.zip. For now, save the code_day1 folder on your desktop. Note, however, that the files on your Desktop do not move from computer to computer and could get erased, so once you start writing your own programs be sure to save them in your middfiles account.
To download one of the programs in the code_day1 folder to your Handy board, go to your Logo window, click on the button labeled "...", select the code_day1 folder and within it one of the programs. Then click on "download". The Handy board will beep if it worked correctly.
Once you've got the hang of downloading new programs to your Handy board the final thing will be to see if you can get your Sciborg to follow a black line. To do this, we're going to use the light sensors. Plug them into ports 0 and 1 of the Handy board and select the analog display mode by turning the user knob past option (7). See how the values change as you move the light sensors around.
Once you have a good understanding of what the sensor should read, download the program sensortest.txt from the "code_day1" folder onto the Handy Board, and experiment some more. Try to find a good distance and a good value for the threshold "black" so that the sensors can detect a black line reliably.
Next, attach the light sensors to the front of your Sciborg (you may have to rebuild it first...). Download the program sciborg.txt. There are a couple of programs you can run on here. Look at the different ones by scrolling through the menu. The important program is the first one called "follow-line".
The follow-line program is very simple, but it's effective. If the left sensor is over black (more specifically thinks it's over black based on the black threshold) then it turns the sciborg left. If the right sensor is over black then it turns the sciborg right. This behavior causes the sciborg to inch its way forward back moving back and forth between the two sensors. When it gets to the end, it does a nice 180 (without actually any additional coding... thing about why).
In order to get your Sciborg to correctly follow a line, you'll have to experiment with the blackness threshold and with the height of the light sensors. Change the blackness threshold using the black+10 and black-10 menu options. Experiment to find a suitable value. Work with your Sciborg and the placement of the light sensors until the Sciborg can follow a line.