Thicker end at bottom. Curve facing forwards
Making Rodni’s heart beat
Upload
-ve
8;
(3000); 8
How would you make the heart “beat”?
8 COPY
PASTE
Other uses of this? In projects? In industry/transport etc?
Making Rodni’s head move
80
40 Delete
Try changing these numbers to between 0 and 80
Change to 60 9
Change to 1500 Now save this programme as Rodniservo 9
Making Rodni see
Change to (sensorValue); Delete this line Let’s simplify this a little We can now read a number between 0 and 1023
Change to 80);
map
Load ReadAnalogVoltage again Note the read-outs on the serial monitor when Rodni’s nose is shaded and in light.
80 Change to high and low numbers that you measured
Change these numbers
Training Rodni
Open the programme that you saved, RodniServo
Open Knob again
Type if (val>400) then add curly brackets as shown. Repeat as below. We are telling the Arduino that if the variable val is greater than 400 it should do what is between the following curly brackets. The next if statement tell the Arduino what to do if the variable is less or equal to 400.
What do these mean? Experiment!