Skip to content

Instantly share code, notes, and snippets.

//
// SoundAndMusic
//
// Play music and blink the LED in synchronization
//
// We are using port S0 on the Duinobot board
//
// NOTES:
// - Ports S0-S5 are analog input pins
// - S0 is identical to Arduino A0 and so on (S5=A5)
clean_cat wash_the_cat(dirty_cat) // a procedure for washing the cat
{
turn on the shower;
find the cat;
grab the cat;
put cat under shower;
wait 3 minutes; // wait for cat to get clean.
release cat;
}
void delay(amount of time in milliseconds)
{
"Dear Arduino. Stop what you're doing for (amount of time in milliseconds). Thanks!"
}
//
// Morse_Hello
//
// Use the LED to send out 'HELLO' in morse code.
//
// We use pin 13 as depending on the Arduino board
// (the Duinobot in our case), it has either:
// - a built-in LED or,
// - a built-in resistor so that you only need to add an LED.
//
//
// BatteryStatusSerial
//
// A simple test script that prints the battery pack voltage to the
// serial monitor on your computer.
//
// NOTES:
// 1 - this is the table of actual voltage and sensor readings
//
// Battery Voltage | sensorValue
//
// BatteryStatusSerial_Delay
//
// A simple test script that prints the battery pack voltage to the
// serial monitor on your computer with output delay.
//
// NOTES:
// 1 - this is the table of
//
// Battery Voltage | sensorValue
//
// BatteryStatus
//
// A simple script that displays green when the battery
// voltage is ok and red when it is getting low.
//
// NOTES:
// 1 - this is the table of actual battery pack
// voltages and analog sensor readings
//
//
// LightItUp
//
// A simple LED example using the Multiplo LED sensor.
// Turns an LED on for one second,
// then off for one second, and so on forever ... or until you
// turn the Duinobot off.
//
// We are using port S0 on the Duinobot board
//