User manual

Components: 1xbreadboard, 1xred LED, 1x220-ohm resistor (red-red-brown), 2x20-Mohm resistor (red-black-blue), 5xconnection cable,
3xclay contact
The experiment of the eighth day is a quick game on the PC monitor that uses the Arduino as a small game pad with two clay contacts. In the
game, a grab runs round a circular track and should deviate from its course as little as possible in the process.
The programme
When touched, the two clay contacts turn the crab left or right by 5 degrees. It automatically runs forward and only needs to be kept on the
correct course by the turns.
At the beginning, the crab is placed at the Start position and the movement direction is set to 0° upward. In an infinite loop, the crab always
goes two steps in the current movement direction. Afterwards, three conditions are queried.
If the red or green shovel of the crab touches the white surface outside the track, the error counter is increased by 1 and the LED lights up briefly.
If the player touches the clay contact at analogue Pin 5, the crab is turned by 5° counter-clockwise; if the contact at analogue Pin 3 is touched,
the crab is turned by 5° clockwise.
Day 9
Today on the Advent calendar
20-Mohm resistor (red-black-blue)
Connection cable
Controlling the RGB LED with clay contacts
Components: 1xbreadboard, 1xRGB LED, 3x220-Ohm resistor (red-red-brown), 3x20-Mohm resistor (red-black-blue), 8xconnection cable,
1xwire bridge, 4xclay contact
Three clay contacts control the three colour components of an RGB LED. If the corresponding sensor is touched, the colour is switched on. In this
way, seven different colours are possible, the three primary colours, three secondary colours and white as a mixture of all three colours.
The programme
An infinite look constantly queries the three clay contacts in sequence. If a contact is touched, the corresponding colour component of the RGB
LED is switched on, or else it is switched off if it was previously switched on. The sequential query of the clay contacts used here has the
advantage over the parallel query that it cannot cause any timeout problems if two colour components are switched on at the same time.
The programme 09rgb02 controls the three colour components
of one RGB LED via clay contacts.
Day 10
Today on the Advent calendar
Green LED
2x 220-ohm resistor (red-red-brown)
Pedestrian light
Components: 1xbreadboard, 2xred LED, 1x yellow LED, 2x green LED, 5x220-ohm resistor (red-red-brown), 1x20-Mohm resistor (red-black-
blue), 8xconnection cable, 2xclay contact
When you touch the clay contact, the typical traffic light cycle of a pedestrian light starts. In the resting state, the pedestrian light is red, the traffic
light green.