<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.ocrobot.com/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://wiki.ocrobot.com/feed.php">
        <title> en:learing:examples</title>
        <description></description>
        <link>https://wiki.ocrobot.com/</link>
        <image rdf:resource="https://wiki.ocrobot.com/lib/tpl/20cones/images/favicon.ico" />
       <dc:date>2026-06-03T23:03:47+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analoginoutserial&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analoginput&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analogreadserial&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analogwritemega&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:array&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:asciitable&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:bareminimum&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:blink&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:blinkwithoutdelay&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:button&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:buttonstatechange&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:calibration&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:character_analysis&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:debounce&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:digitalreadserial&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:dimmer&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:fade&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:fading&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:forloop&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:graph&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:ifstatement&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:inputpullupserial&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:main&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:midi&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:physicalpixel&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:pitch_follower&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:readanalogvoltage&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:readasciistring&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:serialcallresponse&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:serialcallresponseascii&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:serialevent&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:simple_keyboard&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:smoothing&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_append_operator&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_case_changes&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_characters&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_comparison_operators&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_constructors&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_index_of&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_length_string_length_trim&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_replace&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_start_with_ends_with&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_substring&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_to_int&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:switchcase&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:switchcase2&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:tone&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:tone4&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:virtualcolormixer&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:whileloop&amp;rev=1760151335&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://wiki.ocrobot.com/lib/tpl/20cones/images/favicon.ico">
        <title></title>
        <link>https://wiki.ocrobot.com/</link>
        <url>https://wiki.ocrobot.com/lib/tpl/20cones/images/favicon.ico</url>
    </image>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analoginoutserial&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:analoginoutserial</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analoginoutserial&amp;rev=1760151335&amp;do=diff</link>
        <description>Analog In, Out Serial

This example shows how to read an analog input pin, map the result to a range from 0 to 255, and then use that result to set the pulsewidth modulation (PWM) of an output pin to dim or brighten an LED.

Hardware Required

Arduino Board
Potentiometer
LED
220 ohm resistor</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analoginput&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:analoginput</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analoginput&amp;rev=1760151335&amp;do=diff</link>
        <description>Analog Input

A potentiometer is a simple knob that provides a variable resistance, which you can read into the Arduino board as an analog value. In this example, you'll connect a poterntiometer to one of the Arduino's analog inputs to control the rate at which the built-in LED on pin 13 blinks.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analogreadserial&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:analogreadserial</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analogreadserial&amp;rev=1760151335&amp;do=diff</link>
        <description>Analog Read Serial

----------

This example shows you how to read analog input from the physical world using a potentiometer. A potentiometer is a simple mechanical device that provides a varying amount of resistance when its shaft is turned. By passing voltage through a potentiometer and into an analog input on your Arduino, it is possible to measure the amount of resistance produced by a potentiometer (or pot for short) as an analog value. In this example you will monitor the state of your po…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analogwritemega&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:analogwritemega</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:analogwritemega&amp;rev=1760151335&amp;do=diff</link>
        <description>Analog Write with 12 LEDs on an Arduino Mega

This example fades 12 LEDs up and the down, one by one, on an Arduino Mega board.

Hardware Required

Arduino Mega Board
(12) LEDs
(12) 220 ohm resistors
hook up wire
breadboard
Circuit

image developed using Fritzing. For more circuit examples, see the Fritzing project page</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:array&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:array</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:array&amp;rev=1760151335&amp;do=diff</link>
        <description>Arrays

This variation on the For Loop Iteration example shows how to use an array. An array is a variable with multiple parts. If you think of a variable as a cup that holds values, you might think of an array as an ice cube tray. It's like a series of linked cups, all of which can hold the same maximum value.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:asciitable&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:asciitable</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:asciitable&amp;rev=1760151335&amp;do=diff</link>
        <description>ASCII Table

Demonstrates the advanced serial printing functions by generating a table of characters and their ASCII values in decimal, hexadecimal, octal, and binary. For more on ASCII, see asciitable.com

Hardware Required

Arduino Board
Circuit

image developed using Fritzing. For more circuit examples, see the Fritzing project page</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:bareminimum&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:bareminimum</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:bareminimum&amp;rev=1760151335&amp;do=diff</link>
        <description>Bare Minimum code needed to get started

----------

This example contains the bare minimum of code you need for an Arduino sketch to compile: the setup() method and the loop() method.

