This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Blink | |
// | |
// The basic Arduino example. Turns an LED on for one second, | |
// then off for one second, and so on forever ... or until you | |
// turn the Duinobot off. | |
// | |
// We use pin 13 as depending on the Arduino board | |
// (the Duinobot in our case), it has either: | |
// - a built-in LED or, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void delay(amount of time in milliseconds) | |
{ | |
"Dear Arduino. Stop what you're doing for (amount of time in milliseconds). Thanks!" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Blink | |
// | |
// The basic Arduino example. Turns an LED on for one second, | |
// then off for one second, and so on forever ... or until you | |
// turn the Duinobot off. | |
// | |
// We use pin 13 as depending on the Arduino board | |
// (the Duinobot in our case), it has either: | |
// - a built-in LED or, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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. | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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 | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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 | |
// |
OlderNewer