Hardware Required

Arduino Board
Circuit

Only your Arduino Board is needed for this example.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:blink&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:blink</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:blink&amp;rev=1760151335&amp;do=diff</link>
        <description>Blink

----------

This example shows the simplest thing you can do with an Arduino to see physical output: it blinks an LED.

Hardware Required

Arduino Board
LED
Resistor, anything between 220 ohm to 1K ohm
Circuit

To build the circuit, connect one end of the resistor to Arduino pin 13. Connect the long leg of the LED (the positive leg, called the anode) to the other end of the resistor. Connect the short leg of the LED (the negative leg, called the cathode) to the Arduino GND, as shown in th…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:blinkwithoutdelay&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:blinkwithoutdelay</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:blinkwithoutdelay&amp;rev=1760151335&amp;do=diff</link>
        <description>Blink Without Delay

----------

Sometimes you need to do two things at once. For example you might want to blink an LED while reading a button press. In this case, you don't want to use delay(), because Arduino pauses your program during the delay(). If the button is pressed while Arduino is paused waiting for the delay() to pass, your program will miss the button press.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:button&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:button</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:button&amp;rev=1760151335&amp;do=diff</link>
        <description>Button

----------

Pushbuttons or switches connect two points in a circuit when you press them. This example turns on the built-in LED on pin 13 when you press the button.

Hardware-

Arduino Board
momentary button or switch
10K ohm resistor
breadboard
hook-up wire
Circuit</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:buttonstatechange&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:buttonstatechange</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:buttonstatechange&amp;rev=1760151335&amp;do=diff</link>
        <description>Button State Change Detection (Edge Detection)

Once you've got a pushbutton working, you often want to do some action based on how many times the button is pushed. To do this, you need to know when the button changes state from off to on, and count how many times this change of state happens. This is called state change detection or edge detection.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:calibration&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:calibration</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:calibration&amp;rev=1760151335&amp;do=diff</link>
        <description>Calibration

This example demonstrates one techinque for calibrating sensor input. The Arduino takes sensor readings for five seconds during the startup, and tracks the highest and lowest values it gets. These sensor readings during the first five seconds of the sketch execution define the minimum and maximum of expected values for the readings taken during the loop.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:character_analysis&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:character_analysis</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:character_analysis&amp;rev=1760151335&amp;do=diff</link>
        <description>String Character Analysis

In this example we use the operators that allow us to recognise the type of character we are dealing with. It is useful to check if a character is ASCII, or is upper case, or numeric, or it is a punctuation mark and so forth. The options available cover a variety of situations and this is demonstrated in the sketch below. Every character sent to the board through the serial monitor of the Arduino Software (IDE) is analysed by the sketch that returns all the information…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:debounce&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:debounce</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:debounce&amp;rev=1760151335&amp;do=diff</link>
        <description>Debounce

----------

This example demonstrates how to debounce an input, which means checking twice in a short period of time to make sure it's definitely pressed. Without debouncing, pressing the button once can appear to the code as multiple presses. Makes use of the millis() function to keep track of the time when the button is pressed.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:digitalreadserial&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:digitalreadserial</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:digitalreadserial&amp;rev=1760151335&amp;do=diff</link>
        <description>Digital Read Serial

----------

This example shows you how to monitor the state of a switch by establishing serial communication between your Arduino and your computer over USB.

Hardware Required

Arduino Board
A momentary switch, button, or toggle switch
10k ohm resistor
breadboard
hook-up wire
Circuit</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:dimmer&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:dimmer</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:dimmer&amp;rev=1760151335&amp;do=diff</link>
        <description>Dimmer

This example shows how to send data from a personal computer to an Arduino board to control the brightness of an LED. The data is sent in individual bytes, each of which ranges in value from 0 to 255. Arduino reads these bytes and uses them to set the brightness of the LED.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:fade&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:fade</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:fade&amp;rev=1760151335&amp;do=diff</link>
        <description>Fading

----------

Demonstrates the use of the analogWrite() function in fading an LED off and on. AnalogWrite uses pulse width modulation (PWM), turning a digital pin on and off very quickly, to create a fading effect.

Hardware Required

Arduino board Breadboard a LED a 220 ohm resistor Circuit</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:fading&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:fading</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:fading&amp;rev=1760151335&amp;do=diff</link>
        <description>Fading

Demonstrates the use of analog output (Pulse Width Modulation (PWM)) to fade an LED. PWM is a technique for getting an analog-like behavior from a digital output by switching it off and on very fast.

Circuit

An LED connected to digital output pin 9 through a 220-ohm resistor.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:forloop&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:forloop</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:forloop&amp;rev=1760151335&amp;do=diff</link>
        <description>For Loop Iteration (aka The Knight Rider)

Often you want to iterate over a series of pins and do something to each one. For instance, this example blinks 6 LEDs attached to the Arduino or Genuino by using a for() loop to cycle back and forth through digital pins 2-7. The LEDS are turned on and off, in sequence, by using both the digitalWrite() and delay() functions .</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:graph&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:graph</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:graph&amp;rev=1760151335&amp;do=diff</link>
        <description>Graph

This example shows you how to send a byte of data from the Arduino to a personal computer and graph the result. This is called serial communication because the connection appears to both the Arduino and the computer as a serial port, even though it may actually use a USB cable.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:ifstatement&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:ifstatement</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:ifstatement&amp;rev=1760151335&amp;do=diff</link>
        <description>If Statement (Conditional Statement)

The if() statement is the most basic of all programming control structures. It allows you to make something happen or not, depending on whether a given condition is true or not. It looks like this:

if (someCondition) {
   // do stuff if the condition is true
}</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:inputpullupserial&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:inputpullupserial</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:inputpullupserial&amp;rev=1760151335&amp;do=diff</link>
        <description>Input Pullup Serial

This example demonstrates the use of INPUT_PULLUP with pinMode(). It monitors the state of a switch by establishing serial communication between your Arduino and your computer over USB.

Additionally, when the input is HIGH, the onboard LED attached to pin 13 will turn on; when LOW, the LED will turn off.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:main&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:main</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:main&amp;rev=1760151335&amp;do=diff</link>
        <description>Examples

See the following examples for an overview of the Ocrobot Core functions and Libraries

Core Functions

Simple programs that demonstrate basic Ocrobot commands. These are included with the Ocrobot environment; to open them, click the Open button on the toolbar and look in the examples folder.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:midi&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:midi</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:midi&amp;rev=1760151335&amp;do=diff</link>
        <description>MIDI Note Player

This tutorial shows how to send MIDI notes from an Arduino or Genuino board to a MIDI instrument connected through the standard 5 poles DIN cable.

MIDI, the Musical Instrument Digital Interface, is a useful protocol for controlling synthesizers, sequencers, and other musical devices. MIDI devices are generally grouped in to two broad classes: controllers (i.e. devices that generate MIDI signals based on human actions) and synthesizers (including samplers, sequencers, and so fo…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:physicalpixel&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:physicalpixel</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:physicalpixel&amp;rev=1760151335&amp;do=diff</link>
        <description>Physical Pixel

This example example uses the Arduino board to receive data from the computer. The Arduino boards turns on an LED when it receives the character 'H', and turns off the LED when it receives the character 'L'.

The data can be sent from the Arduino serial monitor, or another program like Processing (see code below), Flash (via a serial-net proxy), PD, or Max/MSP.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:pitch_follower&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:pitch_follower</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:pitch_follower&amp;rev=1760151335&amp;do=diff</link>
        <description>Pitch follower using the tone() function

This example shows how to use the tone() command to generate a pitch that follows the values of an analog input

Hardware Required

8-ohm speaker
1 photocell
4.7K ohm resistor
100 ohm resistor
breadboard
hook up wire
Circuit</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:readanalogvoltage&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:readanalogvoltage</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:readanalogvoltage&amp;rev=1760151335&amp;do=diff</link>
        <description>Analog Read Voltage

----------

This example shows you how to read an analog input on Pin 0, convert the values from analogRead() into voltage, and print it out to the serial monitor.

Hardware Required

Arduino Board
a variable resistor, like a potentiometer
Circuit</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:readasciistring&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:readasciistring</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:readasciistring&amp;rev=1760151335&amp;do=diff</link>
        <description>Read ASCII String

This sketch uses the Serial.parseInt() function to locate values separated by a non-alphanumeric character. Often people use a comma to indicate different pieces of information (this format is commonly referred to as comma-separated-values), but other characters like a space or a period will work too. The values are parsed into ints and used to determine the color of a RGB LED. You'll use the serial monitor to send strings like</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:serialcallresponse&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:serialcallresponse</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:serialcallresponse&amp;rev=1760151335&amp;do=diff</link>
        <description>Serial Call and Response (handshaking)

This example demonstrates multi-byte communication from the Arduino or Genuino board to the computer using a call-and-response (handshaking) method.

This sketch sends an ASCII A (byte of value 65) on startup and repeats that until it gets a serial response from the computer. Then it sends three sensor values as single bytes, and waits for another response from the computer.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:serialcallresponseascii&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:serialcallresponseascii</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:serialcallresponseascii&amp;rev=1760151335&amp;do=diff</link>
        <description>Serial Call and Response (handshaking) with ASCII-encoded output

This example demonstrates string-based communication from the Arduino or Genuino board to the computer using a call-and-response (handshaking) method.

The sketch sends an ASCII string on startup and repeats that until it gets a serial response from the computer. Then it sends three sensor values as</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:serialevent&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:serialevent</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:serialevent&amp;rev=1760151335&amp;do=diff</link>
        <description>SerialEvent

This example demonstrates use of the SerialEvent() function. This function is called inside the loop(). If there is serial data in the buffer each character found is added to a string until a newline is found. In this case the string made by the characters received so far is printed and set back to null.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:simple_keyboard&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:simple_keyboard</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:simple_keyboard&amp;rev=1760151335&amp;do=diff</link>
        <description>Simple keyboard using the tone() function

This example shows how to use the tone() command to generate different pitches depending on which sensor is pressed.

Hardware Required
8-ohm speaker(3) force sensing resistors(3) 10k ohm resistors(1) 100 ohm resistor</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:smoothing&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:smoothing</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:smoothing&amp;rev=1760151335&amp;do=diff</link>
        <description>Smoothing

This sketch reads repeatedly from an analog input, calculating a running average and printing it to the computer. This example is useful for smoothing out the values from jumpy or erratic sensors, and also demonstrates the use of arrays to store data.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_append_operator&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:string_append_operator</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_append_operator&amp;rev=1760151335&amp;do=diff</link>
        <description>String Appending Operators

Just as you can concatenate Strings with other data objects using the StringAdditionOperator, you can also use the += operator and the concat() method to append things to Strings. The += operator and the concat() method work the same way, it's just a matter of which style you prefer. The two examples below illustrate both, and result in the same String:</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_case_changes&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:string_case_changes</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_case_changes&amp;rev=1760151335&amp;do=diff</link>
        <description>String Case Change Functions

The String case change functions allow you to change the case of a String. They work just as their names imply. toUpperCase() changes the whole string to upper case characters, and toLowerCase() changes the whole String to lower case characters. Only the characters A to Z or a to z are affected.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_characters&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:string_characters</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_characters&amp;rev=1760151335&amp;do=diff</link>
        <description>String Character Functions

The String functions charAt() and setCharAt() are used to get or set the value of a character at a given position in a String.

At their simplest, these functions help you search and replace a given character. For example, the following replaces the colon in a given String with an equals sign:</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_comparison_operators&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:string_comparison_operators</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_comparison_operators&amp;rev=1760151335&amp;do=diff</link>
        <description>String Comparison Operators

The String comparison operators ==, !=,&gt;, &lt; ,&gt;=, &lt;= , and the equals() and equalsIgnoreCase() methods allow you to make alphabetic comparisons between Strings. They're useful for sorting and alphabetizing, among other things.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_constructors&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:string_constructors</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_constructors&amp;rev=1760151335&amp;do=diff</link>
        <description>String Object Constructors

The String object allows you to manipulate strings of text in a variety of useful ways. You can append characters to Strings, combine Strings through concatenation, get the length of a String, search and replace substrings, and more. This tutorial shows you how to initialize String objects.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_index_of&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:string_index_of</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_index_of&amp;rev=1760151335&amp;do=diff</link>
        <description>String indexOf() and lastIndexOf() Method

The String object indexOf() method gives you the ability to search for the first instance of a particular character value in a String. You can also look for the first instance of the character after a given offset. The lastIndexOf() method lets you do the same things from the end of a String.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_length_string_length_trim&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:string_length_string_length_trim</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_length_string_length_trim&amp;rev=1760151335&amp;do=diff</link>
        <description>String length() and trim() Commands

You can get the length of a Strings using the length() command, or eliminate extra characters using the trim() command. This example shows you how to use both commands.

Hardware Required

Arduino or Genuino Board
Circuit</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_replace&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:string_replace</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_replace&amp;rev=1760151335&amp;do=diff</link>
        <description>String replace Function

The String replace() function allows you to replace all instances of a given character with another character. You can also use replace to replace substrings of a string with a different substring.

Hardware Required

Arduino or Genuino Board
Circuit</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_start_with_ends_with&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:string_start_with_ends_with</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_start_with_ends_with&amp;rev=1760151335&amp;do=diff</link>
        <description>String startsWith and endsWith Functions

The String functions startsWith() and endsWith() allow you to check what character or substring a given String starts or ends with. They're basically special cases of substring.

Hardware Required
Arduino or Genuino Board</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_substring&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:string_substring</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_substring&amp;rev=1760151335&amp;do=diff</link>
        <description>String substring Function

The String function substring() is closely related to charAt(), startsWith() and endsWith(). It allows you to look for an instance of a particular substring within a given String.

Hardware Required

Arduino or Genuino Board
Circuit</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_to_int&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:string_to_int</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:string_to_int&amp;rev=1760151335&amp;do=diff</link>
        <description>String to Int Function

The toInt() function allows you to convert a String to an integer number.

In this example, the board reads a serial input string until it sees a newline, then converts the string to a number if the characters are digits. Once you've uploaded the code to your board, open the Arduino IDE serial monitor, enter some numbers, and press send. The board will repeat these numbers back to you. Observe what happens when a non-numeric character is sent.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:switchcase&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:switchcase</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:switchcase&amp;rev=1760151335&amp;do=diff</link>
        <description>Switch (case) Statement, used with sensor input

An if statement allows you to choose between two discrete options, TRUE or FALSE. When there are more than two options, you can use multiple if statements, or you can use the switch statement. Switch allows you to choose between several discrete options. This tutorial shows you how to use it to switch between four desired states of a photo resistor: really dark, dim, medium, and bright.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:switchcase2&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:switchcase2</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:switchcase2&amp;rev=1760151335&amp;do=diff</link>
        <description>Switch (case) Statement, used with serial input

An if statement allows you to choose between two discrete options, TRUE or FALSE. When there are more than two options, you can use multiple if statements, or you can use the switch statement. Switch allows you to choose between several discrete options.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:tone&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:tone</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:tone&amp;rev=1760151335&amp;do=diff</link>
        <description>Play a Melody using the tone() function

This example shows how to use the tone() command to generate notes. It plays a little melody you may have heard before.

Hardware Required

Arduino board
a piezo buzzer
hook-up wire
Circuit

image developed using Fritzing. For more circuit examples, see the Fritzing project page</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:tone4&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:tone4</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:tone4&amp;rev=1760151335&amp;do=diff</link>
        <description>SPlaying tones on Multiple outputs using the tone() function

This example shows how to use the tone() command to play different notes on multiple outputs.

The tone() command works by taking over one of the Atmega's internal timers, setting it to the frequency you want, and using the timer to pulse an output pin. Since it's only using one timer, you can only play one note at a time. You can, however, play notes on multiple pins sequentially. To do this, you need to turn the timer off for one pi…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:virtualcolormixer&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:virtualcolormixer</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:virtualcolormixer&amp;rev=1760151335&amp;do=diff</link>
        <description>Virtual Color Mixer

This example demonstrates how to send multiple values from the Arduino board to the computer. The readings from three potentiometers are used to set the red, green, and blue components of the background color of a Processing sketch or Max/MSP patch.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=en:learing:examples:whileloop&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:learing:examples:whileloop</title>
        <link>https://wiki.ocrobot.com/doku.php?id=en:learing:examples:whileloop&amp;rev=1760151335&amp;do=diff</link>
        <description>While Loop

Sometimes you want everything in the program to stop while a given condition is true. You can do this using a while loop. This example shows how to use a while loop to calibrate the value of an analog sensor.

In the main loop, the sketch below reads the value of a photoresistor on analog pin 0 and uses it to fade an LED on pin 9. But while a button attached to digital pin 2 is pressed, the program runs a method called calibrate() that looks for the highest and lowest values of the a…</description>
    </item>
</rdf:RDF>
