From 6349dab91e5ad83fdb7ccbd3c0ce207fb31c0b5d Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 12 Jul 2017 10:58:31 -0700 Subject: [PATCH 01/11] Fix typos in the comments of the built-in examples --- .../AnalogReadSerial/AnalogReadSerial.ino | 4 +-- .../shared/examples/01.Basics/Blink/Blink.ino | 4 +-- .../DigitalReadSerial/DigitalReadSerial.ino | 2 +- .../ReadAnalogVoltage/ReadAnalogVoltage.ino | 4 +-- .../ReadAnalogVoltage/ReadAnalogVoltage.txt | 2 +- .../BlinkWithoutDelay/BlinkWithoutDelay.ino | 8 +++--- .../examples/02.Digital/Debounce/Debounce.ino | 4 +-- .../DigitalInputPullup/DigitalInputPullup.ino | 8 +++--- .../StateChangeDetection.ino | 6 ++-- .../AnalogInOutSerial/AnalogInOutSerial.ino | 6 ++-- .../03.Analog/AnalogInput/AnalogInput.ino | 2 +- .../AnalogWriteMega/AnalogWriteMega.ino | 4 +-- .../03.Analog/Smoothing/Smoothing.ino | 2 +- .../ASCIITable/ASCIITable.ino | 10 +++---- .../04.Communication/Dimmer/Dimmer.ino | 4 +-- .../examples/04.Communication/Graph/Graph.ino | 8 +++--- .../examples/04.Communication/Midi/Midi.ino | 6 ++-- .../MultiSerial/MultiSerial.ino | 2 +- .../PhysicalPixel/PhysicalPixel.ino | 6 ++-- .../SerialCallResponse/SerialCallResponse.ino | 6 ++-- .../SerialCallResponseASCII.ino | 8 +++--- .../SerialEvent/SerialEvent.ino | 2 +- .../SerialPassthrough/SerialPassthrough.ino | 2 +- .../VirtualColorMixer/VirtualColorMixer.ino | 4 +-- .../examples/05.Control/Arrays/Arrays.ino | 2 +- .../WhileStatementConditional.ino | 6 ++-- .../05.Control/switchCase/switchCase.ino | 6 ++-- .../05.Control/switchCase2/switchCase2.ino | 2 +- .../examples/06.Sensors/ADXL3xx/ADXL3xx.ino | 2 +- .../examples/06.Sensors/Knock/Knock.ino | 2 +- .../06.Sensors/Memsic2125/Memsic2125.ino | 4 +-- .../RowColumnScanning/RowColumnScanning.ino | 2 +- .../StringAdditionOperator.ino | 22 +++++++-------- .../StringAppendOperator.ino | 20 ++++++------- .../StringCaseChanges/StringCaseChanges.ino | 4 +-- .../StringCharacters/StringCharacters.ino | 6 ++-- .../StringComparisonOperators.ino | 22 +++++++-------- .../StringConstructors/StringConstructors.ino | 6 ++-- .../StringIndexOf/StringIndexOf.ino | 2 +- .../StringLengthTrim/StringLengthTrim.ino | 2 +- .../StringReplace/StringReplace.ino | 6 ++-- .../KeyboardLogout/KeyboardLogout.ino | 4 +-- .../KeyboardReprogram/KeyboardReprogram.ino | 4 +-- .../JoystickMouseControl.ino | 2 +- .../p02_SpaceshipInterface.ino | 2 +- .../p03_LoveOMeter/p03_LoveOMeter.ino | 6 ++-- .../p04_ColorMixingLamp.ino | 6 ++-- .../p05_ServoMoodIndicator.ino | 6 ++-- .../p06_LightTheremin/p06_LightTheremin.ino | 2 +- .../p07_Keyboard/p07_Keyboard.ino | 2 +- .../p08_DigitalHourglass.ino | 2 +- .../p09_MotorizedPinwheel.ino | 2 +- .../p10_Zoetrope/p10_Zoetrope.ino | 8 +++--- .../p11_CrystalBall/p11_CrystalBall.ino | 10 +++---- .../p12_KnockLock/p12_KnockLock.ino | 6 ++-- .../p13_TouchSensorLamp.ino | 2 +- .../p14_TweakTheArduinoLogo.ino | 12 ++++---- .../p15_HackingButtons/p15_HackingButtons.ino | 4 +-- .../11.ArduinoISP/ArduinoISP/ArduinoISP.ino | 28 +++++++++---------- 59 files changed, 169 insertions(+), 169 deletions(-) diff --git a/build/shared/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino b/build/shared/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino index 1dc462aace5..b413e9baf5b 100644 --- a/build/shared/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino +++ b/build/shared/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino @@ -1,7 +1,7 @@ /* AnalogReadSerial - Reads an analog input on pin 0, prints the result to the serial monitor. - Graphical representation is available using serial plotter (Tools > Serial Plotter menu) + Reads an analog input on pin 0, prints the result to the Serial Monitor. + Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu) Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground. This example code is in the public domain. diff --git a/build/shared/examples/01.Basics/Blink/Blink.ino b/build/shared/examples/01.Basics/Blink/Blink.ino index 5a3c7a92659..f65f23b81ef 100644 --- a/build/shared/examples/01.Basics/Blink/Blink.ino +++ b/build/shared/examples/01.Basics/Blink/Blink.ino @@ -1,12 +1,12 @@ /* Blink - Turns on an LED on for one second, then off for one second, repeatedly. + Turns an LED on for one second, then off for one second, repeatedly. Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used. If you want to know what pin the on-board LED is connected to on your Arduino model, check - the Technical Specs of your board at https://www.arduino.cc/en/Main/Products + the Technical Specs of your board at https://www.arduino.cc/en/Main/Products This example code is in the public domain. diff --git a/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino b/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino index 115b4c18c51..3e207b2a55f 100644 --- a/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino +++ b/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino @@ -1,6 +1,6 @@ /* DigitalReadSerial - Reads a digital input on pin 2, prints the result to the serial monitor + Reads a digital input on pin 2, prints the result to the Serial Monitor This example code is in the public domain. */ diff --git a/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.ino b/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.ino index 1e2e4eda83e..46f1a039dbc 100644 --- a/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.ino +++ b/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.ino @@ -1,7 +1,7 @@ /* ReadAnalogVoltage - Reads an analog input on pin 0, converts it to voltage, and prints the result to the serial monitor. - Graphical representation is available using serial plotter (Tools > Serial Plotter menu) + Reads an analog input on pin 0, converts it to voltage, and prints the result to the Serial Monitor. + Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu) Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground. This example code is in the public domain. diff --git a/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.txt b/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.txt index d71a63d6ade..d4838d5dc73 100644 --- a/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.txt +++ b/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.txt @@ -1 +1 @@ -Reads an analog input and prints the voltage to the serial monitor. \ No newline at end of file +Reads an analog input and prints the voltage to the Serial Monitor. \ No newline at end of file diff --git a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino index 6b8ae577d33..4aa91e85d11 100644 --- a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino +++ b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino @@ -10,7 +10,7 @@ it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used. If you want to know what pin the on-board LED is connected to on your Arduino model, check - the Technical Specs of your board at https://www.arduino.cc/en/Main/Products + the Technical Specs of your board at https://www.arduino.cc/en/Main/Products created 2005 by David A. Mellis @@ -27,17 +27,17 @@ http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay */ -// constants won't change. Used here to set a pin number : +// constants won't change. Used here to set a pin number: const int ledPin = LED_BUILTIN;// the number of the LED pin -// Variables will change : +// Variables will change: int ledState = LOW; // ledState used to set the LED // Generally, you should use "unsigned long" for variables that hold time // The value will quickly become too large for an int to store unsigned long previousMillis = 0; // will store last time LED was updated -// constants won't change : +// constants won't change: const long interval = 1000; // interval at which to blink (milliseconds) void setup() { diff --git a/build/shared/examples/02.Digital/Debounce/Debounce.ino b/build/shared/examples/02.Digital/Debounce/Debounce.ino index bdf3bdeae25..703b09d6938 100644 --- a/build/shared/examples/02.Digital/Debounce/Debounce.ino +++ b/build/shared/examples/02.Digital/Debounce/Debounce.ino @@ -40,7 +40,7 @@ int ledState = HIGH; // the current state of the output pin int buttonState; // the current reading from the input pin int lastButtonState = LOW; // the previous reading from the input pin -// the following variables are unsigned long's because the time, measured in miliseconds, +// the following variables are unsigned longs because the time, measured in milliseconds, // will quickly become a bigger number than can be stored in an int. unsigned long lastDebounceTime = 0; // the last time the output pin was toggled unsigned long debounceDelay = 50; // the debounce time; increase if the output flickers @@ -58,7 +58,7 @@ void loop() { int reading = digitalRead(buttonPin); // check to see if you just pressed the button - // (i.e. the input went from LOW to HIGH), and you've waited + // (i.e. the input went from LOW to HIGH), and you've waited // long enough since the last press to ignore any noise: // If the switch changed, due to noise or pressing: diff --git a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino index 7d9276b407b..aa0b6357bc8 100644 --- a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino +++ b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino @@ -1,8 +1,8 @@ /* - Input Pullup Serial + Input Pull-up Serial This example demonstrates the use of pinMode(INPUT_PULLUP). It reads a - digital input on pin 2 and prints the results to the serial monitor. + digital input on pin 2 and prints the results to the Serial Monitor. The circuit: * Momentary switch attached from pin 2 to ground @@ -24,7 +24,7 @@ void setup() { //start serial connection Serial.begin(9600); - //configure pin2 as an input and enable the internal pull-up resistor + //configure pin 2 as an input and enable the internal pull-up resistor pinMode(2, INPUT_PULLUP); pinMode(13, OUTPUT); @@ -36,7 +36,7 @@ void loop() { //print out the value of the pushbutton Serial.println(sensorVal); - // Keep in mind the pullup means the pushbutton's + // Keep in mind the pull-up means the pushbutton's // logic is inverted. It goes HIGH when it's open, // and LOW when it's pressed. Turn on pin 13 when the // button's pressed, and off when it's not: diff --git a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino index 3e2f3b36508..93012ea40c4 100644 --- a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino +++ b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino @@ -53,21 +53,21 @@ void loop() { // if the state has changed, increment the counter if (buttonState == HIGH) { // if the current state is HIGH then the button - // wend from off to on: + // went from off to on: buttonPushCounter++; Serial.println("on"); Serial.print("number of button pushes: "); Serial.println(buttonPushCounter); } else { // if the current state is LOW then the button - // wend from on to off: + // went from on to off: Serial.println("off"); } // Delay a little bit to avoid bouncing delay(50); } // save the current state as the last state, - //for next time through the loop + // for next time through the loop lastButtonState = buttonState; diff --git a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino index 60c52ee9e51..206691ede2e 100644 --- a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino +++ b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino @@ -2,8 +2,8 @@ Analog input, analog output, serial output Reads an analog input pin, maps the result to a range from 0 to 255 - and uses the result to set the pulsewidth modulation (PWM) of an output pin. - Also prints the results to the serial monitor. + and uses the result to set the pulse width modulation (PWM) of an output pin. + Also prints the results to the Serial Monitor. The circuit: * potentiometer connected to analog pin 0. @@ -40,7 +40,7 @@ void loop() { // change the analog out value: analogWrite(analogOutPin, outputValue); - // print the results to the serial monitor: + // print the results to the Serial Monitor: Serial.print("sensor = "); Serial.print(sensorValue); Serial.print("\t output = "); diff --git a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino index 0e5b212a64a..049ec11b818 100644 --- a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino +++ b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino @@ -1,7 +1,7 @@ /* Analog Input Demonstrates analog input by reading an analog sensor on analog pin 0 and - turning on and off a light emitting diode(LED) connected to digital pin 13. + turning on and off a light emitting diode(LED) connected to digital pin 13. The amount of time the LED will be on and off depends on the value obtained by analogRead(). diff --git a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino index 08e9e0455bc..3c90463faba 100644 --- a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino +++ b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino @@ -2,7 +2,7 @@ Mega analogWrite() test This sketch fades LEDs up and down one at a time on digital pins 2 through 13. - This sketch was written for the Arduino Mega, and will not work on previous boards. + This sketch was written for the Arduino Mega, and will not work on other boards. The circuit: * LEDs attached from pins 2 through 13 to ground. @@ -34,7 +34,7 @@ void loop() { analogWrite(thisPin, brightness); delay(2); } - // fade the LED on thisPin from brithstest to off: + // fade the LED on thisPin from brightest to off: for (int brightness = 255; brightness >= 0; brightness--) { analogWrite(thisPin, brightness); delay(2); diff --git a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino index 9a79c9caafa..23f30dc4b65 100644 --- a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino +++ b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino @@ -24,7 +24,7 @@ // Define the number of samples to keep track of. The higher the number, // the more the readings will be smoothed, but the slower the output will // respond to the input. Using a constant rather than a normal variable lets -// use this value to determine the size of the readings array. +// us use this value to determine the size of the readings array. const int numReadings = 10; int readings[numReadings]; // the readings from the analog input diff --git a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino index 7e41645ed60..fbdd6fbce88 100644 --- a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino +++ b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino @@ -33,22 +33,22 @@ void setup() { // first visible ASCIIcharacter '!' is number 33: int thisByte = 33; // you can also write ASCII characters in single quotes. -// for example. '!' is the same as 33, so you could also use this: -//int thisByte = '!'; +// for example, '!' is the same as 33, so you could also use this: +// int thisByte = '!'; void loop() { // prints value unaltered, i.e. the raw binary version of the - // byte. The serial monitor interprets all bytes as + // byte. The Serial Monitor interprets all bytes as // ASCII, so 33, the first number, will show up as '!' Serial.write(thisByte); Serial.print(", dec: "); // prints value as string as an ASCII-encoded decimal (base 10). - // Decimal is the default format for Serial.print() and Serial.println(), + // Decimal is the default format for Serial.print() and Serial.println(), // so no modifier is needed: Serial.print(thisByte); // But you can declare the modifier for decimal if you want to. - //this also works if you uncomment it: + // this also works if you uncomment it: // Serial.print(thisByte, DEC); diff --git a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino index ef0e084de75..541080ab3d7 100644 --- a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino +++ b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino @@ -1,7 +1,7 @@ /* Dimmer - Demonstrates the sending data from the computer to the Arduino board, + Demonstrates sending data from the computer to the Arduino board, in this case to control the brightness of an LED. The data is sent in individual bytes, each of which ranges from 0 to 255. Arduino reads these bytes and uses them to set the brightness of the LED. @@ -45,7 +45,7 @@ void loop() { /* Processing code for this example // Dimmer - sends bytes over a serial port // by David A. Mellis - //This example code is in the public domain. + // This example code is in the public domain. import processing.serial.*; Serial port; diff --git a/build/shared/examples/04.Communication/Graph/Graph.ino b/build/shared/examples/04.Communication/Graph/Graph.ino index db812e03449..59d33002d29 100644 --- a/build/shared/examples/04.Communication/Graph/Graph.ino +++ b/build/shared/examples/04.Communication/Graph/Graph.ino @@ -8,7 +8,7 @@ a USB cable. Bytes are sent one after another (serially) from the Arduino to the computer. - You can use the Arduino serial monitor to view the sent data, or it can + You can use the Arduino Serial Monitor to view the sent data, or it can be read by Processing, PD, Max/MSP, or any other program capable of reading data from a serial port. The Processing code below graphs the data received so you can see the value of the analog input changing over time. @@ -67,15 +67,15 @@ void setup () { // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); - // I know that the first port in the serial list on my mac - // is always my Arduino, so I open Serial.list()[0]. + // I know that the first port in the serial list on my Mac + // is always my Arduino, so I open Serial.list()[0]. // Open whatever port is the one you're using. myPort = new Serial(this, Serial.list()[0], 9600); // don't generate a serialEvent() unless you get a newline character: myPort.bufferUntil('\n'); - // set inital background: + // set initial background: background(0); } void draw () { diff --git a/build/shared/examples/04.Communication/Midi/Midi.ino b/build/shared/examples/04.Communication/Midi/Midi.ino index e4de8ccb78e..d53295746bd 100644 --- a/build/shared/examples/04.Communication/Midi/Midi.ino +++ b/build/shared/examples/04.Communication/Midi/Midi.ino @@ -23,7 +23,7 @@ */ void setup() { - // Set MIDI baud rate: + // Set MIDI baud rate: Serial.begin(31250); } @@ -39,8 +39,8 @@ void loop() { } } -// plays a MIDI note. Doesn't check to see that -// cmd is greater than 127, or that data values are less than 127: +// plays a MIDI note. Doesn't check to see that +// cmd is greater than 127, or that data values are less than 127: void noteOn(int cmd, int pitch, int velocity) { Serial.write(cmd); Serial.write(pitch); diff --git a/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino b/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino index ea9fa2eb212..8d3bc582e71 100644 --- a/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino +++ b/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino @@ -1,5 +1,5 @@ /* - Multple Serial test + Multiple Serial test Receives from the main serial port, sends to the others. Receives from serial port 1, sends to the main serial (Serial 0). diff --git a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino index 25556af5688..cdd223a75eb 100644 --- a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino +++ b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino @@ -6,7 +6,7 @@ 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 + 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. @@ -51,7 +51,7 @@ void loop() { /* Processing code for this example - // mouseover serial + // mouse over serial // Demonstrates how to send data to the Arduino I/O board, in order to // turn ON a light if the mouse is over a square and turn it off @@ -108,7 +108,7 @@ void loop() { port.write('H'); } else { - // return the box to it's inactive state: + // return the box to its inactive state: stroke(153); fill(153); // send an 'L' to turn the LED off: diff --git a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino index 23d74c3ec18..44ec3dc5184 100644 --- a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino +++ b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino @@ -51,7 +51,7 @@ void loop() { delay(10); // read second analog input, divide by 4 to make the range 0-255: secondSensor = analogRead(1) / 4; - // read switch, map it to 0 or 255L + // read switch, map it to 0 or 255L thirdSensor = map(digitalRead(2), 0, 1, 0, 255); // send sensor values: Serial.write(firstSensor); @@ -94,8 +94,8 @@ void setup() { // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); - // I know that the first port in the serial list on my mac - // is always my FTDI adaptor, so I open Serial.list()[0]. + // I know that the first port in the serial list on my Mac + // is always my FTDI adaptor, so I open Serial.list()[0]. // On Windows machines, this generally opens COM1. // Open whatever port is the one you're using. String portName = Serial.list()[0]; diff --git a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino index 551c4921b61..7d3c3466aef 100644 --- a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino +++ b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino @@ -54,7 +54,7 @@ void loop() { firstSensor = analogRead(A0); // read second analog input: secondSensor = analogRead(A1); - // read switch, map it to 0 or 255L + // read switch, map it to 0 or 255 thirdSensor = map(digitalRead(2), 0, 1, 0, 255); // send sensor values: Serial.print(firstSensor); @@ -92,8 +92,8 @@ void setup() { // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); - // I know that the first port in the serial list on my mac - // is always my Arduino module, so I open Serial.list()[0]. + // I know that the first port in the serial list on my Mac + // is always my Arduino board, so I open Serial.list()[0]. // Change the 0 to the appropriate number of the serial port // that your microcontroller is attached to. myPort = new Serial(this, Serial.list()[0], 9600); @@ -112,7 +112,7 @@ void draw() { ellipse(xpos, ypos, 20, 20); } -// serialEvent method is run automatically by the Processing applet +// serialEvent method is run automatically by the Processing applet // whenever the buffer reaches the byte value set in the bufferUntil() // method in the setup(): diff --git a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino index 94a3cc39feb..110d18cedad 100644 --- a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino +++ b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino @@ -20,7 +20,7 @@ */ -String inputString = ""; // a string to hold incoming data +String inputString = ""; // a String to hold incoming data boolean stringComplete = false; // whether the string is complete void setup() { diff --git a/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino b/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino index 5650abbaf4d..75687040079 100644 --- a/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino +++ b/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino @@ -8,7 +8,7 @@ the Arduino UNO (commonly used to interact with devices/shields that require configuration via serial AT commands) will not work by default. - This sketch allows you to emulate the serial passthrough behaviour. + This sketch allows you to emulate the serial passthrough behaviour. Any text you type in the IDE Serial monitor will be written out to the serial port on Digital pins 0 and 1, and vice-versa. diff --git a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino index b9a6df1da0e..ba23b299a4d 100644 --- a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino +++ b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino @@ -51,8 +51,8 @@ void setup() { // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); - // I know that the first port in the serial list on my mac - // is always my Arduino, so I open Serial.list()[0]. + // I know that the first port in the serial list on my Mac + // is always my Arduino, so I open Serial.list()[0]. // Open whatever port is the one you're using. myPort = new Serial(this, Serial.list()[0], 9600); // don't generate a serialEvent() unless you get a newline character: diff --git a/build/shared/examples/05.Control/Arrays/Arrays.ino b/build/shared/examples/05.Control/Arrays/Arrays.ino index 37b7a5e983f..3406a18280f 100644 --- a/build/shared/examples/05.Control/Arrays/Arrays.ino +++ b/build/shared/examples/05.Control/Arrays/Arrays.ino @@ -1,7 +1,7 @@ /* Arrays - Demonstrates the use of an array to hold pin numbers + Demonstrates the use of an array to hold pin numbers in order to iterate over the pins in a sequence. Lights multiple LEDs in sequence, then in reverse. diff --git a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino index f17038c7ba7..f5ee46da485 100644 --- a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino +++ b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino @@ -4,13 +4,13 @@ This example demonstrates the use of while() statements. While the pushbutton is pressed, the sketch runs the calibration routine. - The sensor readings during the while loop define the minimum and maximum - of expected values from the photo resistor. + The sensor readings during the while loop define the minimum and maximum + of expected values from the photoresistor. This is a variation on the calibrate example. The circuit: - * photo resistor connected from +5V to analog in pin 0 + * photoresistor connected from +5V to analog in pin 0 * 10K resistor connected from ground to analog in pin 0 * LED connected from digital pin 9 to ground through 220 ohm resistor * pushbutton attached from pin 2 to +5V diff --git a/build/shared/examples/05.Control/switchCase/switchCase.ino b/build/shared/examples/05.Control/switchCase/switchCase.ino index 1572f73e441..67dfe0c17df 100644 --- a/build/shared/examples/05.Control/switchCase/switchCase.ino +++ b/build/shared/examples/05.Control/switchCase/switchCase.ino @@ -5,9 +5,9 @@ statement allows you to choose from among a set of discrete values of a variable. It's like a series of if statements. - To see this sketch in action, but the board and sensor in a well-lit - room, open the serial monitor, and and move your hand gradually - down over the sensor. + To see this sketch in action, put the board and sensor in a well-lit + room, open the Serial Monitor, and move your hand gradually down + over the sensor. The circuit: * photoresistor from analog in 0 to +5V diff --git a/build/shared/examples/05.Control/switchCase2/switchCase2.ino b/build/shared/examples/05.Control/switchCase2/switchCase2.ino index 19215d9ea63..b600155e85a 100644 --- a/build/shared/examples/05.Control/switchCase2/switchCase2.ino +++ b/build/shared/examples/05.Control/switchCase2/switchCase2.ino @@ -35,7 +35,7 @@ void loop() { int inByte = Serial.read(); // do something different depending on the character received. // The switch statement expects single number values for each case; - // in this exmaple, though, you're using single quotes to tell + // in this example, though, you're using single quotes to tell // the controller to get the ASCII value for the character. For // example 'a' = 97, 'b' = 98, and so forth: diff --git a/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino b/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino index 2515d60a09c..ab810084963 100644 --- a/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino +++ b/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino @@ -4,7 +4,7 @@ Reads an Analog Devices ADXL3xx accelerometer and communicates the acceleration to the computer. The pins used are designed to be easily - compatible with the breakout boards from Sparkfun, available from: + compatible with the breakout boards from SparkFun, available from: http://www.sparkfun.com/commerce/categories.php?c=80 http://www.arduino.cc/en/Tutorial/ADXL3xx diff --git a/build/shared/examples/06.Sensors/Knock/Knock.ino b/build/shared/examples/06.Sensors/Knock/Knock.ino index 98c64ffb00c..7498bda729c 100644 --- a/build/shared/examples/06.Sensors/Knock/Knock.ino +++ b/build/shared/examples/06.Sensors/Knock/Knock.ino @@ -23,7 +23,7 @@ // these constants won't change: -const int ledPin = 13; // led connected to digital pin 13 +const int ledPin = 13; // LED connected to digital pin 13 const int knockSensor = A0; // the piezo is connected to analog pin 0 const int threshold = 100; // threshold value to decide when the detected sound is a knock or not diff --git a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino index 74c504bb831..61091756e4d 100644 --- a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino +++ b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino @@ -2,7 +2,7 @@ Memsic2125 Read the Memsic 2125 two-axis accelerometer. Converts the - pulses output by the 2125 into milli-g's (1/1000 of earth's + pulses output by the 2125 into milli-g's (1/1000 of Earth's gravity) and prints them over the serial connection to the computer. @@ -48,7 +48,7 @@ void loop() { // convert the pulse width into acceleration // accelerationX and accelerationY are in milli-g's: - // earth's gravity is 1000 milli-g's, or 1g. + // Earth's gravity is 1000 milli-g's, or 1 g. accelerationX = ((pulseX / 10) - 500) * 8; accelerationY = ((pulseY / 10) - 500) * 8; diff --git a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino index a7f623a5e4e..21d4d12f203 100644 --- a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino +++ b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino @@ -7,7 +7,7 @@ modified 30 Aug 2011 by Tom Igoe - This example works for the Lumex LDM-24488NI Matrix. See + This example works for the Lumex LDM-24488NI Matrix. See http://sigma.octopart.com/140413/datasheet/Lumex-LDM-24488NI.pdf for the pin connections diff --git a/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino b/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino index 7e56b975d15..a1cb72e09b1 100644 --- a/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino +++ b/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino @@ -1,8 +1,8 @@ /* Adding Strings together - Examples of how to add strings together - You can also add several different data types to string, as shown here: + Examples of how to add Strings together + You can also add several different data types to String, as shown here: created 27 July 2010 modified 2 Apr 2012 @@ -13,7 +13,7 @@ This example code is in the public domain. */ -// declare three strings: +// declare three Strings: String stringOne, stringTwo, stringThree; void setup() { @@ -27,40 +27,40 @@ void setup() { stringTwo = String("this string"); stringThree = String(); // send an intro: - Serial.println("\n\nAdding strings together (concatenation):"); + Serial.println("\n\nAdding Strings together (concatenation):"); Serial.println(); } void loop() { - // adding a constant integer to a string: + // adding a constant integer to a String: stringThree = stringOne + 123; Serial.println(stringThree); // prints "You added 123" - // adding a constant long interger to a string: + // adding a constant long integer to a String: stringThree = stringOne + 123456789; Serial.println(stringThree); // prints "You added 123456789" - // adding a constant character to a string: + // adding a constant character to a String: stringThree = stringOne + 'A'; Serial.println(stringThree); // prints "You added A" - // adding a constant string to a string: + // adding a constant string to a String: stringThree = stringOne + "abc"; Serial.println(stringThree); // prints "You added abc" stringThree = stringOne + stringTwo; Serial.println(stringThree); // prints "You added this string" - // adding a variable integer to a string: + // adding a variable integer to a String: int sensorValue = analogRead(A0); stringOne = "Sensor value: "; stringThree = stringOne + sensorValue; Serial.println(stringThree); // prints "Sensor Value: 401" or whatever value analogRead(A0) has - // adding a variable long integer to a string: + // adding a variable long integer to a String: stringOne = "millis() value: "; stringThree = stringOne + millis(); - Serial.println(stringThree); // prints "The millis: 345345" or whatever value currentTime has + Serial.println(stringThree); // prints "The millis: 345345" or whatever value millis() has // do nothing while true: while (true); diff --git a/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino b/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino index 97e81741b56..04179414de9 100644 --- a/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino +++ b/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino @@ -1,7 +1,7 @@ /* Appending to Strings using the += operator and concat() - Examples of how to append different data types to strings + Examples of how to append different data types to Strings created 27 July 2010 modified 2 Apr 2012 @@ -24,34 +24,34 @@ void setup() { stringOne = String("Sensor "); stringTwo = String("value"); // send an intro: - Serial.println("\n\nAppending to a string:"); + Serial.println("\n\nAppending to a String:"); Serial.println(); } void loop() { Serial.println(stringOne); // prints "Sensor " - // adding a string to a string: + // adding a string to a String: stringOne += stringTwo; Serial.println(stringOne); // prints "Sensor value" - // adding a constant string to a string: + // adding a constant string to a String: stringOne += " for input "; Serial.println(stringOne); // prints "Sensor value for input" - // adding a constant character to a string: + // adding a constant character to a String: stringOne += 'A'; Serial.println(stringOne); // prints "Sensor value for input A" - // adding a constant integer to a string: + // adding a constant integer to a String: stringOne += 0; Serial.println(stringOne); // prints "Sensor value for input A0" - // adding a constant string to a string: + // adding a constant string to a String: stringOne += ": "; Serial.println(stringOne); // prints "Sensor value for input" - // adding a variable integer to a string: + // adding a variable integer to a String: stringOne += analogRead(A0); Serial.println(stringOne); // prints "Sensor value for input A0: 456" or whatever analogRead(A0) is @@ -59,11 +59,11 @@ void loop() { stringOne = "A long integer: "; stringTwo = "The millis(): "; - // adding a constant long integer to a string: + // adding a constant long integer to a String: stringOne += 123456789; Serial.println(stringOne); // prints "A long integer: 123456789" - // using concat() to add a long variable to a string: + // using concat() to add a long variable to a String: stringTwo.concat(millis()); Serial.println(stringTwo); // prints "The millis(): 43534" or whatever the value of the millis() is diff --git a/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino b/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino index c9c8fc87507..b426be92cb6 100644 --- a/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino +++ b/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino @@ -1,7 +1,7 @@ /* String Case changes - Examples of how to change the case of a string + Examples of how to change the case of a String created 27 July 2010 modified 2 Apr 2012 @@ -20,7 +20,7 @@ void setup() { } // send an intro: - Serial.println("\n\nString case changes:"); + Serial.println("\n\nString case changes:"); Serial.println(); } diff --git a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino index dbb1f0a08e2..a7072a2f365 100644 --- a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino +++ b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino @@ -19,11 +19,11 @@ void setup() { ; // wait for serial port to connect. Needed for native USB port only } - Serial.println("\n\nString charAt() and setCharAt():"); + Serial.println("\n\nString charAt() and setCharAt():"); } void loop() { - // make a string to report a sensor reading: + // make a String to report a sensor reading: String reportString = "SensorReading: 456"; Serial.println(reportString); @@ -36,7 +36,7 @@ void loop() { // add blank space: Serial.println(); - // you can alo set the character of a string. Change the : to a = character + // you can also set the character of a String. Change the : to a = character reportString.setCharAt(13, '='); Serial.println(reportString); diff --git a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino index 1417a8b7aba..cfa534e39a2 100644 --- a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino +++ b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino @@ -1,7 +1,7 @@ /* Comparing Strings - Examples of how to compare strings using the comparison operators + Examples of how to compare Strings using the comparison operators created 27 July 2010 modified 2 Apr 2012 @@ -31,22 +31,22 @@ void setup() { } void loop() { - // two strings equal: + // two Strings equal: if (stringOne == "this") { Serial.println("StringOne == \"this\""); } - // two strings not equal: + // two Strings not equal: if (stringOne != stringTwo) { Serial.println(stringOne + " =! " + stringTwo); } - // two strings not equal (case sensitivity matters): + // two Strings not equal (case sensitivity matters): stringOne = "This"; stringTwo = "this"; if (stringOne != stringTwo) { Serial.println(stringOne + " =! " + stringTwo); } - // you can also use equals() to see if two strings are the same: + // you can also use equals() to see if two Strings are the same: if (stringOne.equals(stringTwo)) { Serial.println(stringOne + " equals " + stringTwo); } else { @@ -60,7 +60,7 @@ void loop() { Serial.println(stringOne + " does not equal (ignoring case) " + stringTwo); } - // a numeric string compared to the number it represents: + // a numeric String compared to the number it represents: stringOne = "1"; int numberOne = 1; if (stringOne.toInt() == numberOne) { @@ -69,14 +69,14 @@ void loop() { - // two numeric strings compared: + // two numeric Strings compared: stringOne = "2"; stringTwo = "1"; if (stringOne >= stringTwo) { Serial.println(stringOne + " >= " + stringTwo); } - // comparison operators can be used to compare strings for alphabetic sorting too: + // comparison operators can be used to compare Strings for alphabetic sorting too: stringOne = String("Brown"); if (stringOne < "Charles") { Serial.println(stringOne + " < Charles"); @@ -95,9 +95,9 @@ void loop() { Serial.println(stringOne + " >= Brow"); } - // the compareTo() operator also allows you to compare strings + // the compareTo() operator also allows you to compare Strings // it evaluates on the first character that's different. - // if the first character of the string you're comparing to + // if the first character of the String you're comparing to // comes first in alphanumeric order, then compareTo() is greater than 0: stringOne = "Cucumber"; stringTwo = "Cucuracha"; @@ -109,7 +109,7 @@ void loop() { delay(10000); // because the next part is a loop: - // compareTo() is handy when you've got strings with numbers in them too: + // compareTo() is handy when you've got Strings with numbers in them too: while (true) { stringOne = "Sensor: "; diff --git a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino index 1fef29c4258..f07bdc10262 100644 --- a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino +++ b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino @@ -1,7 +1,7 @@ /* String constructors - Examples of how to create strings from other data types + Examples of how to create Strings from other data types created 27 July 2010 modified 30 Aug 2011 @@ -66,11 +66,11 @@ void loop() { // prints "123456" or whatever the value of millis() is: Serial.println(stringOne); - //using a float and the right decimal places: + // using a float and the right decimal places: stringOne = String(5.698, 3); Serial.println(stringOne); - //using a float and less decimal places to use rounding: + // using a float and less decimal places to use rounding: stringOne = String(5.698, 2); Serial.println(stringOne); diff --git a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino index 584b15795d6..337399c480a 100644 --- a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino +++ b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino @@ -26,7 +26,7 @@ void setup() { void loop() { // indexOf() returns the position (i.e. index) of a particular character - // in a string. For example, if you were parsing HTML tags, you could use it: + // in a String. For example, if you were parsing HTML tags, you could use it: String stringOne = ""; int firstClosingBracket = stringOne.indexOf('>'); Serial.println("The index of > in the string " + stringOne + " is " + firstClosingBracket); diff --git a/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino b/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino index 805ac0ed548..9a36b17a182 100644 --- a/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino +++ b/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino @@ -20,7 +20,7 @@ void setup() { } // send an intro: - Serial.println("\n\nString length() and trim():"); + Serial.println("\n\nString length() and trim():"); Serial.println(); } diff --git a/build/shared/examples/08.Strings/StringReplace/StringReplace.ino b/build/shared/examples/08.Strings/StringReplace/StringReplace.ino index 960aa6af7a8..01eceee9fdf 100644 --- a/build/shared/examples/08.Strings/StringReplace/StringReplace.ino +++ b/build/shared/examples/08.Strings/StringReplace/StringReplace.ino @@ -1,7 +1,7 @@ /* String replace() - Examples of how to replace characters or substrings of a string + Examples of how to replace characters or substrings of a String created 27 July 2010 modified 2 Apr 2012 @@ -20,7 +20,7 @@ void setup() { } // send an intro: - Serial.println("\n\nString replace:\n"); + Serial.println("\n\nString replace:\n"); Serial.println(); } @@ -28,7 +28,7 @@ void loop() { String stringOne = ""; Serial.println(stringOne); // replace() changes all instances of one substring with another: - // first, make a copy of th original string: + // first, make a copy of the original string: String stringTwo = stringOne; // then perform the replacements: stringTwo.replace("<", " Servo myServo; // create a servo object @@ -34,7 +34,7 @@ void setup() { void loop() { potVal = analogRead(potPin); // read the value of the potentiometer - // print out the value to the serial monitor + // print out the value to the Serial Monitor Serial.print("potVal: "); Serial.print(potVal); diff --git a/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino b/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino index f0c8c2570f5..aac0c1742a2 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino @@ -1,6 +1,6 @@ /* Arduino Starter Kit example - Project 6 - Light Theremin + Project 6 - Light Theremin This sketch is written to accompany Project 6 in the Arduino Starter Kit diff --git a/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino b/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino index ba913f25c2d..ebbf85e4fef 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino @@ -1,6 +1,6 @@ /* Arduino Starter Kit example - Project 7 - Keyboard + Project 7 - Keyboard This sketch is written to accompany Project 7 in the Arduino Starter Kit diff --git a/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino b/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino index 932d737f713..4d6eda450d5 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino @@ -1,6 +1,6 @@ /* Arduino Starter Kit example - Project 8 - Digital Hourglass + Project 8 - Digital Hourglass This sketch is written to accompany Project 8 in the Arduino Starter Kit diff --git a/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino b/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino index 3c89a6ae40d..c61ce0ea18b 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino @@ -1,6 +1,6 @@ /* Arduino Starter Kit example - Project 9 - Motorized Pinwheel + Project 9 - Motorized Pinwheel This sketch is written to accompany Project 9 in the Arduino Starter Kit diff --git a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino index 44d13ba637b..e5c7622afae 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino @@ -1,6 +1,6 @@ /* Arduino Starter Kit example - Project 10 - Zoetrope + Project 10 - Zoetrope This sketch is written to accompany Project 10 in the Arduino Starter Kit @@ -30,7 +30,7 @@ const int onOffSwitchStateSwitchPin = 5; // connected to the switch for turning const int potPin = A0; // connected to the potentiometer's output // create some variables to hold values from your inputs -int onOffSwitchState = 0; // current state of the On/Off switch +int onOffSwitchState = 0; // current state of the on/off switch int previousOnOffSwitchState = 0; // previous position of the on/off switch int directionSwitchState = 0; // current state of the direction switch int previousDirectionSwitchState = 0; // previous state of the direction switch @@ -40,7 +40,7 @@ int motorSpeed = 0; // speed of the motor int motorDirection = 1; // current direction of the motor void setup() { - // intialize the inputs and outputs + // initialize the inputs and outputs pinMode(directionSwitchPin, INPUT); pinMode(onOffSwitchStateSwitchPin, INPUT); pinMode(controlPin1, OUTPUT); @@ -97,7 +97,7 @@ void loop() { //turn the motor off analogWrite(enablePin, 0); } - // save the current On/Offswitch state as the previous + // save the current on/off switch state as the previous previousDirectionSwitchState = directionSwitchState; // save the current switch state as the previous previousOnOffSwitchState = onOffSwitchState; diff --git a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino index f17249be6bc..30b71b96f03 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino @@ -1,6 +1,6 @@ /* Arduino Starter Kit example - Project 11 - Crystal Ball + Project 11 - Crystal Ball This sketch is written to accompany Project 11 in the Arduino Starter Kit @@ -27,13 +27,13 @@ // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); -// set up a constant for the tilt switchPin +// set up a constant for the tilt switch pin const int switchPin = 6; -// variable to hold the value of the switchPin +// variable to hold the value of the switch pin int switchState = 0; -// variable to hold previous value of the switchpin +// variable to hold previous value of the switch pin int prevSwitchState = 0; // a variable to choose which reply from the crystal ball @@ -76,7 +76,7 @@ void loop() { // move the cursor to the second line lcd.setCursor(0, 1); - // choose a saying to print baed on the value in reply + // choose a saying to print based on the value in reply switch (reply) { case 0: lcd.print("Yes"); diff --git a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino index a1bb7e72321..5ab6d8c39e8 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino @@ -1,6 +1,6 @@ /* Arduino Starter Kit example - Project 12 - Knock Lock + Project 12 - Knock Lock This sketch is written to accompany Project 12 in the Arduino Starter Kit @@ -28,7 +28,7 @@ // import the library #include -// create an instance of the servo library +// create an instance of the Servo library Servo myServo; const int piezo = A0; // pin the piezo is attached to @@ -72,7 +72,7 @@ void setup() { // move the servo to the unlocked position myServo.write(0); - // print status to the serial monitor + // print status to the Serial Monitor Serial.println("the box is unlocked!"); } diff --git a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino index 64e3d22ad7b..9388c5870bf 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino @@ -1,6 +1,6 @@ /* Arduino Starter Kit example - Project 13 - Touch Sensor Lamp + Project 13 - Touch Sensor Lamp This sketch is written to accompany Project 13 in the Arduino Starter Kit diff --git a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino index 2173f6eec7f..38741fb9a67 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino @@ -1,6 +1,6 @@ /* Arduino Starter Kit example - Project 14 - Tweak the Arduino Logo + Project 14 - Tweak the Arduino Logo This sketch is written to accompany Project 14 in the Arduino Starter Kit @@ -9,8 +9,8 @@ 10 kilohm potentiometer Software required : - Processing (3.0 or newer) http://processing.org - Active internet connection + Processing (3.0 or newer) http://processing.org + Active Internet connection Created 18 September 2012 by Scott Fitzgerald @@ -34,7 +34,7 @@ void loop() { } /* Processing code for this example -// Tweak the Arduno Logo +// Tweak the Arduino Logo // by Scott Fitzgerald // This example code is in the public domain @@ -63,12 +63,12 @@ void setup() { surface.setSize(logo.width, logo.height); // print a list of available serial ports to the - // Processing staus window + // Processing status window println("Available serial ports:"); println(Serial.list()); // Tell the serial object the information it needs to communicate - // with the Arduno. Change Serial.list()[0] to the correct + // with the Arduino. Change Serial.list()[0] to the correct // port corresponding to your Arduino board. The last // parameter (e.g. 9600) is the speed of the communication. It // has to correspond to the value passed to Serial.begin() in your diff --git a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino index 73d52234bc8..a5f398ac5ed 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino @@ -1,12 +1,12 @@ /* Arduino Starter Kit example - Project 15 - Hacking Buttons + Project 15 - Hacking Buttons This sketch is written to accompany Project 15 in the Arduino Starter Kit Parts required: - batery powered component + battery powered component 220 ohm resistor 4N35 optocoupler diff --git a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino index d4fd37ea5cc..bdb249c6ea4 100644 --- a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino +++ b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino @@ -4,11 +4,11 @@ // http://www.opensource.org/licenses/bsd-license.php // // This sketch turns the Arduino into a AVRISP -// using the following arduino pins: +// using the following Arduino pins: // // Pin 10 is used to reset the target microcontroller. // -// By default, the hardware SPI pins MISO, MOSI and SCK pins are used +// By default, the hardware SPI pins MISO, MOSI and SCK are used // to communicate with the target. On all Arduinos, these pins can be found // on the ICSP/SPI header: // @@ -20,7 +20,7 @@ // as digital pin 11, 12 and 13, respectively. That is why many tutorials // instruct you to hook up the target to these pins. If you find this wiring // more practical, have a define USE_OLD_STYLE_WIRING. This will work even -// even when not using an Uno. (On an Uno this is not needed). +// when not using an Uno. (On an Uno this is not needed). // // Alternatively you can use any other digital pin by configuring software ('BitBanged') // SPI and having appropriate defines for PIN_MOSI, PIN_MISO and PIN_SCK. @@ -43,18 +43,18 @@ #define PROG_FLICKER true // Configure SPI clock (in Hz). -// E.g. for an attiny @128 kHz: the datasheet states that both the high -// and low spi clock pulse must be > 2 cpu cycles, so take 3 cycles i.e. +// E.g. for an ATtiny @ 128 kHz: the datasheet states that both the high +// and low SPI clock pulse must be > 2 CPU cycles, so take 3 cycles i.e. // divide target f_cpu by 6: // #define SPI_CLOCK (128000/6) // -// A clock slow enough for an attiny85 @ 1MHz, is a reasonable default: +// A clock slow enough for an ATtiny85 @ 1 MHz, is a reasonable default: #define SPI_CLOCK (1000000/6) // Select hardware or software SPI, depending on SPI clock. -// Currently only for AVR, for other archs (Due, Zero,...), +// Currently only for AVR, for other architectures (Due, Zero,...), // hardware SPI is probably too fast anyway. #if defined(ARDUINO_ARCH_AVR) @@ -88,7 +88,7 @@ #endif -// HOODLOADER2 means running sketches on the atmega16u2 +// HOODLOADER2 means running sketches on the ATmega16U2 // serial converter chips on Uno or Mega boards. // We must use pins that are broken out: #else @@ -371,7 +371,7 @@ void get_version(uint8_t c) { } void set_parameters() { - // call this after reading paramter packet into buff[] + // call this after reading parameter packet into buff[] param.devicecode = buff[0]; param.revision = buff[1]; param.progtype = buff[2]; @@ -393,7 +393,7 @@ void set_parameters() { + buff[18] * 0x00000100 + buff[19]; - // avr devices have active low reset, at89sx are active high + // AVR devices have active low reset, AT89Sx are active high rst_active_high = (param.devicecode >= 0xe0); } @@ -404,7 +404,7 @@ void start_pmode() { // SPI.begin() will configure SS as output, // so SPI master mode is selected. // We have defined RESET as pin 10, - // which for many arduino's is not the SS pin. + // which for many Arduinos is not the SS pin. // So we have to configure RESET as output here, // (reset_target() first sets the correct level) reset_target(true); @@ -412,14 +412,14 @@ void start_pmode() { SPI.begin(); SPI.beginTransaction(SPISettings(SPI_CLOCK, MSBFIRST, SPI_MODE0)); - // See avr datasheets, chapter "SERIAL_PRG Programming Algorithm": + // See AVR datasheets, chapter "SERIAL_PRG Programming Algorithm": // Pulse RESET after PIN_SCK is low: digitalWrite(PIN_SCK, LOW); - delay(20); // discharge PIN_SCK, value arbitrally chosen + delay(20); // discharge PIN_SCK, value arbitrarily chosen reset_target(false); // Pulse must be minimum 2 target CPU clock cycles - // so 100 usec is ok for CPU speeds above 20KHz + // so 100 usec is ok for CPU speeds above 20 KHz delayMicroseconds(100); reset_target(true); From 12eba82a0fa774a9825e31ead12d09e9135562f8 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 12 Jul 2017 11:29:47 -0700 Subject: [PATCH 02/11] Fix typos in .txt files included with built-in examples --- build/shared/examples/01.Basics/Fade/Fade.txt | 2 +- .../examples/05.Control/ForLoopIteration/ForLoopIteration.txt | 2 +- build/shared/examples/06.Sensors/Memsic2125/Memsic2125.txt | 2 +- .../StringAdditionOperator/StringAdditionOperator.txt | 2 +- .../examples/08.Strings/StringCaseChanges/StringCaseChanges.txt | 2 +- .../examples/08.Strings/StringCharacters/StringCharacters.txt | 2 +- .../StringComparisonOperators/StringComparisonOperators.txt | 2 +- .../08.Strings/StringConstructors/StringConstructors.txt | 2 +- .../shared/examples/08.Strings/StringIndexOf/StringIndexOf.txt | 2 +- build/shared/examples/08.Strings/StringLength/StringLength.txt | 2 +- .../examples/08.Strings/StringLengthTrim/StringLengthTrim.txt | 2 +- .../shared/examples/08.Strings/StringReplace/StringReplace.txt | 2 +- .../StringStartsWithEndsWith/StringStartsWithEndsWith.txt | 2 +- .../examples/08.Strings/StringSubstring/StringSubstring.txt | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build/shared/examples/01.Basics/Fade/Fade.txt b/build/shared/examples/01.Basics/Fade/Fade.txt index 32d4d28900a..d196b43fa41 100644 --- a/build/shared/examples/01.Basics/Fade/Fade.txt +++ b/build/shared/examples/01.Basics/Fade/Fade.txt @@ -1 +1 @@ -Demonstrates the use of analog output to fade an LED. \ No newline at end of file +Demonstrates the use of analogWrite() to fade an LED. \ No newline at end of file diff --git a/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.txt b/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.txt index 8c6a729f930..fcc65b42c15 100644 --- a/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.txt +++ b/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.txt @@ -1 +1 @@ -Controlling multiple LEDs with a for loop and. \ No newline at end of file +Controlling multiple LEDs with a for loop. \ No newline at end of file diff --git a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.txt b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.txt index 04bd5ece63b..003eb39107b 100644 --- a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.txt +++ b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.txt @@ -1 +1 @@ -Two-axis acceleromoter. \ No newline at end of file +Two-axis accelerometer. \ No newline at end of file diff --git a/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.txt b/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.txt index c93c9f83a5e..94d8f649170 100644 --- a/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.txt +++ b/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.txt @@ -1 +1 @@ -Add strings together in a variety of ways. \ No newline at end of file +Add Strings together in a variety of ways. \ No newline at end of file diff --git a/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.txt b/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.txt index 75d11af3f98..c0c0e4a9ed0 100644 --- a/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.txt +++ b/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.txt @@ -1 +1 @@ -Change the case of a string. \ No newline at end of file +Change the case of a String. \ No newline at end of file diff --git a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.txt b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.txt index d43da1f0289..a1bcb85563f 100644 --- a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.txt +++ b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.txt @@ -1 +1 @@ -Get/set the value of a specific character in a string. \ No newline at end of file +Get/set the value of a specific character in a String. \ No newline at end of file diff --git a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.txt b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.txt index aa622c764b4..95cf1c794e8 100644 --- a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.txt +++ b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.txt @@ -1 +1 @@ -Compare strings alphabetically. \ No newline at end of file +Compare Strings alphabetically. \ No newline at end of file diff --git a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.txt b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.txt index 777082fb710..d58dface816 100644 --- a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.txt +++ b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.txt @@ -1 +1 @@ -How to initialize string objects. \ No newline at end of file +How to initialize String objects. \ No newline at end of file diff --git a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.txt b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.txt index cd972295372..d7f6d8d69bc 100644 --- a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.txt +++ b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.txt @@ -1 +1 @@ -Look for the first/last instance of a character in a string. \ No newline at end of file +Look for the first/last instance of a character in a String. \ No newline at end of file diff --git a/build/shared/examples/08.Strings/StringLength/StringLength.txt b/build/shared/examples/08.Strings/StringLength/StringLength.txt index 862d0476e2f..7ffb9c31283 100644 --- a/build/shared/examples/08.Strings/StringLength/StringLength.txt +++ b/build/shared/examples/08.Strings/StringLength/StringLength.txt @@ -1 +1 @@ -Get and trim the length of a string. \ No newline at end of file +Examples of how to use length() in a String. \ No newline at end of file diff --git a/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.txt b/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.txt index 862d0476e2f..43dcaa984db 100644 --- a/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.txt +++ b/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.txt @@ -1 +1 @@ -Get and trim the length of a string. \ No newline at end of file +Get and trim the length of a String. \ No newline at end of file diff --git a/build/shared/examples/08.Strings/StringReplace/StringReplace.txt b/build/shared/examples/08.Strings/StringReplace/StringReplace.txt index f4034a7566f..75c7ce4c91f 100644 --- a/build/shared/examples/08.Strings/StringReplace/StringReplace.txt +++ b/build/shared/examples/08.Strings/StringReplace/StringReplace.txt @@ -1 +1 @@ -Replace individual characters in a string. \ No newline at end of file +Replace individual characters in a String. \ No newline at end of file diff --git a/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.txt b/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.txt index dac7903a96b..80630ce7a65 100644 --- a/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.txt +++ b/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.txt @@ -1 +1 @@ -Check which characters/substrings a given string starts or ends with. \ No newline at end of file +Check which characters/substrings a given String starts or ends with. \ No newline at end of file diff --git a/build/shared/examples/08.Strings/StringSubstring/StringSubstring.txt b/build/shared/examples/08.Strings/StringSubstring/StringSubstring.txt index 357db4d0564..ef88bc3002d 100644 --- a/build/shared/examples/08.Strings/StringSubstring/StringSubstring.txt +++ b/build/shared/examples/08.Strings/StringSubstring/StringSubstring.txt @@ -1 +1 @@ -Look for "phrases" within a given string. \ No newline at end of file +Look for "phrases" within a given String. \ No newline at end of file From 7a5b612beca85cf3d422c2bdc57fe5154de97e79 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 12 Jul 2017 12:00:32 -0700 Subject: [PATCH 03/11] Maintain a consistent number of newlines at end of built-in examples A single newline at the end of the examples was most common so I fixed all examples that did not follow this convention. --- .../01.Basics/DigitalReadSerial/DigitalReadSerial.ino | 3 --- .../02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino | 1 - build/shared/examples/02.Digital/Button/Button.ino | 2 +- build/shared/examples/02.Digital/Debounce/Debounce.ino | 1 - .../02.Digital/DigitalInputPullup/DigitalInputPullup.ino | 3 --- .../StateChangeDetection/StateChangeDetection.ino | 9 --------- .../02.Digital/tonePitchFollower/tonePitchFollower.ino | 6 ------ .../examples/03.Analog/AnalogInput/AnalogInput.ino | 2 +- build/shared/examples/03.Analog/Fading/Fading.ino | 2 -- build/shared/examples/03.Analog/Smoothing/Smoothing.ino | 2 -- build/shared/examples/04.Communication/Midi/Midi.ino | 1 - .../04.Communication/ReadASCIIString/ReadASCIIString.ino | 8 -------- .../04.Communication/SerialEvent/SerialEvent.ino | 2 -- .../IfStatementConditional/IfStatementConditional.ino | 1 - .../WhileStatementConditional.ino | 2 -- .../shared/examples/05.Control/switchCase/switchCase.ino | 5 ----- .../examples/05.Control/switchCase2/switchCase2.ino | 1 - build/shared/examples/06.Sensors/Knock/Knock.ino | 1 - build/shared/examples/07.Display/barGraph/barGraph.ino | 3 --- .../StringAppendOperator/StringAppendOperator.ino | 1 - .../08.Strings/StringCharacters/StringCharacters.ino | 1 - .../examples/08.Strings/StringIndexOf/StringIndexOf.ino | 1 - .../examples/08.Strings/StringToInt/StringToInt.ino | 1 - .../09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino | 8 -------- .../09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino | 1 - .../Keyboard/KeyboardReprogram/KeyboardReprogram.ino | 7 ------- .../09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino | 1 - .../KeyboardAndMouseControl/KeyboardAndMouseControl.ino | 1 - .../Mouse/JoystickMouseControl/JoystickMouseControl.ino | 3 --- .../p02_SpaceshipInterface/p02_SpaceshipInterface.ino | 1 - .../p04_ColorMixingLamp/p04_ColorMixingLamp.ino | 1 - .../p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino | 2 -- .../p06_LightTheremin/p06_LightTheremin.ino | 1 - .../10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino | 1 - .../10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino | 4 ---- .../p11_CrystalBall/p11_CrystalBall.ino | 1 - .../p12_KnockLock/p12_KnockLock.ino | 1 - .../p13_TouchSensorLamp/p13_TouchSensorLamp.ino | 3 --- .../p15_HackingButtons/p15_HackingButtons.ino | 2 -- .../examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino | 1 - 40 files changed, 2 insertions(+), 96 deletions(-) diff --git a/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino b/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino index 3e207b2a55f..0134a048522 100644 --- a/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino +++ b/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino @@ -24,6 +24,3 @@ void loop() { Serial.println(buttonState); delay(1); // delay in between reads for stability } - - - diff --git a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino index 4aa91e85d11..16ada7ed2f5 100644 --- a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino +++ b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino @@ -69,4 +69,3 @@ void loop() { digitalWrite(ledPin, ledState); } } - diff --git a/build/shared/examples/02.Digital/Button/Button.ino b/build/shared/examples/02.Digital/Button/Button.ino index 33cc454f484..ff0d8220257 100644 --- a/build/shared/examples/02.Digital/Button/Button.ino +++ b/build/shared/examples/02.Digital/Button/Button.ino @@ -52,4 +52,4 @@ void loop() { // turn LED off: digitalWrite(ledPin, LOW); } -} \ No newline at end of file +} diff --git a/build/shared/examples/02.Digital/Debounce/Debounce.ino b/build/shared/examples/02.Digital/Debounce/Debounce.ino index 703b09d6938..9c7eb95b66f 100644 --- a/build/shared/examples/02.Digital/Debounce/Debounce.ino +++ b/build/shared/examples/02.Digital/Debounce/Debounce.ino @@ -89,4 +89,3 @@ void loop() { // it'll be the lastButtonState: lastButtonState = reading; } - diff --git a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino index aa0b6357bc8..9a30509fce4 100644 --- a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino +++ b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino @@ -46,6 +46,3 @@ void loop() { digitalWrite(13, HIGH); } } - - - diff --git a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino index 93012ea40c4..46afd0d51f6 100644 --- a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino +++ b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino @@ -82,12 +82,3 @@ void loop() { } } - - - - - - - - - diff --git a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino index 28c780d89a8..f3c934a23ba 100644 --- a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino +++ b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino @@ -39,9 +39,3 @@ void loop() { tone(9, thisPitch, 10); delay(1); // delay in between reads for stability } - - - - - - diff --git a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino index 049ec11b818..aff69aa9028 100644 --- a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino +++ b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino @@ -47,4 +47,4 @@ void loop() { digitalWrite(ledPin, LOW); // stop the program for for milliseconds: delay(sensorValue); -} \ No newline at end of file +} diff --git a/build/shared/examples/03.Analog/Fading/Fading.ino b/build/shared/examples/03.Analog/Fading/Fading.ino index f02069e0c2f..578bb4881ae 100644 --- a/build/shared/examples/03.Analog/Fading/Fading.ino +++ b/build/shared/examples/03.Analog/Fading/Fading.ino @@ -41,5 +41,3 @@ void loop() { delay(30); } } - - diff --git a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino index 23f30dc4b65..131a21c7df6 100644 --- a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino +++ b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino @@ -65,5 +65,3 @@ void loop() { Serial.println(average); delay(1); // delay in between reads for stability } - - diff --git a/build/shared/examples/04.Communication/Midi/Midi.ino b/build/shared/examples/04.Communication/Midi/Midi.ino index d53295746bd..5f796d681e5 100644 --- a/build/shared/examples/04.Communication/Midi/Midi.ino +++ b/build/shared/examples/04.Communication/Midi/Midi.ino @@ -46,4 +46,3 @@ void noteOn(int cmd, int pitch, int velocity) { Serial.write(pitch); Serial.write(velocity); } - diff --git a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino index 074c9c78976..513f515ae95 100644 --- a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino +++ b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino @@ -67,11 +67,3 @@ void loop() { } } } - - - - - - - - diff --git a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino index 110d18cedad..4bcb68bd707 100644 --- a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino +++ b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino @@ -59,5 +59,3 @@ void serialEvent() { } } } - - diff --git a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino index d9a4acf3eff..0842d374710 100644 --- a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino +++ b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino @@ -52,4 +52,3 @@ void loop() { Serial.println(analogValue); delay(1); // delay in between reads for stability } - diff --git a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino index f5ee46da485..bb5ff7b89e4 100644 --- a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino +++ b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino @@ -86,5 +86,3 @@ void calibrate() { sensorMin = sensorValue; } } - - diff --git a/build/shared/examples/05.Control/switchCase/switchCase.ino b/build/shared/examples/05.Control/switchCase/switchCase.ino index 67dfe0c17df..2ac47d6f49e 100644 --- a/build/shared/examples/05.Control/switchCase/switchCase.ino +++ b/build/shared/examples/05.Control/switchCase/switchCase.ino @@ -56,8 +56,3 @@ void loop() { } delay(1); // delay in between reads for stability } - - - - - diff --git a/build/shared/examples/05.Control/switchCase2/switchCase2.ino b/build/shared/examples/05.Control/switchCase2/switchCase2.ino index b600155e85a..f52d8bdc1ca 100644 --- a/build/shared/examples/05.Control/switchCase2/switchCase2.ino +++ b/build/shared/examples/05.Control/switchCase2/switchCase2.ino @@ -63,4 +63,3 @@ void loop() { } } } - diff --git a/build/shared/examples/06.Sensors/Knock/Knock.ino b/build/shared/examples/06.Sensors/Knock/Knock.ino index 7498bda729c..e47c5842676 100644 --- a/build/shared/examples/06.Sensors/Knock/Knock.ino +++ b/build/shared/examples/06.Sensors/Knock/Knock.ino @@ -52,4 +52,3 @@ void loop() { } delay(100); // delay to avoid overloading the serial port buffer } - diff --git a/build/shared/examples/07.Display/barGraph/barGraph.ino b/build/shared/examples/07.Display/barGraph/barGraph.ino index 2de75b8a4aa..3f7d5847e1e 100644 --- a/build/shared/examples/07.Display/barGraph/barGraph.ino +++ b/build/shared/examples/07.Display/barGraph/barGraph.ino @@ -56,6 +56,3 @@ void loop() { } } } - - - diff --git a/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino b/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino index 04179414de9..36d5ffd3615 100644 --- a/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino +++ b/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino @@ -70,4 +70,3 @@ void loop() { // do nothing while true: while (true); } - diff --git a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino index a7072a2f365..b52fa57193c 100644 --- a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino +++ b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino @@ -43,4 +43,3 @@ void loop() { // do nothing while true: while (true); } - diff --git a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino index 337399c480a..7071e73556b 100644 --- a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino +++ b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino @@ -63,4 +63,3 @@ void loop() { // do nothing while true: while (true); } - diff --git a/build/shared/examples/08.Strings/StringToInt/StringToInt.ino b/build/shared/examples/08.Strings/StringToInt/StringToInt.ino index f05c5632513..7b3a2567ae8 100644 --- a/build/shared/examples/08.Strings/StringToInt/StringToInt.ino +++ b/build/shared/examples/08.Strings/StringToInt/StringToInt.ino @@ -48,4 +48,3 @@ void loop() { } } } - diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino index 7b95cae3abd..621644b2caa 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino @@ -88,11 +88,3 @@ void loop() { // do nothing: while (true); } - - - - - - - - diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino b/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino index d0022c4fadb..87a0f03834f 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino @@ -50,4 +50,3 @@ void loop() { // save the current button state for comparison next time: previousButtonState = buttonState; } - diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino index 24d1d6f566d..ce96ed5490d 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino @@ -105,10 +105,3 @@ void loop() { // wait for the sweet oblivion of reprogramming: while (true); } - - - - - - - diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino b/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino index a3310f7cc84..7f47a954d20 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino @@ -37,4 +37,3 @@ void loop() { Keyboard.write(inChar + 1); } } - diff --git a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino index f14df1d0fa9..67cfd7af951 100644 --- a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino +++ b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino @@ -91,4 +91,3 @@ void loop() { } } - diff --git a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino index 8eaa5887227..a836655e21a 100644 --- a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino @@ -118,6 +118,3 @@ int readAxis(int thisAxis) { // return the distance for this axis: return distance; } - - - diff --git a/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino b/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino index 9751cb3994c..11d458d2247 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino @@ -65,4 +65,3 @@ void loop() { delay(250); } } - diff --git a/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino b/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino index fd0ca83714b..e80b74a6e88 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino @@ -95,4 +95,3 @@ void loop() { analogWrite(greenLEDPin, greenValue); analogWrite(blueLEDPin, blueValue); } - diff --git a/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino b/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino index f65bae14f73..c7e2eeabec7 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino @@ -51,5 +51,3 @@ void loop() { // wait for the servo to get there delay(15); } - - diff --git a/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino b/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino index aac0c1742a2..e61de6d5b68 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino @@ -61,4 +61,3 @@ void loop() { // wait for a moment delay(10); } - diff --git a/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino b/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino index ebbf85e4fef..48d9877b170 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino @@ -54,4 +54,3 @@ void loop() { noTone(8); } } - diff --git a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino index e5c7622afae..d12c3b995a7 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino @@ -102,7 +102,3 @@ void loop() { // save the current switch state as the previous previousOnOffSwitchState = onOffSwitchState; } - - - - diff --git a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino index 30b71b96f03..e905b640b7b 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino @@ -115,4 +115,3 @@ void loop() { // save the current switch state as the last state prevSwitchState = switchState; } - diff --git a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino index 5ab6d8c39e8..70154d2288d 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino @@ -171,4 +171,3 @@ boolean checkForKnock(int value) { return false; } } - diff --git a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino index 9388c5870bf..bfa7633aeb3 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino @@ -66,6 +66,3 @@ void loop() { delay(10); } - - - diff --git a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino index a5f398ac5ed..a7292831cdd 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino @@ -33,5 +33,3 @@ void loop() { digitalWrite(optoPin, LOW); // pull pin 2 low until you're ready to activate again delay(21000); // wait for 21 seconds } - - diff --git a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino index bdb249c6ea4..bc0739bc5d0 100644 --- a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino +++ b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino @@ -722,4 +722,3 @@ void avrisp() { SERIAL.print((char)STK_NOSYNC); } } - From e91d51ac302afede3fec6a5aef59536ee22c403a Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 12 Jul 2017 12:30:49 -0700 Subject: [PATCH 04/11] Use Auto Format compatible bullet character in built-in example comment lists Tools > Auto Format in the Arduino IDE removes asterisks from the start of every line in a C style comment, causing that character to be unsuitable for use as a bullet for lists in the example comments. --- .../BlinkWithoutDelay/BlinkWithoutDelay.ino | 4 ++-- .../shared/examples/02.Digital/Button/Button.ino | 8 ++++---- .../examples/02.Digital/Debounce/Debounce.ino | 8 ++++---- .../DigitalInputPullup/DigitalInputPullup.ino | 4 ++-- .../StateChangeDetection.ino | 6 +++--- .../02.Digital/toneKeyboard/toneKeyboard.ino | 6 +++--- .../02.Digital/toneMelody/toneMelody.ino | 2 +- .../02.Digital/toneMultiple/toneMultiple.ino | 2 +- .../tonePitchFollower/tonePitchFollower.ino | 6 +++--- .../AnalogInOutSerial/AnalogInOutSerial.ino | 4 ++-- .../03.Analog/AnalogInput/AnalogInput.ino | 16 ++++++++-------- .../AnalogWriteMega/AnalogWriteMega.ino | 2 +- .../03.Analog/Calibration/Calibration.ino | 4 ++-- .../shared/examples/03.Analog/Fading/Fading.ino | 2 +- .../examples/03.Analog/Smoothing/Smoothing.ino | 2 +- .../04.Communication/ASCIITable/ASCIITable.ino | 4 ++-- .../examples/04.Communication/Midi/Midi.ino | 6 +++--- .../04.Communication/MultiSerial/MultiSerial.ino | 4 ++-- .../PhysicalPixel/PhysicalPixel.ino | 2 +- .../ReadASCIIString/ReadASCIIString.ino | 8 ++++---- .../SerialCallResponse/SerialCallResponse.ino | 4 ++-- .../SerialCallResponseASCII.ino | 4 ++-- .../VirtualColorMixer/VirtualColorMixer.ino | 2 +- .../shared/examples/05.Control/Arrays/Arrays.ino | 2 +- .../ForLoopIteration/ForLoopIteration.ino | 2 +- .../IfStatementConditional.ino | 6 +++--- .../WhileStatementConditional.ino | 10 +++++----- .../05.Control/switchCase/switchCase.ino | 4 ++-- .../05.Control/switchCase2/switchCase2.ino | 2 +- build/shared/examples/06.Sensors/Knock/Knock.ino | 6 +++--- .../06.Sensors/Memsic2125/Memsic2125.ino | 8 ++++---- build/shared/examples/06.Sensors/Ping/Ping.ino | 6 +++--- .../RowColumnScanning/RowColumnScanning.ino | 8 ++++---- .../examples/07.Display/barGraph/barGraph.ino | 2 +- .../Keyboard/KeyboardLogout/KeyboardLogout.ino | 4 ++-- .../Keyboard/KeyboardMessage/KeyboardMessage.ino | 4 ++-- .../KeyboardReprogram/KeyboardReprogram.ino | 4 ++-- .../Keyboard/KeyboardSerial/KeyboardSerial.ino | 2 +- .../KeyboardAndMouseControl.ino | 2 +- .../ButtonMouseControl/ButtonMouseControl.ino | 2 +- .../JoystickMouseControl.ino | 4 ++-- 41 files changed, 94 insertions(+), 94 deletions(-) diff --git a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino index 16ada7ed2f5..cad73cf9868 100644 --- a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino +++ b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino @@ -5,8 +5,8 @@ can run at the same time without being interrupted by the LED code. The circuit: - * Use the onboard LED. - * Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO + - Use the onboard LED. + - Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used. If you want to know what pin the on-board LED is connected to on your Arduino model, check diff --git a/build/shared/examples/02.Digital/Button/Button.ino b/build/shared/examples/02.Digital/Button/Button.ino index ff0d8220257..04441c9128d 100644 --- a/build/shared/examples/02.Digital/Button/Button.ino +++ b/build/shared/examples/02.Digital/Button/Button.ino @@ -6,11 +6,11 @@ The circuit: - * LED attached from pin 13 to ground - * pushbutton attached to pin 2 from +5V - * 10K resistor attached to pin 2 from ground + - LED attached from pin 13 to ground + - pushbutton attached to pin 2 from +5V + - 10K resistor attached to pin 2 from ground - * Note: on most Arduinos there is already an LED on the board + - Note: on most Arduinos there is already an LED on the board attached to pin 13. diff --git a/build/shared/examples/02.Digital/Debounce/Debounce.ino b/build/shared/examples/02.Digital/Debounce/Debounce.ino index 9c7eb95b66f..a62815acafd 100644 --- a/build/shared/examples/02.Digital/Debounce/Debounce.ino +++ b/build/shared/examples/02.Digital/Debounce/Debounce.ino @@ -7,11 +7,11 @@ noise). The circuit: - * LED attached from pin 13 to ground - * pushbutton attached from pin 2 to +5V - * 10K resistor attached from pin 2 to ground + - LED attached from pin 13 to ground + - pushbutton attached from pin 2 to +5V + - 10K resistor attached from pin 2 to ground - * Note: On most Arduino boards, there is already an LED on the board + - Note: On most Arduino boards, there is already an LED on the board connected to pin 13, so you don't need any extra components for this example. diff --git a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino index 9a30509fce4..82a723bb507 100644 --- a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino +++ b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino @@ -5,8 +5,8 @@ digital input on pin 2 and prints the results to the Serial Monitor. The circuit: - * Momentary switch attached from pin 2 to ground - * Built-in LED on pin 13 + - Momentary switch attached from pin 2 to ground + - Built-in LED on pin 13 Unlike pinMode(INPUT), there is no pull-down resistor necessary. An internal 20K-ohm resistor is pulled to 5V. This configuration causes the input to diff --git a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino index 46afd0d51f6..a02f3ec54f5 100644 --- a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino +++ b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino @@ -10,9 +10,9 @@ and on to off. The circuit: - * pushbutton attached to pin 2 from +5V - * 10K resistor attached to pin 2 from ground - * LED attached from pin 13 to ground (or use the built-in LED on + - pushbutton attached to pin 2 from +5V + - 10K resistor attached to pin 2 from ground + - LED attached from pin 13 to ground (or use the built-in LED on most Arduino boards) created 27 Sep 2005 diff --git a/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino b/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino index 1a9c9685ca9..a2b38847dcf 100644 --- a/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino +++ b/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino @@ -4,9 +4,9 @@ Plays a pitch that changes based on a changing analog input circuit: - * 3 force-sensing resistors from +5V to analog in 0 through 5 - * 3 10K resistors from analog in 0 through 5 to ground - * 8-ohm speaker on digital pin 8 + - 3 force-sensing resistors from +5V to analog in 0 through 5 + - 3 10K resistors from analog in 0 through 5 to ground + - 8-ohm speaker on digital pin 8 created 21 Jan 2010 modified 9 Apr 2012 diff --git a/build/shared/examples/02.Digital/toneMelody/toneMelody.ino b/build/shared/examples/02.Digital/toneMelody/toneMelody.ino index 9aa81589c52..8839e52909f 100644 --- a/build/shared/examples/02.Digital/toneMelody/toneMelody.ino +++ b/build/shared/examples/02.Digital/toneMelody/toneMelody.ino @@ -4,7 +4,7 @@ Plays a melody circuit: - * 8-ohm speaker on digital pin 8 + - 8-ohm speaker on digital pin 8 created 21 Jan 2010 modified 30 Aug 2011 diff --git a/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino b/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino index a95ad1c88e1..70fd5ca08bf 100644 --- a/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino +++ b/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino @@ -4,7 +4,7 @@ Plays multiple tones on multiple pins in sequence circuit: - * 3 8-ohm speaker on digital pins 6, 7, and 8 + - 3 8-ohm speaker on digital pins 6, 7, and 8 created 8 March 2010 by Tom Igoe diff --git a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino index f3c934a23ba..f39a9d5ff41 100644 --- a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino +++ b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino @@ -4,9 +4,9 @@ Plays a pitch that changes based on a changing analog input circuit: - * 8-ohm speaker on digital pin 9 - * photoresistor on analog 0 to 5V - * 4.7K resistor on analog 0 to ground + - 8-ohm speaker on digital pin 9 + - photoresistor on analog 0 to 5V + - 4.7K resistor on analog 0 to ground created 21 Jan 2010 modified 31 May 2012 diff --git a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino index 206691ede2e..7c28781a218 100644 --- a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino +++ b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino @@ -6,10 +6,10 @@ Also prints the results to the Serial Monitor. The circuit: - * potentiometer connected to analog pin 0. + - potentiometer connected to analog pin 0. Center pin of the potentiometer goes to the analog pin. side pins of the potentiometer go to +5V and ground - * LED connected from digital pin 9 to ground + - LED connected from digital pin 9 to ground created 29 Dec. 2008 modified 9 Apr 2012 diff --git a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino index aff69aa9028..1b4be2dcaea 100644 --- a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino +++ b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino @@ -6,14 +6,14 @@ the value obtained by analogRead(). The circuit: - * Potentiometer attached to analog input 0 - * center pin of the potentiometer to the analog pin - * one side pin (either one) to ground - * the other side pin to +5V - * LED anode (long leg) attached to digital output 13 - * LED cathode (short leg) attached to ground - - * Note: because most Arduinos have a built-in LED attached + - Potentiometer attached to analog input 0 + - center pin of the potentiometer to the analog pin + - one side pin (either one) to ground + - the other side pin to +5V + - LED anode (long leg) attached to digital output 13 + - LED cathode (short leg) attached to ground + + - Note: because most Arduinos have a built-in LED attached to pin 13 on the board, the LED is optional. diff --git a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino index 3c90463faba..ce2c5977746 100644 --- a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino +++ b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino @@ -5,7 +5,7 @@ This sketch was written for the Arduino Mega, and will not work on other boards. The circuit: - * LEDs attached from pins 2 through 13 to ground. + - LEDs attached from pins 2 through 13 to ground. created 8 Feb 2009 by Tom Igoe diff --git a/build/shared/examples/03.Analog/Calibration/Calibration.ino b/build/shared/examples/03.Analog/Calibration/Calibration.ino index 7c83174e2af..e32cff307b9 100644 --- a/build/shared/examples/03.Analog/Calibration/Calibration.ino +++ b/build/shared/examples/03.Analog/Calibration/Calibration.ino @@ -12,8 +12,8 @@ maximum low and listen for anything higher as the new maximum. The circuit: - * Analog sensor (potentiometer will do) attached to analog input 0 - * LED attached from digital pin 9 to ground + - Analog sensor (potentiometer will do) attached to analog input 0 + - LED attached from digital pin 9 to ground created 29 Oct 2008 By David A Mellis diff --git a/build/shared/examples/03.Analog/Fading/Fading.ino b/build/shared/examples/03.Analog/Fading/Fading.ino index 578bb4881ae..b44db6a0ca3 100644 --- a/build/shared/examples/03.Analog/Fading/Fading.ino +++ b/build/shared/examples/03.Analog/Fading/Fading.ino @@ -4,7 +4,7 @@ This example shows how to fade an LED using the analogWrite() function. The circuit: - * LED attached from digital pin 9 to ground. + - LED attached from digital pin 9 to ground. Created 1 Nov 2008 By David A. Mellis diff --git a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino index 131a21c7df6..7036314d200 100644 --- a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino +++ b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino @@ -7,7 +7,7 @@ continually averages them. The circuit: - * Analog sensor (potentiometer will do) attached to analog input 0 + - Analog sensor (potentiometer will do) attached to analog input 0 Created 22 April 2007 By David A. Mellis diff --git a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino index fbdd6fbce88..9cd61fe246e 100644 --- a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino +++ b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino @@ -2,8 +2,8 @@ ASCII table Prints out byte values in all possible formats: - * as raw binary values - * as ASCII-encoded decimal, hex, octal, and binary values + - as raw binary values + - as ASCII-encoded decimal, hex, octal, and binary values For more on ASCII, see http://www.asciitable.com and http://en.wikipedia.org/wiki/ASCII diff --git a/build/shared/examples/04.Communication/Midi/Midi.ino b/build/shared/examples/04.Communication/Midi/Midi.ino index 5f796d681e5..63536423526 100644 --- a/build/shared/examples/04.Communication/Midi/Midi.ino +++ b/build/shared/examples/04.Communication/Midi/Midi.ino @@ -7,9 +7,9 @@ The circuit: - * digital in 1 connected to MIDI jack pin 5 - * MIDI jack pin 2 connected to ground - * MIDI jack pin 4 connected to +5V through 220-ohm resistor + - digital in 1 connected to MIDI jack pin 5 + - MIDI jack pin 2 connected to ground + - MIDI jack pin 4 connected to +5V through 220-ohm resistor Attach a MIDI cable to the jack, then to a MIDI synth, and play music. created 13 Jun 2006 diff --git a/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino b/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino index 8d3bc582e71..7c6f524153a 100644 --- a/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino +++ b/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino @@ -7,8 +7,8 @@ This example works only with boards with more than one serial like Arduino Mega, Due, Zero etc The circuit: - * Any serial device attached to Serial port 1 - * Serial monitor open on Serial port 0: + - Any serial device attached to Serial port 1 + - Serial monitor open on Serial port 0: created 30 Dec. 2008 modified 20 May 2012 diff --git a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino index cdd223a75eb..cf81f582ce8 100644 --- a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino +++ b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino @@ -11,7 +11,7 @@ proxy), PD, or Max/MSP. The circuit: - * LED connected from digital pin 13 to ground + - LED connected from digital pin 13 to ground created 2006 by David A. Mellis diff --git a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino index 513f515ae95..18c5aaf5a6a 100644 --- a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino +++ b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino @@ -6,10 +6,10 @@ It parses them into ints, and uses those to fade an RGB LED. Circuit: Common-Cathode RGB LED wired like so: - * Red anode: digital pin 3 - * Green anode: digital pin 5 - * Blue anode: digital pin 6 - * Cathode : GND + - Red anode: digital pin 3 + - Green anode: digital pin 5 + - Blue anode: digital pin 6 + - Cathode : GND created 13 Apr 2012 by Tom Igoe diff --git a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino index 44ec3dc5184..5aa1b33205d 100644 --- a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino +++ b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino @@ -10,8 +10,8 @@ Thanks to Greg Shakar and Scott Fitzgerald for the improvements The circuit: - * potentiometers attached to analog inputs 0 and 1 - * pushbutton attached to digital I/O 2 + - potentiometers attached to analog inputs 0 and 1 + - pushbutton attached to digital I/O 2 Created 26 Sept. 2005 by Tom Igoe diff --git a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino index 7d3c3466aef..b44c908c507 100644 --- a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino +++ b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino @@ -12,8 +12,8 @@ Thanks to Greg Shakar and Scott Fitzgerald for the improvements The circuit: - * potentiometers attached to analog inputs 0 and 1 - * pushbutton attached to digital I/O 2 + - potentiometers attached to analog inputs 0 and 1 + - pushbutton attached to digital I/O 2 diff --git a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino index ba23b299a4d..890dcc1f5ca 100644 --- a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino +++ b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino @@ -4,7 +4,7 @@ take those three values and use them to change the background color of the screen. The circuit: - * potentiometers attached to analog inputs 0, 1, and 2 + - potentiometers attached to analog inputs 0, 1, and 2 http://www.arduino.cc/en/Tutorial/VirtualColorMixer diff --git a/build/shared/examples/05.Control/Arrays/Arrays.ino b/build/shared/examples/05.Control/Arrays/Arrays.ino index 3406a18280f..d17e02fe468 100644 --- a/build/shared/examples/05.Control/Arrays/Arrays.ino +++ b/build/shared/examples/05.Control/Arrays/Arrays.ino @@ -9,7 +9,7 @@ contiguous, here the pins can be in any random order. The circuit: - * LEDs from pins 2 through 7 to ground + - LEDs from pins 2 through 7 to ground created 2006 by David A. Mellis diff --git a/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino b/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino index 0aa922b24c6..66b662b23b3 100644 --- a/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino +++ b/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino @@ -5,7 +5,7 @@ Lights multiple LEDs in sequence, then in reverse. The circuit: - * LEDs from pins 2 through 7 to ground + - LEDs from pins 2 through 7 to ground created 2006 by David A. Mellis diff --git a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino index 0842d374710..38dea2da20f 100644 --- a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino +++ b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino @@ -7,12 +7,12 @@ regardless of the level. The circuit: - * potentiometer connected to analog pin 0. + - potentiometer connected to analog pin 0. Center pin of the potentiometer goes to the analog pin. side pins of the potentiometer go to +5V and ground - * LED connected from digital pin 13 to ground + - LED connected from digital pin 13 to ground - * Note: On most Arduino boards, there is already an LED on the board + - Note: On most Arduino boards, there is already an LED on the board connected to pin 13, so you don't need any extra components for this example. created 17 Jan 2009 diff --git a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino index bb5ff7b89e4..df1f2063ea6 100644 --- a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino +++ b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino @@ -10,11 +10,11 @@ This is a variation on the calibrate example. The circuit: - * photoresistor connected from +5V to analog in pin 0 - * 10K resistor connected from ground to analog in pin 0 - * LED connected from digital pin 9 to ground through 220 ohm resistor - * pushbutton attached from pin 2 to +5V - * 10K resistor attached from pin 2 to ground + - photoresistor connected from +5V to analog in pin 0 + - 10K resistor connected from ground to analog in pin 0 + - LED connected from digital pin 9 to ground through 220 ohm resistor + - pushbutton attached from pin 2 to +5V + - 10K resistor attached from pin 2 to ground created 17 Jan 2009 modified 30 Aug 2011 diff --git a/build/shared/examples/05.Control/switchCase/switchCase.ino b/build/shared/examples/05.Control/switchCase/switchCase.ino index 2ac47d6f49e..a1b32343d3a 100644 --- a/build/shared/examples/05.Control/switchCase/switchCase.ino +++ b/build/shared/examples/05.Control/switchCase/switchCase.ino @@ -10,8 +10,8 @@ over the sensor. The circuit: - * photoresistor from analog in 0 to +5V - * 10K resistor from analog in 0 to ground + - photoresistor from analog in 0 to +5V + - 10K resistor from analog in 0 to ground created 1 Jul 2009 modified 9 Apr 2012 diff --git a/build/shared/examples/05.Control/switchCase2/switchCase2.ino b/build/shared/examples/05.Control/switchCase2/switchCase2.ino index f52d8bdc1ca..28761534458 100644 --- a/build/shared/examples/05.Control/switchCase2/switchCase2.ino +++ b/build/shared/examples/05.Control/switchCase2/switchCase2.ino @@ -10,7 +10,7 @@ the LEDs off. The circuit: - * 5 LEDs attached to digital pins 2 through 6 through 220-ohm resistors + - 5 LEDs attached to digital pins 2 through 6 through 220-ohm resistors created 1 Jul 2009 by Tom Igoe diff --git a/build/shared/examples/06.Sensors/Knock/Knock.ino b/build/shared/examples/06.Sensors/Knock/Knock.ino index e47c5842676..912377d6b41 100644 --- a/build/shared/examples/06.Sensors/Knock/Knock.ino +++ b/build/shared/examples/06.Sensors/Knock/Knock.ino @@ -6,9 +6,9 @@ "knock" to the serial port, and toggles the LED on pin 13. The circuit: - * + connection of the piezo attached to analog in 0 - * - connection of the piezo attached to ground - * 1-megohm resistor attached from analog in 0 to ground + - + connection of the piezo attached to analog in 0 + - - connection of the piezo attached to ground + - 1-megohm resistor attached from analog in 0 to ground http://www.arduino.cc/en/Tutorial/Knock diff --git a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino index 61091756e4d..8f0d2d2ca27 100644 --- a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino +++ b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino @@ -7,10 +7,10 @@ computer. The circuit: - * X output of accelerometer to digital pin 2 - * Y output of accelerometer to digital pin 3 - * +V of accelerometer to +5V - * GND of accelerometer to ground + - X output of accelerometer to digital pin 2 + - Y output of accelerometer to digital pin 3 + - +V of accelerometer to +5V + - GND of accelerometer to ground http://www.arduino.cc/en/Tutorial/Memsic2125 diff --git a/build/shared/examples/06.Sensors/Ping/Ping.ino b/build/shared/examples/06.Sensors/Ping/Ping.ino index ab0cb899cd8..afe49bd0693 100644 --- a/build/shared/examples/06.Sensors/Ping/Ping.ino +++ b/build/shared/examples/06.Sensors/Ping/Ping.ino @@ -7,9 +7,9 @@ the distance of the object from the sensor. The circuit: - * +V connection of the PING))) attached to +5V - * GND connection of the PING))) attached to ground - * SIG connection of the PING))) attached to digital pin 7 + - +V connection of the PING))) attached to +5V + - GND connection of the PING))) attached to ground + - SIG connection of the PING))) attached to digital pin 7 http://www.arduino.cc/en/Tutorial/Ping diff --git a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino index 21d4d12f203..c7c95137930 100644 --- a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino +++ b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino @@ -20,11 +20,11 @@ Pin numbers: Matrix: - * Digital pins 2 through 13, - * analog pins 2 through 5 used as digital 16 through 19 + - Digital pins 2 through 13, + - analog pins 2 through 5 used as digital 16 through 19 Potentiometers: - * center pins are attached to analog pins 0 and 1, respectively - * side pins attached to +5V and ground, respectively. + - center pins are attached to analog pins 0 and 1, respectively + - side pins attached to +5V and ground, respectively. This example code is in the public domain. diff --git a/build/shared/examples/07.Display/barGraph/barGraph.ino b/build/shared/examples/07.Display/barGraph/barGraph.ino index 3f7d5847e1e..72c329bfd69 100644 --- a/build/shared/examples/07.Display/barGraph/barGraph.ino +++ b/build/shared/examples/07.Display/barGraph/barGraph.ino @@ -10,7 +10,7 @@ depends on an analog input. The circuit: - * LEDs from pins 2 through 11 to ground + - LEDs from pins 2 through 11 to ground created 4 Sep 2010 by Tom Igoe diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino index 621644b2caa..8ee2a08f066 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino @@ -13,8 +13,8 @@ To wake: Spacebar. Circuit: - * Arduino Leonardo or Micro - * wire to connect D2 to ground. + - Arduino Leonardo or Micro + - wire to connect D2 to ground. created 6 Mar 2012 modified 27 Mar 2012 diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino b/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino index 87a0f03834f..b848aa3d0c0 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino @@ -6,8 +6,8 @@ Sends a text string when a button is pressed. The circuit: - * pushbutton attached from pin 4 to +5V - * 10-kilohm resistor attached from pin 4 to ground + - pushbutton attached from pin 4 to +5V + - 10-kilohm resistor attached from pin 4 to ground created 24 Oct 2011 modified 27 Mar 2012 diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino index ce96ed5490d..e49ac1a5349 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino @@ -13,8 +13,8 @@ a final key combination (CTRL-U). Circuit: - * Arduino Leonardo, Micro, Due, LilyPad USB, or Yún - * wire to connect D2 to ground. + - Arduino Leonardo, Micro, Due, LilyPad USB, or Yún + - wire to connect D2 to ground. created 5 Mar 2012 modified 29 Mar 2012 diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino b/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino index 7f47a954d20..6fa798a2bd2 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino @@ -8,7 +8,7 @@ if you send a, you get b, send A you get B, and so forth. The circuit: - * none + - none created 21 Oct 2011 modified 27 Mar 2012 diff --git a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino index 67cfd7af951..78e1417d6d0 100644 --- a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino +++ b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino @@ -5,7 +5,7 @@ Controls the mouse from five pushbuttons on an Arduino Leonardo, Micro or Due. Hardware: - * 5 pushbuttons attached to D2, D3, D4, D5, D6 + - 5 pushbuttons attached to D2, D3, D4, D5, D6 The mouse movement is always relative. This sketch reads four pushbuttons, and uses them to set the movement of the mouse. diff --git a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino index 3b6eef75b82..4164f17b548 100644 --- a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino @@ -7,7 +7,7 @@ Controls the mouse from five pushbuttons on an Arduino Leonardo, Micro or Due. Hardware: - * 5 pushbuttons attached to D2, D3, D4, D5, D6 + - 5 pushbuttons attached to D2, D3, D4, D5, D6 The mouse movement is always relative. This sketch reads diff --git a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino index a836655e21a..28b3d4f882b 100644 --- a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino @@ -6,8 +6,8 @@ a second pushbutton to click the left mouse button Hardware: - * 2-axis joystick connected to pins A0 and A1 - * pushbuttons connected to pin D2 and D3 + - 2-axis joystick connected to pins A0 and A1 + - pushbuttons connected to pin D2 and D3 The mouse movement is always relative. This sketch reads two analog inputs that range from 0 to 1023 (or less on either end) From 235d4de847d0462354d207d162a312ac031c3dfc Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 14 Jul 2017 15:30:34 -0700 Subject: [PATCH 05/11] Indent all multi-line C style comments in built-in examples by at least two spaces This is required for Auto Format compatibility because it has the undesirable effect of indenting only unindented contents of multi-lline comments, thus altering the relative indentation of the text. The exception is the Max/MSP patches as I did not know whether indentation would break them. --- .../DigitalReadSerial/DigitalReadSerial.ino | 4 +- build/shared/examples/01.Basics/Fade/Fade.ino | 18 +- .../BlinkWithoutDelay/BlinkWithoutDelay.ino | 50 ++--- .../examples/02.Digital/Button/Button.ino | 28 +-- .../examples/02.Digital/Debounce/Debounce.ino | 42 ++--- .../DigitalInputPullup/DigitalInputPullup.ino | 26 +-- .../StateChangeDetection.ino | 32 ++-- .../02.Digital/toneKeyboard/toneKeyboard.ino | 20 +- .../02.Digital/toneMelody/toneMelody.ino | 16 +- .../02.Digital/toneMultiple/toneMultiple.ino | 16 +- .../tonePitchFollower/tonePitchFollower.ino | 20 +- .../AnalogInOutSerial/AnalogInOutSerial.ino | 24 +-- .../03.Analog/AnalogInput/AnalogInput.ino | 36 ++-- .../03.Analog/Calibration/Calibration.ino | 34 ++-- .../examples/03.Analog/Fading/Fading.ino | 20 +- .../ASCIITable/ASCIITable.ino | 22 +-- .../04.Communication/Dimmer/Dimmer.ino | 100 +++++----- .../examples/04.Communication/Graph/Graph.ino | 136 +++++++------- .../examples/04.Communication/Midi/Midi.ino | 28 +-- .../MultiSerial/MultiSerial.ino | 24 +-- .../PhysicalPixel/PhysicalPixel.ino | 166 ++++++++--------- .../ReadASCIIString/ReadASCIIString.ino | 28 +-- .../SerialCallResponse/SerialCallResponse.ino | 172 +++++++++--------- .../SerialCallResponseASCII.ino | 144 +++++++-------- .../SerialEvent/SerialEvent.ino | 30 +-- .../VirtualColorMixer/VirtualColorMixer.ino | 104 +++++------ .../examples/05.Control/Arrays/Arrays.ino | 26 +-- .../ForLoopIteration/ForLoopIteration.ino | 20 +- .../IfStatementConditional.ino | 32 ++-- .../WhileStatementConditional.ino | 36 ++-- .../05.Control/switchCase/switchCase.ino | 28 +-- .../05.Control/switchCase2/switchCase2.ino | 24 +-- .../examples/06.Sensors/ADXL3xx/ADXL3xx.ino | 36 ++-- .../examples/06.Sensors/Knock/Knock.ino | 28 +-- .../06.Sensors/Memsic2125/Memsic2125.ino | 32 ++-- .../shared/examples/06.Sensors/Ping/Ping.ino | 30 +-- .../RowColumnScanning/RowColumnScanning.ino | 44 ++--- .../examples/07.Display/barGraph/barGraph.ino | 8 +- .../CharacterAnalysis/CharacterAnalysis.ino | 12 +- .../StringAdditionOperator.ino | 14 +- .../StringAppendOperator.ino | 12 +- .../StringCaseChanges/StringCaseChanges.ino | 12 +- .../StringCharacters/StringCharacters.ino | 12 +- .../StringComparisonOperators.ino | 12 +- .../StringConstructors/StringConstructors.ino | 14 +- .../StringIndexOf/StringIndexOf.ino | 12 +- .../08.Strings/StringLength/StringLength.ino | 12 +- .../StringLengthTrim/StringLengthTrim.ino | 12 +- .../StringReplace/StringReplace.ino | 12 +- .../StringStartsWithEndsWith.ino | 12 +- .../StringSubstring/StringSubstring.ino | 12 +- .../08.Strings/StringToInt/StringToInt.ino | 14 +- .../KeyboardLogout/KeyboardLogout.ino | 30 +-- .../KeyboardMessage/KeyboardMessage.ino | 26 +-- .../KeyboardReprogram/KeyboardReprogram.ino | 36 ++-- .../KeyboardSerial/KeyboardSerial.ino | 24 +-- .../KeyboardAndMouseControl.ino | 22 +-- .../ButtonMouseControl/ButtonMouseControl.ino | 24 +-- .../JoystickMouseControl.ino | 40 ++-- .../p02_SpaceshipInterface.ino | 26 +-- .../p03_LoveOMeter/p03_LoveOMeter.ino | 22 +-- .../p04_ColorMixingLamp.ino | 38 ++-- .../p05_ServoMoodIndicator.ino | 22 +-- .../p06_LightTheremin/p06_LightTheremin.ino | 22 +-- .../p07_Keyboard/p07_Keyboard.ino | 26 +-- .../p08_DigitalHourglass.ino | 24 +-- .../p09_MotorizedPinwheel.ino | 28 +-- .../p10_Zoetrope/p10_Zoetrope.ino | 30 +-- .../p11_CrystalBall/p11_CrystalBall.ino | 26 +-- .../p12_KnockLock/p12_KnockLock.ino | 48 ++--- .../p13_TouchSensorLamp.ino | 30 +-- .../p14_TweakTheArduinoLogo.ino | 142 +++++++-------- .../p15_HackingButtons/p15_HackingButtons.ino | 22 +-- 73 files changed, 1283 insertions(+), 1283 deletions(-) diff --git a/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino b/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino index 0134a048522..a97be3cd92f 100644 --- a/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino +++ b/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino @@ -1,8 +1,8 @@ /* DigitalReadSerial - Reads a digital input on pin 2, prints the result to the Serial Monitor + Reads a digital input on pin 2, prints the result to the Serial Monitor - This example code is in the public domain. + This example code is in the public domain. */ // digital pin 2 has a pushbutton attached to it. Give it a name: diff --git a/build/shared/examples/01.Basics/Fade/Fade.ino b/build/shared/examples/01.Basics/Fade/Fade.ino index 727d1484b21..f3734f339c6 100644 --- a/build/shared/examples/01.Basics/Fade/Fade.ino +++ b/build/shared/examples/01.Basics/Fade/Fade.ino @@ -1,16 +1,16 @@ /* - Fade + Fade - This example shows how to fade an LED on pin 9 - using the analogWrite() function. + This example shows how to fade an LED on pin 9 + using the analogWrite() function. - The analogWrite() function uses PWM, so if - you want to change the pin you're using, be - sure to use another PWM capable pin. On most - Arduino, the PWM pins are identified with - a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11. + The analogWrite() function uses PWM, so if + you want to change the pin you're using, be + sure to use another PWM capable pin. On most + Arduino, the PWM pins are identified with + a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11. - This example code is in the public domain. + This example code is in the public domain. */ int led = 9; // the PWM pin the LED is attached to diff --git a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino index cad73cf9868..08ddf9de8ff 100644 --- a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino +++ b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino @@ -1,30 +1,30 @@ /* Blink without Delay - Turns on and off a light emitting diode (LED) connected to a digital - pin, without using the delay() function. This means that other code - can run at the same time without being interrupted by the LED code. - - The circuit: - - Use the onboard LED. - - Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO - it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to - the correct LED pin independent of which board is used. - If you want to know what pin the on-board LED is connected to on your Arduino model, check - the Technical Specs of your board at https://www.arduino.cc/en/Main/Products - - created 2005 - by David A. Mellis - modified 8 Feb 2010 - by Paul Stoffregen - modified 11 Nov 2013 - by Scott Fitzgerald - modified 9 Jan 2017 - by Arturo Guadalupi - - - This example code is in the public domain. - - http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay + Turns on and off a light emitting diode (LED) connected to a digital + pin, without using the delay() function. This means that other code + can run at the same time without being interrupted by the LED code. + + The circuit: + - Use the onboard LED. + - Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO + it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to + the correct LED pin independent of which board is used. + If you want to know what pin the on-board LED is connected to on your Arduino model, check + the Technical Specs of your board at https://www.arduino.cc/en/Main/Products + + created 2005 + by David A. Mellis + modified 8 Feb 2010 + by Paul Stoffregen + modified 11 Nov 2013 + by Scott Fitzgerald + modified 9 Jan 2017 + by Arturo Guadalupi + + + This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay */ // constants won't change. Used here to set a pin number: diff --git a/build/shared/examples/02.Digital/Button/Button.ino b/build/shared/examples/02.Digital/Button/Button.ino index 04441c9128d..2aafd8e2466 100644 --- a/build/shared/examples/02.Digital/Button/Button.ino +++ b/build/shared/examples/02.Digital/Button/Button.ino @@ -1,27 +1,27 @@ /* Button - Turns on and off a light emitting diode(LED) connected to digital - pin 13, when pressing a pushbutton attached to pin 2. + Turns on and off a light emitting diode(LED) connected to digital + pin 13, when pressing a pushbutton attached to pin 2. - The circuit: - - LED attached from pin 13 to ground - - pushbutton attached to pin 2 from +5V - - 10K resistor attached to pin 2 from ground + The circuit: + - LED attached from pin 13 to ground + - pushbutton attached to pin 2 from +5V + - 10K resistor attached to pin 2 from ground - - Note: on most Arduinos there is already an LED on the board - attached to pin 13. + - Note: on most Arduinos there is already an LED on the board + attached to pin 13. - created 2005 - by DojoDave - modified 30 Aug 2011 - by Tom Igoe + created 2005 + by DojoDave + modified 30 Aug 2011 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/Button + http://www.arduino.cc/en/Tutorial/Button */ // constants won't change. They're used here to diff --git a/build/shared/examples/02.Digital/Debounce/Debounce.ino b/build/shared/examples/02.Digital/Debounce/Debounce.ino index a62815acafd..2c5ae85534f 100644 --- a/build/shared/examples/02.Digital/Debounce/Debounce.ino +++ b/build/shared/examples/02.Digital/Debounce/Debounce.ino @@ -1,33 +1,33 @@ /* - Debounce + Debounce - Each time the input pin goes from LOW to HIGH (e.g. because of a push-button - press), the output pin is toggled from LOW to HIGH or HIGH to LOW. There's - a minimum delay between toggles to debounce the circuit (i.e. to ignore - noise). + Each time the input pin goes from LOW to HIGH (e.g. because of a push-button + press), the output pin is toggled from LOW to HIGH or HIGH to LOW. There's + a minimum delay between toggles to debounce the circuit (i.e. to ignore + noise). - The circuit: - - LED attached from pin 13 to ground - - pushbutton attached from pin 2 to +5V - - 10K resistor attached from pin 2 to ground + The circuit: + - LED attached from pin 13 to ground + - pushbutton attached from pin 2 to +5V + - 10K resistor attached from pin 2 to ground - - Note: On most Arduino boards, there is already an LED on the board - connected to pin 13, so you don't need any extra components for this example. + - Note: On most Arduino boards, there is already an LED on the board + connected to pin 13, so you don't need any extra components for this example. - created 21 November 2006 - by David A. Mellis - modified 30 Aug 2011 - by Limor Fried - modified 28 Dec 2012 - by Mike Walters - modified 30 Aug 2016 - by Arturo Guadalupi + created 21 November 2006 + by David A. Mellis + modified 30 Aug 2011 + by Limor Fried + modified 28 Dec 2012 + by Mike Walters + modified 30 Aug 2016 + by Arturo Guadalupi - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/Debounce + http://www.arduino.cc/en/Tutorial/Debounce */ // constants won't change. They're used here to diff --git a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino index 82a723bb507..5ca6e09965b 100644 --- a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino +++ b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino @@ -1,23 +1,23 @@ /* - Input Pull-up Serial + Input Pull-up Serial - This example demonstrates the use of pinMode(INPUT_PULLUP). It reads a - digital input on pin 2 and prints the results to the Serial Monitor. + This example demonstrates the use of pinMode(INPUT_PULLUP). It reads a + digital input on pin 2 and prints the results to the Serial Monitor. - The circuit: - - Momentary switch attached from pin 2 to ground - - Built-in LED on pin 13 + The circuit: + - Momentary switch attached from pin 2 to ground + - Built-in LED on pin 13 - Unlike pinMode(INPUT), there is no pull-down resistor necessary. An internal - 20K-ohm resistor is pulled to 5V. This configuration causes the input to - read HIGH when the switch is open, and LOW when it is closed. + Unlike pinMode(INPUT), there is no pull-down resistor necessary. An internal + 20K-ohm resistor is pulled to 5V. This configuration causes the input to + read HIGH when the switch is open, and LOW when it is closed. - created 14 March 2012 - by Scott Fitzgerald + created 14 March 2012 + by Scott Fitzgerald - http://www.arduino.cc/en/Tutorial/InputPullupSerial + http://www.arduino.cc/en/Tutorial/InputPullupSerial - This example code is in the public domain + This example code is in the public domain */ diff --git a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino index a02f3ec54f5..b72d7b828f0 100644 --- a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino +++ b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino @@ -1,27 +1,27 @@ /* State change detection (edge detection) - Often, you don't need to know the state of a digital input all the time, - but you just need to know when the input changes from one state to another. - For example, you want to know when a button goes from OFF to ON. This is called - state change detection, or edge detection. + Often, you don't need to know the state of a digital input all the time, + but you just need to know when the input changes from one state to another. + For example, you want to know when a button goes from OFF to ON. This is called + state change detection, or edge detection. - This example shows how to detect when a button or button changes from off to on - and on to off. + This example shows how to detect when a button or button changes from off to on + and on to off. - The circuit: - - pushbutton attached to pin 2 from +5V - - 10K resistor attached to pin 2 from ground - - LED attached from pin 13 to ground (or use the built-in LED on - most Arduino boards) + The circuit: + - pushbutton attached to pin 2 from +5V + - 10K resistor attached to pin 2 from ground + - LED attached from pin 13 to ground (or use the built-in LED on + most Arduino boards) - created 27 Sep 2005 - modified 30 Aug 2011 - by Tom Igoe + created 27 Sep 2005 + modified 30 Aug 2011 + by Tom Igoe -This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/ButtonStateChange + http://www.arduino.cc/en/Tutorial/ButtonStateChange */ diff --git a/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino b/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino index a2b38847dcf..90a027ff14f 100644 --- a/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino +++ b/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino @@ -1,20 +1,20 @@ /* keyboard - Plays a pitch that changes based on a changing analog input + Plays a pitch that changes based on a changing analog input - circuit: - - 3 force-sensing resistors from +5V to analog in 0 through 5 - - 3 10K resistors from analog in 0 through 5 to ground - - 8-ohm speaker on digital pin 8 + circuit: + - 3 force-sensing resistors from +5V to analog in 0 through 5 + - 3 10K resistors from analog in 0 through 5 to ground + - 8-ohm speaker on digital pin 8 - created 21 Jan 2010 - modified 9 Apr 2012 - by Tom Igoe + created 21 Jan 2010 + modified 9 Apr 2012 + by Tom Igoe -This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/Tone3 + http://www.arduino.cc/en/Tutorial/Tone3 */ diff --git a/build/shared/examples/02.Digital/toneMelody/toneMelody.ino b/build/shared/examples/02.Digital/toneMelody/toneMelody.ino index 8839e52909f..c4024b8e88e 100644 --- a/build/shared/examples/02.Digital/toneMelody/toneMelody.ino +++ b/build/shared/examples/02.Digital/toneMelody/toneMelody.ino @@ -1,18 +1,18 @@ /* Melody - Plays a melody + Plays a melody - circuit: - - 8-ohm speaker on digital pin 8 + circuit: + - 8-ohm speaker on digital pin 8 - created 21 Jan 2010 - modified 30 Aug 2011 - by Tom Igoe + created 21 Jan 2010 + modified 30 Aug 2011 + by Tom Igoe -This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/Tone + http://www.arduino.cc/en/Tutorial/Tone */ #include "pitches.h" diff --git a/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino b/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino index 70fd5ca08bf..3b504e5f0d9 100644 --- a/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino +++ b/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino @@ -1,18 +1,18 @@ /* Multiple tone player - Plays multiple tones on multiple pins in sequence + Plays multiple tones on multiple pins in sequence - circuit: - - 3 8-ohm speaker on digital pins 6, 7, and 8 + circuit: + - 3 8-ohm speaker on digital pins 6, 7, and 8 - created 8 March 2010 - by Tom Igoe - based on a snippet from Greg Borenstein + created 8 March 2010 + by Tom Igoe + based on a snippet from Greg Borenstein -This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/Tone4 + http://www.arduino.cc/en/Tutorial/Tone4 */ diff --git a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino index f39a9d5ff41..bb44e76ae43 100644 --- a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino +++ b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino @@ -1,20 +1,20 @@ /* Pitch follower - Plays a pitch that changes based on a changing analog input + Plays a pitch that changes based on a changing analog input - circuit: - - 8-ohm speaker on digital pin 9 - - photoresistor on analog 0 to 5V - - 4.7K resistor on analog 0 to ground + circuit: + - 8-ohm speaker on digital pin 9 + - photoresistor on analog 0 to 5V + - 4.7K resistor on analog 0 to ground - created 21 Jan 2010 - modified 31 May 2012 - by Tom Igoe, with suggestion from Michael Flynn + created 21 Jan 2010 + modified 31 May 2012 + by Tom Igoe, with suggestion from Michael Flynn -This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/Tone2 + http://www.arduino.cc/en/Tutorial/Tone2 */ diff --git a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino index 7c28781a218..337c8caf6f8 100644 --- a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino +++ b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino @@ -1,21 +1,21 @@ /* Analog input, analog output, serial output - Reads an analog input pin, maps the result to a range from 0 to 255 - and uses the result to set the pulse width modulation (PWM) of an output pin. - Also prints the results to the Serial Monitor. + Reads an analog input pin, maps the result to a range from 0 to 255 + and uses the result to set the pulse width modulation (PWM) of an output pin. + Also prints the results to the Serial Monitor. - The circuit: - - potentiometer connected to analog pin 0. - Center pin of the potentiometer goes to the analog pin. - side pins of the potentiometer go to +5V and ground - - LED connected from digital pin 9 to ground + The circuit: + - potentiometer connected to analog pin 0. + Center pin of the potentiometer goes to the analog pin. + side pins of the potentiometer go to +5V and ground + - LED connected from digital pin 9 to ground - created 29 Dec. 2008 - modified 9 Apr 2012 - by Tom Igoe + created 29 Dec. 2008 + modified 9 Apr 2012 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. */ diff --git a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino index 1b4be2dcaea..e6367798f03 100644 --- a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino +++ b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino @@ -1,29 +1,29 @@ /* Analog Input - Demonstrates analog input by reading an analog sensor on analog pin 0 and - turning on and off a light emitting diode(LED) connected to digital pin 13. - The amount of time the LED will be on and off depends on - the value obtained by analogRead(). + Demonstrates analog input by reading an analog sensor on analog pin 0 and + turning on and off a light emitting diode(LED) connected to digital pin 13. + The amount of time the LED will be on and off depends on + the value obtained by analogRead(). - The circuit: - - Potentiometer attached to analog input 0 - - center pin of the potentiometer to the analog pin - - one side pin (either one) to ground - - the other side pin to +5V - - LED anode (long leg) attached to digital output 13 - - LED cathode (short leg) attached to ground + The circuit: + - Potentiometer attached to analog input 0 + - center pin of the potentiometer to the analog pin + - one side pin (either one) to ground + - the other side pin to +5V + - LED anode (long leg) attached to digital output 13 + - LED cathode (short leg) attached to ground - - Note: because most Arduinos have a built-in LED attached - to pin 13 on the board, the LED is optional. + - Note: because most Arduinos have a built-in LED attached + to pin 13 on the board, the LED is optional. - Created by David Cuartielles - modified 30 Aug 2011 - By Tom Igoe + Created by David Cuartielles + modified 30 Aug 2011 + By Tom Igoe - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/AnalogInput + http://www.arduino.cc/en/Tutorial/AnalogInput */ diff --git a/build/shared/examples/03.Analog/Calibration/Calibration.ino b/build/shared/examples/03.Analog/Calibration/Calibration.ino index e32cff307b9..3740ac4e5fa 100644 --- a/build/shared/examples/03.Analog/Calibration/Calibration.ino +++ b/build/shared/examples/03.Analog/Calibration/Calibration.ino @@ -1,28 +1,28 @@ /* Calibration - Demonstrates one technique for calibrating sensor input. The - sensor readings during the first five seconds of the sketch - execution define the minimum and maximum of expected values - attached to the sensor pin. + Demonstrates one technique for calibrating sensor input. The + sensor readings during the first five seconds of the sketch + execution define the minimum and maximum of expected values + attached to the sensor pin. - The sensor minimum and maximum initial values may seem backwards. - Initially, you set the minimum high and listen for anything - lower, saving it as the new minimum. Likewise, you set the - maximum low and listen for anything higher as the new maximum. + The sensor minimum and maximum initial values may seem backwards. + Initially, you set the minimum high and listen for anything + lower, saving it as the new minimum. Likewise, you set the + maximum low and listen for anything higher as the new maximum. - The circuit: - - Analog sensor (potentiometer will do) attached to analog input 0 - - LED attached from digital pin 9 to ground + The circuit: + - Analog sensor (potentiometer will do) attached to analog input 0 + - LED attached from digital pin 9 to ground - created 29 Oct 2008 - By David A Mellis - modified 30 Aug 2011 - By Tom Igoe + created 29 Oct 2008 + By David A Mellis + modified 30 Aug 2011 + By Tom Igoe - http://www.arduino.cc/en/Tutorial/Calibration + http://www.arduino.cc/en/Tutorial/Calibration - This example code is in the public domain. + This example code is in the public domain. */ diff --git a/build/shared/examples/03.Analog/Fading/Fading.ino b/build/shared/examples/03.Analog/Fading/Fading.ino index b44db6a0ca3..95f3bc2fed4 100644 --- a/build/shared/examples/03.Analog/Fading/Fading.ino +++ b/build/shared/examples/03.Analog/Fading/Fading.ino @@ -1,19 +1,19 @@ /* - Fading + Fading - This example shows how to fade an LED using the analogWrite() function. + This example shows how to fade an LED using the analogWrite() function. - The circuit: - - LED attached from digital pin 9 to ground. + The circuit: + - LED attached from digital pin 9 to ground. - Created 1 Nov 2008 - By David A. Mellis - modified 30 Aug 2011 - By Tom Igoe + Created 1 Nov 2008 + By David A. Mellis + modified 30 Aug 2011 + By Tom Igoe - http://www.arduino.cc/en/Tutorial/Fading + http://www.arduino.cc/en/Tutorial/Fading - This example code is in the public domain. + This example code is in the public domain. */ diff --git a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino index 9cd61fe246e..658c3bc610e 100644 --- a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino +++ b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino @@ -1,22 +1,22 @@ /* ASCII table - Prints out byte values in all possible formats: - - as raw binary values - - as ASCII-encoded decimal, hex, octal, and binary values + Prints out byte values in all possible formats: + - as raw binary values + - as ASCII-encoded decimal, hex, octal, and binary values - For more on ASCII, see http://www.asciitable.com and http://en.wikipedia.org/wiki/ASCII + For more on ASCII, see http://www.asciitable.com and http://en.wikipedia.org/wiki/ASCII - The circuit: No external hardware needed. + The circuit: No external hardware needed. - created 2006 - by Nicholas Zambetti - modified 9 Apr 2012 - by Tom Igoe + created 2006 + by Nicholas Zambetti + modified 9 Apr 2012 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. - + */ void setup() { diff --git a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino index 541080ab3d7..d1a28aaf5e9 100644 --- a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino +++ b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino @@ -1,23 +1,23 @@ /* Dimmer - Demonstrates sending data from the computer to the Arduino board, - in this case to control the brightness of an LED. The data is sent - in individual bytes, each of which ranges from 0 to 255. Arduino - reads these bytes and uses them to set the brightness of the LED. + Demonstrates sending data from the computer to the Arduino board, + in this case to control the brightness of an LED. The data is sent + in individual bytes, each of which ranges from 0 to 255. Arduino + reads these bytes and uses them to set the brightness of the LED. - The circuit: - LED attached from digital pin 9 to ground. - Serial connection to Processing, Max/MSP, or another serial application + The circuit: + LED attached from digital pin 9 to ground. + Serial connection to Processing, Max/MSP, or another serial application - created 2006 - by David A. Mellis - modified 30 Aug 2011 - by Tom Igoe and Scott Fitzgerald + created 2006 + by David A. Mellis + modified 30 Aug 2011 + by Tom Igoe and Scott Fitzgerald - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/Dimmer + http://www.arduino.cc/en/Tutorial/Dimmer */ @@ -43,43 +43,43 @@ void loop() { } /* Processing code for this example - // Dimmer - sends bytes over a serial port - // by David A. Mellis - // This example code is in the public domain. - - import processing.serial.*; - Serial port; - - void setup() { - size(256, 150); - - println("Available serial ports:"); - // if using Processing 2.1 or later, use Serial.printArray() - println(Serial.list()); - - // Uses the first port in this list (number 0). Change this to - // select the port corresponding to your Arduino board. The last - // parameter (e.g. 9600) is the speed of the communication. It - // has to correspond to the value passed to Serial.begin() in your - // Arduino sketch. - port = new Serial(this, Serial.list()[0], 9600); - - // If you know the name of the port used by the Arduino board, you - // can specify it directly like this. - //port = new Serial(this, "COM1", 9600); - } - - void draw() { - // draw a gradient from black to white - for (int i = 0; i < 256; i++) { - stroke(i); - line(i, 0, i, 150); - } - - // write the current X-position of the mouse to the serial port as - // a single byte - port.write(mouseX); - } + // Dimmer - sends bytes over a serial port + // by David A. Mellis + // This example code is in the public domain. + + import processing.serial.*; + Serial port; + + void setup() { + size(256, 150); + + println("Available serial ports:"); + // if using Processing 2.1 or later, use Serial.printArray() + println(Serial.list()); + + // Uses the first port in this list (number 0). Change this to + // select the port corresponding to your Arduino board. The last + // parameter (e.g. 9600) is the speed of the communication. It + // has to correspond to the value passed to Serial.begin() in your + // Arduino sketch. + port = new Serial(this, Serial.list()[0], 9600); + + // If you know the name of the port used by the Arduino board, you + // can specify it directly like this. + //port = new Serial(this, "COM1", 9600); + } + + void draw() { + // draw a gradient from black to white + for (int i = 0; i < 256; i++) { + stroke(i); + line(i, 0, i, 150); + } + + // write the current X-position of the mouse to the serial port as + // a single byte + port.write(mouseX); + } */ /* Max/MSP v5 patch for this example diff --git a/build/shared/examples/04.Communication/Graph/Graph.ino b/build/shared/examples/04.Communication/Graph/Graph.ino index 59d33002d29..7786014a40d 100644 --- a/build/shared/examples/04.Communication/Graph/Graph.ino +++ b/build/shared/examples/04.Communication/Graph/Graph.ino @@ -1,29 +1,29 @@ /* Graph - A simple example of communication from the Arduino board to the computer: - the value of analog input 0 is sent out the serial port. We call this "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. Bytes are sent one after another (serially) from the Arduino - to the computer. + A simple example of communication from the Arduino board to the computer: + the value of analog input 0 is sent out the serial port. We call this "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. Bytes are sent one after another (serially) from the Arduino + to the computer. - You can use the Arduino Serial Monitor to view the sent data, or it can - be read by Processing, PD, Max/MSP, or any other program capable of reading - data from a serial port. The Processing code below graphs the data received - so you can see the value of the analog input changing over time. + You can use the Arduino Serial Monitor to view the sent data, or it can + be read by Processing, PD, Max/MSP, or any other program capable of reading + data from a serial port. The Processing code below graphs the data received + so you can see the value of the analog input changing over time. - The circuit: - Any analog input sensor is attached to analog in pin 0. + The circuit: + Any analog input sensor is attached to analog in pin 0. - created 2006 - by David A. Mellis - modified 9 Apr 2012 - by Tom Igoe and Scott Fitzgerald + created 2006 + by David A. Mellis + modified 9 Apr 2012 + by Tom Igoe and Scott Fitzgerald - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/Graph + http://www.arduino.cc/en/Tutorial/Graph */ void setup() { @@ -41,72 +41,72 @@ void loop() { /* Processing code for this example - // Graphing sketch + // Graphing sketch -// This program takes ASCII-encoded strings -// from the serial port at 9600 baud and graphs them. It expects values in the -// range 0 to 1023, followed by a newline, or newline and carriage return + // This program takes ASCII-encoded strings + // from the serial port at 9600 baud and graphs them. It expects values in the + // range 0 to 1023, followed by a newline, or newline and carriage return -// Created 20 Apr 2005 -// Updated 24 Nov 2015 -// by Tom Igoe -// This example code is in the public domain. + // Created 20 Apr 2005 + // Updated 24 Nov 2015 + // by Tom Igoe + // This example code is in the public domain. -import processing.serial.*; + import processing.serial.*; -Serial myPort; // The serial port -int xPos = 1; // horizontal position of the graph -float inByte = 0; + Serial myPort; // The serial port + int xPos = 1; // horizontal position of the graph + float inByte = 0; -void setup () { - // set the window size: - size(400, 300); + void setup () { + // set the window size: + size(400, 300); - // List all the available serial ports - // if using Processing 2.1 or later, use Serial.printArray() - println(Serial.list()); + // List all the available serial ports + // if using Processing 2.1 or later, use Serial.printArray() + println(Serial.list()); - // I know that the first port in the serial list on my Mac - // is always my Arduino, so I open Serial.list()[0]. - // Open whatever port is the one you're using. - myPort = new Serial(this, Serial.list()[0], 9600); + // I know that the first port in the serial list on my Mac + // is always my Arduino, so I open Serial.list()[0]. + // Open whatever port is the one you're using. + myPort = new Serial(this, Serial.list()[0], 9600); - // don't generate a serialEvent() unless you get a newline character: - myPort.bufferUntil('\n'); + // don't generate a serialEvent() unless you get a newline character: + myPort.bufferUntil('\n'); - // set initial background: - background(0); -} -void draw () { - // draw the line: - stroke(127, 34, 255); - line(xPos, height, xPos, height - inByte); - - // at the edge of the screen, go back to the beginning: - if (xPos >= width) { - xPos = 0; + // set initial background: background(0); - } else { - // increment the horizontal position: - xPos++; } -} + void draw () { + // draw the line: + stroke(127, 34, 255); + line(xPos, height, xPos, height - inByte); + + // at the edge of the screen, go back to the beginning: + if (xPos >= width) { + xPos = 0; + background(0); + } else { + // increment the horizontal position: + xPos++; + } + } -void serialEvent (Serial myPort) { - // get the ASCII string: - String inString = myPort.readStringUntil('\n'); + void serialEvent (Serial myPort) { + // get the ASCII string: + String inString = myPort.readStringUntil('\n'); - if (inString != null) { - // trim off any whitespace: - inString = trim(inString); - // convert to an int and map to the screen height: - inByte = float(inString); - println(inByte); - inByte = map(inByte, 0, 1023, 0, height); + if (inString != null) { + // trim off any whitespace: + inString = trim(inString); + // convert to an int and map to the screen height: + inByte = float(inString); + println(inByte); + inByte = map(inByte, 0, 1023, 0, height); + } } -} */ diff --git a/build/shared/examples/04.Communication/Midi/Midi.ino b/build/shared/examples/04.Communication/Midi/Midi.ino index 63536423526..ac3966f2fb9 100644 --- a/build/shared/examples/04.Communication/Midi/Midi.ino +++ b/build/shared/examples/04.Communication/Midi/Midi.ino @@ -1,24 +1,24 @@ /* - MIDI note player + MIDI note player - This sketch shows how to use the serial transmit pin (pin 1) to send MIDI note data. - If this circuit is connected to a MIDI synth, it will play - the notes F#-0 (0x1E) to F#-5 (0x5A) in sequence. + This sketch shows how to use the serial transmit pin (pin 1) to send MIDI note data. + If this circuit is connected to a MIDI synth, it will play + the notes F#-0 (0x1E) to F#-5 (0x5A) in sequence. - The circuit: - - digital in 1 connected to MIDI jack pin 5 - - MIDI jack pin 2 connected to ground - - MIDI jack pin 4 connected to +5V through 220-ohm resistor - Attach a MIDI cable to the jack, then to a MIDI synth, and play music. + The circuit: + - digital in 1 connected to MIDI jack pin 5 + - MIDI jack pin 2 connected to ground + - MIDI jack pin 4 connected to +5V through 220-ohm resistor + Attach a MIDI cable to the jack, then to a MIDI synth, and play music. - created 13 Jun 2006 - modified 13 Aug 2012 - by Tom Igoe + created 13 Jun 2006 + modified 13 Aug 2012 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/Midi + http://www.arduino.cc/en/Tutorial/Midi */ diff --git a/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino b/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino index 7c6f524153a..f7995107364 100644 --- a/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino +++ b/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino @@ -1,22 +1,22 @@ /* Multiple Serial test - Receives from the main serial port, sends to the others. - Receives from serial port 1, sends to the main serial (Serial 0). + Receives from the main serial port, sends to the others. + Receives from serial port 1, sends to the main serial (Serial 0). - This example works only with boards with more than one serial like Arduino Mega, Due, Zero etc + This example works only with boards with more than one serial like Arduino Mega, Due, Zero etc - The circuit: - - Any serial device attached to Serial port 1 - - Serial monitor open on Serial port 0: + The circuit: + - Any serial device attached to Serial port 1 + - Serial monitor open on Serial port 0: - created 30 Dec. 2008 - modified 20 May 2012 - by Tom Igoe & Jed Roach - modified 27 Nov 2015 - by Arturo Guadalupi + created 30 Dec. 2008 + modified 20 May 2012 + by Tom Igoe & Jed Roach + modified 27 Nov 2015 + by Arturo Guadalupi - This example code is in the public domain. + This example code is in the public domain. */ diff --git a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino index cf81f582ce8..008108a7719 100644 --- a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino +++ b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino @@ -1,26 +1,26 @@ /* Physical Pixel - An example of using the Arduino board to receive data from the - computer. In this case, the Arduino boards turns on an LED when - it receives the character 'H', and turns off the LED when it - receives the character 'L'. + An example of using the Arduino board to receive data from the + computer. In this case, 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. + 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. - The circuit: - - LED connected from digital pin 13 to ground + The circuit: + - LED connected from digital pin 13 to ground - created 2006 - by David A. Mellis - modified 30 Aug 2011 - by Tom Igoe and Scott Fitzgerald + created 2006 + by David A. Mellis + modified 30 Aug 2011 + by Tom Igoe and Scott Fitzgerald - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/PhysicalPixel + http://www.arduino.cc/en/Tutorial/PhysicalPixel */ const int ledPin = 13; // the pin that the LED is attached to @@ -51,74 +51,74 @@ void loop() { /* Processing code for this example - // mouse over serial - - // Demonstrates how to send data to the Arduino I/O board, in order to - // turn ON a light if the mouse is over a square and turn it off - // if the mouse is not. - - // created 2003-4 - // based on examples by Casey Reas and Hernando Barragan - // modified 30 Aug 2011 - // by Tom Igoe - // This example code is in the public domain. - - - - import processing.serial.*; - - float boxX; - float boxY; - int boxSize = 20; - boolean mouseOverBox = false; - - Serial port; - - void setup() { - size(200, 200); - boxX = width/2.0; - boxY = height/2.0; - rectMode(RADIUS); - - // List all the available serial ports in the output pane. - // You will need to choose the port that the Arduino board is - // connected to from this list. The first port in the list is - // port #0 and the third port in the list is port #2. - // if using Processing 2.1 or later, use Serial.printArray() - println(Serial.list()); - - // Open the port that the Arduino board is connected to (in this case #0) - // Make sure to open the port at the same speed Arduino is using (9600bps) - port = new Serial(this, Serial.list()[0], 9600); - - } - - void draw() - { - background(0); - - // Test if the cursor is over the box - if (mouseX > boxX-boxSize && mouseX < boxX+boxSize && - mouseY > boxY-boxSize && mouseY < boxY+boxSize) { - mouseOverBox = true; - // draw a line around the box and change its color: - stroke(255); - fill(153); - // send an 'H' to indicate mouse is over square: - port.write('H'); - } - else { - // return the box to its inactive state: - stroke(153); - fill(153); - // send an 'L' to turn the LED off: - port.write('L'); - mouseOverBox = false; - } - - // Draw the box - rect(boxX, boxY, boxSize, boxSize); - } + // mouse over serial + + // Demonstrates how to send data to the Arduino I/O board, in order to + // turn ON a light if the mouse is over a square and turn it off + // if the mouse is not. + + // created 2003-4 + // based on examples by Casey Reas and Hernando Barragan + // modified 30 Aug 2011 + // by Tom Igoe + // This example code is in the public domain. + + + + import processing.serial.*; + + float boxX; + float boxY; + int boxSize = 20; + boolean mouseOverBox = false; + + Serial port; + + void setup() { + size(200, 200); + boxX = width/2.0; + boxY = height/2.0; + rectMode(RADIUS); + + // List all the available serial ports in the output pane. + // You will need to choose the port that the Arduino board is + // connected to from this list. The first port in the list is + // port #0 and the third port in the list is port #2. + // if using Processing 2.1 or later, use Serial.printArray() + println(Serial.list()); + + // Open the port that the Arduino board is connected to (in this case #0) + // Make sure to open the port at the same speed Arduino is using (9600bps) + port = new Serial(this, Serial.list()[0], 9600); + + } + + void draw() + { + background(0); + + // Test if the cursor is over the box + if (mouseX > boxX-boxSize && mouseX < boxX+boxSize && + mouseY > boxY-boxSize && mouseY < boxY+boxSize) { + mouseOverBox = true; + // draw a line around the box and change its color: + stroke(255); + fill(153); + // send an 'H' to indicate mouse is over square: + port.write('H'); + } + else { + // return the box to its inactive state: + stroke(153); + fill(153); + // send an 'L' to turn the LED off: + port.write('L'); + mouseOverBox = false; + } + + // Draw the box + rect(boxX, boxY, boxSize, boxSize); + } */ diff --git a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino index 18c5aaf5a6a..18108163426 100644 --- a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino +++ b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino @@ -1,23 +1,23 @@ /* Reading a serial ASCII-encoded string. - This sketch demonstrates the Serial parseInt() function. - It looks for an ASCII string of comma-separated values. - It parses them into ints, and uses those to fade an RGB LED. + This sketch demonstrates the Serial parseInt() function. + It looks for an ASCII string of comma-separated values. + It parses them into ints, and uses those to fade an RGB LED. - Circuit: Common-Cathode RGB LED wired like so: - - Red anode: digital pin 3 - - Green anode: digital pin 5 - - Blue anode: digital pin 6 - - Cathode : GND + Circuit: Common-Cathode RGB LED wired like so: + - Red anode: digital pin 3 + - Green anode: digital pin 5 + - Blue anode: digital pin 6 + - Cathode : GND - created 13 Apr 2012 - by Tom Igoe - - modified 14 Mar 2016 - by Arturo Guadalupi + created 13 Apr 2012 + by Tom Igoe + + modified 14 Mar 2016 + by Arturo Guadalupi - This example code is in the public domain. + This example code is in the public domain. */ // pins for the LEDs: diff --git a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino index 5aa1b33205d..a9774ff2a23 100644 --- a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino +++ b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino @@ -1,26 +1,26 @@ /* Serial Call and Response - Language: Wiring/Arduino + Language: Wiring/Arduino - This program sends an ASCII A (byte of value 65) on startup - and repeats that until it gets some data in. - Then it waits for a byte in the serial port, and - sends three sensor values whenever it gets a byte in. + This program sends an ASCII A (byte of value 65) on startup + and repeats that until it gets some data in. + Then it waits for a byte in the serial port, and + sends three sensor values whenever it gets a byte in. - Thanks to Greg Shakar and Scott Fitzgerald for the improvements + Thanks to Greg Shakar and Scott Fitzgerald for the improvements - The circuit: - - potentiometers attached to analog inputs 0 and 1 - - pushbutton attached to digital I/O 2 + The circuit: + - potentiometers attached to analog inputs 0 and 1 + - pushbutton attached to digital I/O 2 - Created 26 Sept. 2005 - by Tom Igoe - modified 24 April 2012 - by Tom Igoe and Scott Fitzgerald + Created 26 Sept. 2005 + by Tom Igoe + modified 24 April 2012 + by Tom Igoe and Scott Fitzgerald - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/SerialCallResponse + http://www.arduino.cc/en/Tutorial/SerialCallResponse */ @@ -68,82 +68,82 @@ void establishContact() { } /* -Processing sketch to run with this example: - -// This example code is in the public domain. - -import processing.serial.*; - -int bgcolor; // Background color -int fgcolor; // Fill color -Serial myPort; // The serial port -int[] serialInArray = new int[3]; // Where we'll put what we receive -int serialCount = 0; // A count of how many bytes we receive -int xpos, ypos; // Starting position of the ball -boolean firstContact = false; // Whether we've heard from the microcontroller - -void setup() { - size(256, 256); // Stage size - noStroke(); // No border on the next thing drawn - - // Set the starting position of the ball (middle of the stage) - xpos = width/2; - ypos = height/2; - - // Print a list of the serial ports for debugging purposes - // if using Processing 2.1 or later, use Serial.printArray() - println(Serial.list()); - - // I know that the first port in the serial list on my Mac - // is always my FTDI adaptor, so I open Serial.list()[0]. - // On Windows machines, this generally opens COM1. - // Open whatever port is the one you're using. - String portName = Serial.list()[0]; - myPort = new Serial(this, portName, 9600); -} + Processing sketch to run with this example: + + // This example code is in the public domain. + + import processing.serial.*; + + int bgcolor; // Background color + int fgcolor; // Fill color + Serial myPort; // The serial port + int[] serialInArray = new int[3]; // Where we'll put what we receive + int serialCount = 0; // A count of how many bytes we receive + int xpos, ypos; // Starting position of the ball + boolean firstContact = false; // Whether we've heard from the microcontroller + + void setup() { + size(256, 256); // Stage size + noStroke(); // No border on the next thing drawn + + // Set the starting position of the ball (middle of the stage) + xpos = width/2; + ypos = height/2; + + // Print a list of the serial ports for debugging purposes + // if using Processing 2.1 or later, use Serial.printArray() + println(Serial.list()); + + // I know that the first port in the serial list on my Mac + // is always my FTDI adaptor, so I open Serial.list()[0]. + // On Windows machines, this generally opens COM1. + // Open whatever port is the one you're using. + String portName = Serial.list()[0]; + myPort = new Serial(this, portName, 9600); + } -void draw() { - background(bgcolor); - fill(fgcolor); - // Draw the shape - ellipse(xpos, ypos, 20, 20); -} + void draw() { + background(bgcolor); + fill(fgcolor); + // Draw the shape + ellipse(xpos, ypos, 20, 20); + } -void serialEvent(Serial myPort) { - // read a byte from the serial port: - int inByte = myPort.read(); - // if this is the first byte received, and it's an A, - // clear the serial buffer and note that you've - // had first contact from the microcontroller. - // Otherwise, add the incoming byte to the array: - if (firstContact == false) { - if (inByte == 'A') { - myPort.clear(); // clear the serial port buffer - firstContact = true; // you've had first contact from the microcontroller - myPort.write('A'); // ask for more + void serialEvent(Serial myPort) { + // read a byte from the serial port: + int inByte = myPort.read(); + // if this is the first byte received, and it's an A, + // clear the serial buffer and note that you've + // had first contact from the microcontroller. + // Otherwise, add the incoming byte to the array: + if (firstContact == false) { + if (inByte == 'A') { + myPort.clear(); // clear the serial port buffer + firstContact = true; // you've had first contact from the microcontroller + myPort.write('A'); // ask for more + } } - } - else { - // Add the latest byte from the serial port to array: - serialInArray[serialCount] = inByte; - serialCount++; - - // If we have 3 bytes: - if (serialCount > 2 ) { - xpos = serialInArray[0]; - ypos = serialInArray[1]; - fgcolor = serialInArray[2]; - - // print the values (for debugging purposes only): - println(xpos + "\t" + ypos + "\t" + fgcolor); - - // Send a capital A to request new sensor readings: - myPort.write('A'); - // Reset serialCount: - serialCount = 0; + else { + // Add the latest byte from the serial port to array: + serialInArray[serialCount] = inByte; + serialCount++; + + // If we have 3 bytes: + if (serialCount > 2 ) { + xpos = serialInArray[0]; + ypos = serialInArray[1]; + fgcolor = serialInArray[2]; + + // print the values (for debugging purposes only): + println(xpos + "\t" + ypos + "\t" + fgcolor); + + // Send a capital A to request new sensor readings: + myPort.write('A'); + // Reset serialCount: + serialCount = 0; + } } } -} */ /* diff --git a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino index b44c908c507..de874d884a6 100644 --- a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino +++ b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino @@ -1,30 +1,30 @@ /* Serial Call and Response in ASCII - Language: Wiring/Arduino + Language: Wiring/Arduino - This program sends an ASCII A (byte of value 65) on startup - and repeats that until it gets some data in. - Then it waits for a byte in the serial port, and - sends three ASCII-encoded, comma-separated sensor values, - truncated by a linefeed and carriage return, - whenever it gets a byte in. + This program sends an ASCII A (byte of value 65) on startup + and repeats that until it gets some data in. + Then it waits for a byte in the serial port, and + sends three ASCII-encoded, comma-separated sensor values, + truncated by a linefeed and carriage return, + whenever it gets a byte in. - Thanks to Greg Shakar and Scott Fitzgerald for the improvements + Thanks to Greg Shakar and Scott Fitzgerald for the improvements - The circuit: - - potentiometers attached to analog inputs 0 and 1 - - pushbutton attached to digital I/O 2 + The circuit: + - potentiometers attached to analog inputs 0 and 1 + - pushbutton attached to digital I/O 2 - Created 26 Sept. 2005 - by Tom Igoe - modified 24 Apr 2012 - by Tom Igoe and Scott Fitzgerald + Created 26 Sept. 2005 + by Tom Igoe + modified 24 Apr 2012 + by Tom Igoe and Scott Fitzgerald - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/SerialCallResponseASCII + http://www.arduino.cc/en/Tutorial/SerialCallResponseASCII */ @@ -74,72 +74,72 @@ void establishContact() { /* -Processing code to run with this example: + Processing code to run with this example: -// This example code is in the public domain. + // This example code is in the public domain. -import processing.serial.*; // import the Processing serial library -Serial myPort; // The serial port + import processing.serial.*; // import the Processing serial library + Serial myPort; // The serial port -float bgcolor; // Background color -float fgcolor; // Fill color -float xpos, ypos; // Starting position of the ball + float bgcolor; // Background color + float fgcolor; // Fill color + float xpos, ypos; // Starting position of the ball -void setup() { - size(640,480); - - // List all the available serial ports - // if using Processing 2.1 or later, use Serial.printArray() - println(Serial.list()); - - // I know that the first port in the serial list on my Mac - // is always my Arduino board, so I open Serial.list()[0]. - // Change the 0 to the appropriate number of the serial port - // that your microcontroller is attached to. - myPort = new Serial(this, Serial.list()[0], 9600); + void setup() { + size(640,480); - // read bytes into a buffer until you get a linefeed (ASCII 10): - myPort.bufferUntil('\n'); - - // draw with smooth edges: - smooth(); -} + // List all the available serial ports + // if using Processing 2.1 or later, use Serial.printArray() + println(Serial.list()); -void draw() { - background(bgcolor); - fill(fgcolor); - // Draw the shape - ellipse(xpos, ypos, 20, 20); -} + // I know that the first port in the serial list on my Mac + // is always my Arduino board, so I open Serial.list()[0]. + // Change the 0 to the appropriate number of the serial port + // that your microcontroller is attached to. + myPort = new Serial(this, Serial.list()[0], 9600); -// serialEvent method is run automatically by the Processing applet -// whenever the buffer reaches the byte value set in the bufferUntil() -// method in the setup(): + // read bytes into a buffer until you get a linefeed (ASCII 10): + myPort.bufferUntil('\n'); -void serialEvent(Serial myPort) { - // read the serial buffer: - String myString = myPort.readStringUntil('\n'); - // if you got any bytes other than the linefeed: - myString = trim(myString); + // draw with smooth edges: + smooth(); + } - // split the string at the commas - // and convert the sections into integers: - int sensors[] = int(split(myString, ',')); + void draw() { + background(bgcolor); + fill(fgcolor); + // Draw the shape + ellipse(xpos, ypos, 20, 20); + } - // print out the values you got: - for (int sensorNum = 0; sensorNum < sensors.length; sensorNum++) { - print("Sensor " + sensorNum + ": " + sensors[sensorNum] + "\t"); + // serialEvent method is run automatically by the Processing applet + // whenever the buffer reaches the byte value set in the bufferUntil() + // method in the setup(): + + void serialEvent(Serial myPort) { + // read the serial buffer: + String myString = myPort.readStringUntil('\n'); + // if you got any bytes other than the linefeed: + myString = trim(myString); + + // split the string at the commas + // and convert the sections into integers: + int sensors[] = int(split(myString, ',')); + + // print out the values you got: + for (int sensorNum = 0; sensorNum < sensors.length; sensorNum++) { + print("Sensor " + sensorNum + ": " + sensors[sensorNum] + "\t"); + } + // add a linefeed after all the sensor values are printed: + println(); + if (sensors.length > 1) { + xpos = map(sensors[0], 0,1023,0,width); + ypos = map(sensors[1], 0,1023,0,height); + fgcolor = sensors[2]; + } + // send a byte to ask for more data: + myPort.write("A"); } - // add a linefeed after all the sensor values are printed: - println(); - if (sensors.length > 1) { - xpos = map(sensors[0], 0,1023,0,width); - ypos = map(sensors[1], 0,1023,0,height); - fgcolor = sensors[2]; - } - // send a byte to ask for more data: - myPort.write("A"); - } */ diff --git a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino index 4bcb68bd707..0594ab802cd 100644 --- a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino +++ b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino @@ -1,22 +1,22 @@ /* Serial Event example - When new serial data arrives, this sketch adds it to a String. - When a newline is received, the loop prints the string and - clears it. + When new serial data arrives, this sketch adds it to a String. + When a newline is received, the loop prints the string and + clears it. - A good test for this is to try it with a GPS receiver - that sends out NMEA 0183 sentences. + A good test for this is to try it with a GPS receiver + that sends out NMEA 0183 sentences. - NOTE: The serialEvent() feature is not available on the - Leonardo, Micro, or other ATmega32U4 based boards. - - Created 9 May 2011 - by Tom Igoe + NOTE: The serialEvent() feature is not available on the + Leonardo, Micro, or other ATmega32U4 based boards. + + Created 9 May 2011 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/SerialEvent + http://www.arduino.cc/en/Tutorial/SerialEvent */ @@ -42,9 +42,9 @@ void loop() { /* SerialEvent occurs whenever a new data comes in the - hardware serial RX. This routine is run between each - time loop() runs, so using delay inside loop can delay - response. Multiple bytes of data may be available. + hardware serial RX. This routine is run between each + time loop() runs, so using delay inside loop can delay + response. Multiple bytes of data may be available. */ void serialEvent() { while (Serial.available()) { diff --git a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino index 890dcc1f5ca..e278b534be4 100644 --- a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino +++ b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino @@ -1,17 +1,17 @@ /* This example reads three analog sensors (potentiometers are easiest) - and sends their values serially. The Processing and Max/MSP programs at the bottom - take those three values and use them to change the background color of the screen. + and sends their values serially. The Processing and Max/MSP programs at the bottom + take those three values and use them to change the background color of the screen. - The circuit: - - potentiometers attached to analog inputs 0, 1, and 2 + The circuit: + - potentiometers attached to analog inputs 0, 1, and 2 - http://www.arduino.cc/en/Tutorial/VirtualColorMixer + http://www.arduino.cc/en/Tutorial/VirtualColorMixer - created 2 Dec 2006 - by David A. Mellis - modified 30 Aug 2011 - by Tom Igoe and Scott Fitzgerald + created 2 Dec 2006 + by David A. Mellis + modified 30 Aug 2011 + by Tom Igoe and Scott Fitzgerald This example code is in the public domain. */ @@ -34,57 +34,57 @@ void loop() { /* Processing code for this example -// This example code is in the public domain. + // This example code is in the public domain. -import processing.serial.*; + import processing.serial.*; -float redValue = 0; // red value -float greenValue = 0; // green value -float blueValue = 0; // blue value + float redValue = 0; // red value + float greenValue = 0; // green value + float blueValue = 0; // blue value -Serial myPort; + Serial myPort; -void setup() { - size(200, 200); - - // List all the available serial ports - // if using Processing 2.1 or later, use Serial.printArray() - println(Serial.list()); - - // I know that the first port in the serial list on my Mac - // is always my Arduino, so I open Serial.list()[0]. - // Open whatever port is the one you're using. - myPort = new Serial(this, Serial.list()[0], 9600); - // don't generate a serialEvent() unless you get a newline character: - myPort.bufferUntil('\n'); -} + void setup() { + size(200, 200); -void draw() { - // set the background color with the color values: - background(redValue, greenValue, blueValue); -} + // List all the available serial ports + // if using Processing 2.1 or later, use Serial.printArray() + println(Serial.list()); + + // I know that the first port in the serial list on my Mac + // is always my Arduino, so I open Serial.list()[0]. + // Open whatever port is the one you're using. + myPort = new Serial(this, Serial.list()[0], 9600); + // don't generate a serialEvent() unless you get a newline character: + myPort.bufferUntil('\n'); + } + + void draw() { + // set the background color with the color values: + background(redValue, greenValue, blueValue); + } -void serialEvent(Serial myPort) { - // get the ASCII string: - String inString = myPort.readStringUntil('\n'); - - if (inString != null) { - // trim off any whitespace: - inString = trim(inString); - // split the string on the commas and convert the - // resulting substrings into an integer array: - float[] colors = float(split(inString, ",")); - // if the array has at least three elements, you know - // you got the whole thing. Put the numbers in the - // color variables: - if (colors.length >=3) { - // map them to the range 0-255: - redValue = map(colors[0], 0, 1023, 0, 255); - greenValue = map(colors[1], 0, 1023, 0, 255); - blueValue = map(colors[2], 0, 1023, 0, 255); + void serialEvent(Serial myPort) { + // get the ASCII string: + String inString = myPort.readStringUntil('\n'); + + if (inString != null) { + // trim off any whitespace: + inString = trim(inString); + // split the string on the commas and convert the + // resulting substrings into an integer array: + float[] colors = float(split(inString, ",")); + // if the array has at least three elements, you know + // you got the whole thing. Put the numbers in the + // color variables: + if (colors.length >=3) { + // map them to the range 0-255: + redValue = map(colors[0], 0, 1023, 0, 255); + greenValue = map(colors[1], 0, 1023, 0, 255); + blueValue = map(colors[2], 0, 1023, 0, 255); + } } } -} */ diff --git a/build/shared/examples/05.Control/Arrays/Arrays.ino b/build/shared/examples/05.Control/Arrays/Arrays.ino index d17e02fe468..80f1b6ea365 100644 --- a/build/shared/examples/05.Control/Arrays/Arrays.ino +++ b/build/shared/examples/05.Control/Arrays/Arrays.ino @@ -1,24 +1,24 @@ /* Arrays - Demonstrates the use of an array to hold pin numbers - in order to iterate over the pins in a sequence. - Lights multiple LEDs in sequence, then in reverse. + Demonstrates the use of an array to hold pin numbers + in order to iterate over the pins in a sequence. + Lights multiple LEDs in sequence, then in reverse. - Unlike the For Loop tutorial, where the pins have to be - contiguous, here the pins can be in any random order. + Unlike the For Loop tutorial, where the pins have to be + contiguous, here the pins can be in any random order. - The circuit: - - LEDs from pins 2 through 7 to ground + The circuit: + - LEDs from pins 2 through 7 to ground - created 2006 - by David A. Mellis - modified 30 Aug 2011 - by Tom Igoe + created 2006 + by David A. Mellis + modified 30 Aug 2011 + by Tom Igoe -This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/Array + http://www.arduino.cc/en/Tutorial/Array */ int timer = 100; // The higher the number, the slower the timing. diff --git a/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino b/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino index 66b662b23b3..41690fc14bd 100644 --- a/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino +++ b/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino @@ -1,20 +1,20 @@ /* For Loop Iteration - Demonstrates the use of a for() loop. - Lights multiple LEDs in sequence, then in reverse. + Demonstrates the use of a for() loop. + Lights multiple LEDs in sequence, then in reverse. - The circuit: - - LEDs from pins 2 through 7 to ground + The circuit: + - LEDs from pins 2 through 7 to ground - created 2006 - by David A. Mellis - modified 30 Aug 2011 - by Tom Igoe + created 2006 + by David A. Mellis + modified 30 Aug 2011 + by Tom Igoe -This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/ForLoop + http://www.arduino.cc/en/Tutorial/ForLoop */ int timer = 100; // The higher the number, the slower the timing. diff --git a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino index 38dea2da20f..52598dd97e9 100644 --- a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino +++ b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino @@ -1,27 +1,27 @@ /* Conditionals - If statement - This example demonstrates the use of if() statements. - It reads the state of a potentiometer (an analog input) and turns on an LED - only if the potentiometer goes above a certain threshold level. It prints the analog value - regardless of the level. + This example demonstrates the use of if() statements. + It reads the state of a potentiometer (an analog input) and turns on an LED + only if the potentiometer goes above a certain threshold level. It prints the analog value + regardless of the level. - The circuit: - - potentiometer connected to analog pin 0. - Center pin of the potentiometer goes to the analog pin. - side pins of the potentiometer go to +5V and ground - - LED connected from digital pin 13 to ground + The circuit: + - potentiometer connected to analog pin 0. + Center pin of the potentiometer goes to the analog pin. + side pins of the potentiometer go to +5V and ground + - LED connected from digital pin 13 to ground - - Note: On most Arduino boards, there is already an LED on the board - connected to pin 13, so you don't need any extra components for this example. + - Note: On most Arduino boards, there is already an LED on the board + connected to pin 13, so you don't need any extra components for this example. - created 17 Jan 2009 - modified 9 Apr 2012 - by Tom Igoe + created 17 Jan 2009 + modified 9 Apr 2012 + by Tom Igoe -This example code is in the public domain. + This example code is in the public domain. -http://www.arduino.cc/en/Tutorial/IfStatement + http://www.arduino.cc/en/Tutorial/IfStatement */ diff --git a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino index df1f2063ea6..1b84265daa1 100644 --- a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino +++ b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino @@ -1,30 +1,30 @@ /* Conditionals - while statement - This example demonstrates the use of while() statements. + This example demonstrates the use of while() statements. - While the pushbutton is pressed, the sketch runs the calibration routine. - The sensor readings during the while loop define the minimum and maximum - of expected values from the photoresistor. + While the pushbutton is pressed, the sketch runs the calibration routine. + The sensor readings during the while loop define the minimum and maximum + of expected values from the photoresistor. - This is a variation on the calibrate example. + This is a variation on the calibrate example. - The circuit: - - photoresistor connected from +5V to analog in pin 0 - - 10K resistor connected from ground to analog in pin 0 - - LED connected from digital pin 9 to ground through 220 ohm resistor - - pushbutton attached from pin 2 to +5V - - 10K resistor attached from pin 2 to ground + The circuit: + - photoresistor connected from +5V to analog in pin 0 + - 10K resistor connected from ground to analog in pin 0 + - LED connected from digital pin 9 to ground through 220 ohm resistor + - pushbutton attached from pin 2 to +5V + - 10K resistor attached from pin 2 to ground - created 17 Jan 2009 - modified 30 Aug 2011 - by Tom Igoe - modified 20 Jan 2017 - by Arturo Guadalupi + created 17 Jan 2009 + modified 30 Aug 2011 + by Tom Igoe + modified 20 Jan 2017 + by Arturo Guadalupi - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/WhileLoop + http://www.arduino.cc/en/Tutorial/WhileLoop */ diff --git a/build/shared/examples/05.Control/switchCase/switchCase.ino b/build/shared/examples/05.Control/switchCase/switchCase.ino index a1b32343d3a..040526d8eb2 100644 --- a/build/shared/examples/05.Control/switchCase/switchCase.ino +++ b/build/shared/examples/05.Control/switchCase/switchCase.ino @@ -1,25 +1,25 @@ /* Switch statement - Demonstrates the use of a switch statement. The switch - statement allows you to choose from among a set of discrete values - of a variable. It's like a series of if statements. + Demonstrates the use of a switch statement. The switch + statement allows you to choose from among a set of discrete values + of a variable. It's like a series of if statements. - To see this sketch in action, put the board and sensor in a well-lit - room, open the Serial Monitor, and move your hand gradually down - over the sensor. + To see this sketch in action, put the board and sensor in a well-lit + room, open the Serial Monitor, and move your hand gradually down + over the sensor. - The circuit: - - photoresistor from analog in 0 to +5V - - 10K resistor from analog in 0 to ground + The circuit: + - photoresistor from analog in 0 to +5V + - 10K resistor from analog in 0 to ground - created 1 Jul 2009 - modified 9 Apr 2012 - by Tom Igoe + created 1 Jul 2009 + modified 9 Apr 2012 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/SwitchCase + http://www.arduino.cc/en/Tutorial/SwitchCase */ // these constants won't change. They are the diff --git a/build/shared/examples/05.Control/switchCase2/switchCase2.ino b/build/shared/examples/05.Control/switchCase2/switchCase2.ino index 28761534458..fce099adaf0 100644 --- a/build/shared/examples/05.Control/switchCase2/switchCase2.ino +++ b/build/shared/examples/05.Control/switchCase2/switchCase2.ino @@ -1,23 +1,23 @@ /* Switch statement with serial input - Demonstrates the use of a switch statement. The switch - statement allows you to choose from among a set of discrete values - of a variable. It's like a series of if statements. + Demonstrates the use of a switch statement. The switch + statement allows you to choose from among a set of discrete values + of a variable. It's like a series of if statements. - To see this sketch in action, open the Serial monitor and send any character. - The characters a, b, c, d, and e, will turn on LEDs. Any other character will turn - the LEDs off. + To see this sketch in action, open the Serial monitor and send any character. + The characters a, b, c, d, and e, will turn on LEDs. Any other character will turn + the LEDs off. - The circuit: - - 5 LEDs attached to digital pins 2 through 6 through 220-ohm resistors + The circuit: + - 5 LEDs attached to digital pins 2 through 6 through 220-ohm resistors - created 1 Jul 2009 - by Tom Igoe + created 1 Jul 2009 + by Tom Igoe -This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/SwitchCase2 + http://www.arduino.cc/en/Tutorial/SwitchCase2 */ void setup() { diff --git a/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino b/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino index ab810084963..30ba37e5452 100644 --- a/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino +++ b/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino @@ -1,28 +1,28 @@ /* - ADXL3xx + ADXL3xx - Reads an Analog Devices ADXL3xx accelerometer and communicates the - acceleration to the computer. The pins used are designed to be easily - compatible with the breakout boards from SparkFun, available from: - http://www.sparkfun.com/commerce/categories.php?c=80 + Reads an Analog Devices ADXL3xx accelerometer and communicates the + acceleration to the computer. The pins used are designed to be easily + compatible with the breakout boards from SparkFun, available from: + http://www.sparkfun.com/commerce/categories.php?c=80 - http://www.arduino.cc/en/Tutorial/ADXL3xx + http://www.arduino.cc/en/Tutorial/ADXL3xx - The circuit: - analog 0: accelerometer self test - analog 1: z-axis - analog 2: y-axis - analog 3: x-axis - analog 4: ground - analog 5: vcc + The circuit: + analog 0: accelerometer self test + analog 1: z-axis + analog 2: y-axis + analog 3: x-axis + analog 4: ground + analog 5: vcc - created 2 Jul 2008 - by David A. Mellis - modified 30 Aug 2011 - by Tom Igoe + created 2 Jul 2008 + by David A. Mellis + modified 30 Aug 2011 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. */ diff --git a/build/shared/examples/06.Sensors/Knock/Knock.ino b/build/shared/examples/06.Sensors/Knock/Knock.ino index 912377d6b41..fc2f9e8b91c 100644 --- a/build/shared/examples/06.Sensors/Knock/Knock.ino +++ b/build/shared/examples/06.Sensors/Knock/Knock.ino @@ -1,23 +1,23 @@ /* Knock Sensor - This sketch reads a piezo element to detect a knocking sound. - It reads an analog pin and compares the result to a set threshold. - If the result is greater than the threshold, it writes - "knock" to the serial port, and toggles the LED on pin 13. + This sketch reads a piezo element to detect a knocking sound. + It reads an analog pin and compares the result to a set threshold. + If the result is greater than the threshold, it writes + "knock" to the serial port, and toggles the LED on pin 13. - The circuit: - - + connection of the piezo attached to analog in 0 - - - connection of the piezo attached to ground - - 1-megohm resistor attached from analog in 0 to ground + The circuit: + - + connection of the piezo attached to analog in 0 + - - connection of the piezo attached to ground + - 1-megohm resistor attached from analog in 0 to ground - http://www.arduino.cc/en/Tutorial/Knock + http://www.arduino.cc/en/Tutorial/Knock - created 25 Mar 2007 - by David Cuartielles - modified 30 Aug 2011 - by Tom Igoe + created 25 Mar 2007 + by David Cuartielles + modified 30 Aug 2011 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. */ diff --git a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino index 8f0d2d2ca27..20f9612e85f 100644 --- a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino +++ b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino @@ -1,25 +1,25 @@ /* - Memsic2125 + Memsic2125 - Read the Memsic 2125 two-axis accelerometer. Converts the - pulses output by the 2125 into milli-g's (1/1000 of Earth's - gravity) and prints them over the serial connection to the - computer. + Read the Memsic 2125 two-axis accelerometer. Converts the + pulses output by the 2125 into milli-g's (1/1000 of Earth's + gravity) and prints them over the serial connection to the + computer. - The circuit: - - X output of accelerometer to digital pin 2 - - Y output of accelerometer to digital pin 3 - - +V of accelerometer to +5V - - GND of accelerometer to ground + The circuit: + - X output of accelerometer to digital pin 2 + - Y output of accelerometer to digital pin 3 + - +V of accelerometer to +5V + - GND of accelerometer to ground - http://www.arduino.cc/en/Tutorial/Memsic2125 + http://www.arduino.cc/en/Tutorial/Memsic2125 - created 6 Nov 2008 - by David A. Mellis - modified 30 Aug 2011 - by Tom Igoe + created 6 Nov 2008 + by David A. Mellis + modified 30 Aug 2011 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. */ diff --git a/build/shared/examples/06.Sensors/Ping/Ping.ino b/build/shared/examples/06.Sensors/Ping/Ping.ino index afe49bd0693..078a99b5265 100644 --- a/build/shared/examples/06.Sensors/Ping/Ping.ino +++ b/build/shared/examples/06.Sensors/Ping/Ping.ino @@ -1,24 +1,24 @@ /* Ping))) Sensor - This sketch reads a PING))) ultrasonic rangefinder and returns the - distance to the closest object in range. To do this, it sends a pulse - to the sensor to initiate a reading, then listens for a pulse - to return. The length of the returning pulse is proportional to - the distance of the object from the sensor. + This sketch reads a PING))) ultrasonic rangefinder and returns the + distance to the closest object in range. To do this, it sends a pulse + to the sensor to initiate a reading, then listens for a pulse + to return. The length of the returning pulse is proportional to + the distance of the object from the sensor. - The circuit: - - +V connection of the PING))) attached to +5V - - GND connection of the PING))) attached to ground - - SIG connection of the PING))) attached to digital pin 7 + The circuit: + - +V connection of the PING))) attached to +5V + - GND connection of the PING))) attached to ground + - SIG connection of the PING))) attached to digital pin 7 - http://www.arduino.cc/en/Tutorial/Ping + http://www.arduino.cc/en/Tutorial/Ping - created 3 Nov 2008 - by David A. Mellis - modified 30 Aug 2011 - by Tom Igoe + created 3 Nov 2008 + by David A. Mellis + modified 30 Aug 2011 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. */ diff --git a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino index c7c95137930..00df13e0d72 100644 --- a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino +++ b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino @@ -1,36 +1,36 @@ /* Row-Column Scanning an 8x8 LED matrix with X-Y input - This example controls an 8x8 LED matrix using two analog inputs + This example controls an 8x8 LED matrix using two analog inputs - created 27 May 2009 - modified 30 Aug 2011 - by Tom Igoe + created 27 May 2009 + modified 30 Aug 2011 + by Tom Igoe - This example works for the Lumex LDM-24488NI Matrix. See - http://sigma.octopart.com/140413/datasheet/Lumex-LDM-24488NI.pdf - for the pin connections + This example works for the Lumex LDM-24488NI Matrix. See + http://sigma.octopart.com/140413/datasheet/Lumex-LDM-24488NI.pdf + for the pin connections - For other LED cathode column matrixes, you should only need to change - the pin numbers in the row[] and column[] arrays + For other LED cathode column matrixes, you should only need to change + the pin numbers in the row[] and column[] arrays - rows are the anodes - cols are the cathodes - --------- + rows are the anodes + cols are the cathodes + --------- - Pin numbers: - Matrix: - - Digital pins 2 through 13, - - analog pins 2 through 5 used as digital 16 through 19 - Potentiometers: - - center pins are attached to analog pins 0 and 1, respectively - - side pins attached to +5V and ground, respectively. + Pin numbers: + Matrix: + - Digital pins 2 through 13, + - analog pins 2 through 5 used as digital 16 through 19 + Potentiometers: + - center pins are attached to analog pins 0 and 1, respectively + - side pins attached to +5V and ground, respectively. - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/RowColumnScanning + http://www.arduino.cc/en/Tutorial/RowColumnScanning - see also http://www.tigoe.net/pcomp/code/category/arduinowiring/514 for more + see also http://www.tigoe.net/pcomp/code/category/arduinowiring/514 for more */ diff --git a/build/shared/examples/07.Display/barGraph/barGraph.ino b/build/shared/examples/07.Display/barGraph/barGraph.ino index 72c329bfd69..fdd94ae8fe3 100644 --- a/build/shared/examples/07.Display/barGraph/barGraph.ino +++ b/build/shared/examples/07.Display/barGraph/barGraph.ino @@ -12,12 +12,12 @@ The circuit: - LEDs from pins 2 through 11 to ground - created 4 Sep 2010 - by Tom Igoe + created 4 Sep 2010 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/BarGraph + http://www.arduino.cc/en/Tutorial/BarGraph */ diff --git a/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino b/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino index 19b5be6ec97..cc85eab1067 100644 --- a/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino +++ b/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino @@ -1,14 +1,14 @@ /* Character analysis operators - Examples using the character analysis operators. - Send any byte and the sketch will tell you about it. + Examples using the character analysis operators. + Send any byte and the sketch will tell you about it. - created 29 Nov 2010 - modified 2 Apr 2012 - by Tom Igoe + created 29 Nov 2010 + modified 2 Apr 2012 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. */ void setup() { diff --git a/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino b/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino index a1cb72e09b1..724a9b48dfe 100644 --- a/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino +++ b/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino @@ -1,16 +1,16 @@ /* Adding Strings together - Examples of how to add Strings together - You can also add several different data types to String, as shown here: + Examples of how to add Strings together + You can also add several different data types to String, as shown here: - created 27 July 2010 - modified 2 Apr 2012 - by Tom Igoe + created 27 July 2010 + modified 2 Apr 2012 + by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringAdditionOperator + http://www.arduino.cc/en/Tutorial/StringAdditionOperator - This example code is in the public domain. + This example code is in the public domain. */ // declare three Strings: diff --git a/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino b/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino index 36d5ffd3615..94a2c82c8ea 100644 --- a/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino +++ b/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino @@ -1,15 +1,15 @@ /* Appending to Strings using the += operator and concat() - Examples of how to append different data types to Strings + Examples of how to append different data types to Strings - created 27 July 2010 - modified 2 Apr 2012 - by Tom Igoe + created 27 July 2010 + modified 2 Apr 2012 + by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringAppendOperator + http://www.arduino.cc/en/Tutorial/StringAppendOperator - This example code is in the public domain. + This example code is in the public domain. */ String stringOne, stringTwo; diff --git a/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino b/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino index b426be92cb6..ae5d51ba263 100644 --- a/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino +++ b/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino @@ -1,15 +1,15 @@ /* String Case changes - Examples of how to change the case of a String + Examples of how to change the case of a String - created 27 July 2010 - modified 2 Apr 2012 - by Tom Igoe + created 27 July 2010 + modified 2 Apr 2012 + by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringCaseChanges + http://www.arduino.cc/en/Tutorial/StringCaseChanges - This example code is in the public domain. + This example code is in the public domain. */ void setup() { diff --git a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino index b52fa57193c..7cd02b21dda 100644 --- a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino +++ b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino @@ -1,15 +1,15 @@ /* String charAt() and setCharAt() - Examples of how to get and set characters of a String + Examples of how to get and set characters of a String - created 27 July 2010 - modified 2 Apr 2012 - by Tom Igoe + created 27 July 2010 + modified 2 Apr 2012 + by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringCharacters + http://www.arduino.cc/en/Tutorial/StringCharacters - This example code is in the public domain. + This example code is in the public domain. */ void setup() { diff --git a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino index cfa534e39a2..89fe378549f 100644 --- a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino +++ b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino @@ -1,15 +1,15 @@ /* Comparing Strings - Examples of how to compare Strings using the comparison operators + Examples of how to compare Strings using the comparison operators - created 27 July 2010 - modified 2 Apr 2012 - by Tom Igoe + created 27 July 2010 + modified 2 Apr 2012 + by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringComparisonOperators + http://www.arduino.cc/en/Tutorial/StringComparisonOperators - This example code is in the public domain. + This example code is in the public domain. */ String stringOne, stringTwo; diff --git a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino index f07bdc10262..70310a8e196 100644 --- a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino +++ b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino @@ -1,15 +1,15 @@ /* - String constructors + String constructors - Examples of how to create Strings from other data types + Examples of how to create Strings from other data types - created 27 July 2010 - modified 30 Aug 2011 - by Tom Igoe + created 27 July 2010 + modified 30 Aug 2011 + by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringConstructors + http://www.arduino.cc/en/Tutorial/StringConstructors - This example code is in the public domain. + This example code is in the public domain. */ void setup() { diff --git a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino index 7071e73556b..d97f4910487 100644 --- a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino +++ b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino @@ -1,15 +1,15 @@ /* String indexOf() and lastIndexOf() functions - Examples of how to evaluate, look for, and replace characters in a String + Examples of how to evaluate, look for, and replace characters in a String - created 27 July 2010 - modified 2 Apr 2012 - by Tom Igoe + created 27 July 2010 + modified 2 Apr 2012 + by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringIndexOf + http://www.arduino.cc/en/Tutorial/StringIndexOf - This example code is in the public domain. + This example code is in the public domain. */ void setup() { diff --git a/build/shared/examples/08.Strings/StringLength/StringLength.ino b/build/shared/examples/08.Strings/StringLength/StringLength.ino index 35f315c7f51..c7ed18b1720 100644 --- a/build/shared/examples/08.Strings/StringLength/StringLength.ino +++ b/build/shared/examples/08.Strings/StringLength/StringLength.ino @@ -1,15 +1,15 @@ /* String length() - Examples of how to use length() in a String. - Open the Serial Monitor and start sending characters to see the results. + Examples of how to use length() in a String. + Open the Serial Monitor and start sending characters to see the results. - created 1 Aug 2010 - by Tom Igoe + created 1 Aug 2010 + by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringLengthTrim + http://www.arduino.cc/en/Tutorial/StringLengthTrim - This example code is in the public domain. + This example code is in the public domain. */ String txtMsg = ""; // a string for incoming text diff --git a/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino b/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino index 9a36b17a182..78b4d1638fc 100644 --- a/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino +++ b/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino @@ -1,15 +1,15 @@ /* String length() and trim() - Examples of how to use length() and trim() in a String + Examples of how to use length() and trim() in a String - created 27 July 2010 - modified 2 Apr 2012 - by Tom Igoe + created 27 July 2010 + modified 2 Apr 2012 + by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringLengthTrim + http://www.arduino.cc/en/Tutorial/StringLengthTrim - This example code is in the public domain. + This example code is in the public domain. */ void setup() { diff --git a/build/shared/examples/08.Strings/StringReplace/StringReplace.ino b/build/shared/examples/08.Strings/StringReplace/StringReplace.ino index 01eceee9fdf..ecc0cb1a54f 100644 --- a/build/shared/examples/08.Strings/StringReplace/StringReplace.ino +++ b/build/shared/examples/08.Strings/StringReplace/StringReplace.ino @@ -1,15 +1,15 @@ /* String replace() - Examples of how to replace characters or substrings of a String + Examples of how to replace characters or substrings of a String - created 27 July 2010 - modified 2 Apr 2012 - by Tom Igoe + created 27 July 2010 + modified 2 Apr 2012 + by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringReplace + http://www.arduino.cc/en/Tutorial/StringReplace - This example code is in the public domain. + This example code is in the public domain. */ void setup() { diff --git a/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino b/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino index be0e56ac8d2..359d1b948d0 100644 --- a/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino +++ b/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino @@ -1,15 +1,15 @@ /* String startWith() and endsWith() - Examples of how to use startsWith() and endsWith() in a String + Examples of how to use startsWith() and endsWith() in a String - created 27 July 2010 - modified 2 Apr 2012 - by Tom Igoe + created 27 July 2010 + modified 2 Apr 2012 + by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringStartsWithEndsWith + http://www.arduino.cc/en/Tutorial/StringStartsWithEndsWith - This example code is in the public domain. + This example code is in the public domain. */ void setup() { diff --git a/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino b/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino index 6fdfb002c69..4671c05230f 100644 --- a/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino +++ b/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino @@ -1,15 +1,15 @@ /* String substring() - Examples of how to use substring in a String + Examples of how to use substring in a String - created 27 July 2010, - modified 2 Apr 2012 - by Zach Eveland + created 27 July 2010, + modified 2 Apr 2012 + by Zach Eveland - http://www.arduino.cc/en/Tutorial/StringSubstring + http://www.arduino.cc/en/Tutorial/StringSubstring - This example code is in the public domain. + This example code is in the public domain. */ void setup() { diff --git a/build/shared/examples/08.Strings/StringToInt/StringToInt.ino b/build/shared/examples/08.Strings/StringToInt/StringToInt.ino index 7b3a2567ae8..7fdb6ed92eb 100644 --- a/build/shared/examples/08.Strings/StringToInt/StringToInt.ino +++ b/build/shared/examples/08.Strings/StringToInt/StringToInt.ino @@ -1,16 +1,16 @@ /* String to Integer conversion - Reads a serial input string until it sees a newline, then converts - the string to a number if the characters are digits. + Reads a serial input string until it sees a newline, then converts + the string to a number if the characters are digits. - The circuit: - No external components needed. + The circuit: + No external components needed. - created 29 Nov 2010 - by Tom Igoe + created 29 Nov 2010 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. */ String inString = ""; // string to hold input diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino index 8ee2a08f066..c2466828bd6 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino @@ -1,28 +1,28 @@ /* Keyboard logout - This sketch demonstrates the Keyboard library. + This sketch demonstrates the Keyboard library. - When you connect pin 2 to ground, it performs a logout. - It uses keyboard combinations to do this, as follows: + When you connect pin 2 to ground, it performs a logout. + It uses keyboard combinations to do this, as follows: - On Windows, CTRL-ALT-DEL followed by ALT-l - On Ubuntu, CTRL-ALT-DEL, and ENTER - On OSX, CMD-SHIFT-q + On Windows, CTRL-ALT-DEL followed by ALT-l + On Ubuntu, CTRL-ALT-DEL, and ENTER + On OSX, CMD-SHIFT-q - To wake: Spacebar. + To wake: Spacebar. - Circuit: - - Arduino Leonardo or Micro - - wire to connect D2 to ground. + Circuit: + - Arduino Leonardo or Micro + - wire to connect D2 to ground. - created 6 Mar 2012 - modified 27 Mar 2012 - by Tom Igoe + created 6 Mar 2012 + modified 27 Mar 2012 + by Tom Igoe - This example is in the public domain + This example is in the public domain - http://www.arduino.cc/en/Tutorial/KeyboardLogout + http://www.arduino.cc/en/Tutorial/KeyboardLogout */ #define OSX 0 diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino b/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino index b848aa3d0c0..4f46057b730 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino @@ -1,23 +1,23 @@ /* - Keyboard Message test + Keyboard Message test - For the Arduino Leonardo and Micro. + For the Arduino Leonardo and Micro. - Sends a text string when a button is pressed. + Sends a text string when a button is pressed. - The circuit: - - pushbutton attached from pin 4 to +5V - - 10-kilohm resistor attached from pin 4 to ground + The circuit: + - pushbutton attached from pin 4 to +5V + - 10-kilohm resistor attached from pin 4 to ground - created 24 Oct 2011 - modified 27 Mar 2012 - by Tom Igoe - modified 11 Nov 2013 - by Scott Fitzgerald + created 24 Oct 2011 + modified 27 Mar 2012 + by Tom Igoe + modified 11 Nov 2013 + by Scott Fitzgerald - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/KeyboardMessage + http://www.arduino.cc/en/Tutorial/KeyboardMessage */ #include "Keyboard.h" diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino index e49ac1a5349..50461e608dc 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino @@ -1,30 +1,30 @@ /* Arduino Programs Blink - This sketch demonstrates the Keyboard library. + This sketch demonstrates the Keyboard library. - For Leonardo and Due boards only. + For Leonardo and Due boards only. - When you connect pin 2 to ground, it creates a new - window with a key combination (CTRL-N), - then types in the Blink sketch, then auto-formats the text - using another key combination (CTRL-T), then - uploads the sketch to the currently selected Arduino using - a final key combination (CTRL-U). + When you connect pin 2 to ground, it creates a new + window with a key combination (CTRL-N), + then types in the Blink sketch, then auto-formats the text + using another key combination (CTRL-T), then + uploads the sketch to the currently selected Arduino using + a final key combination (CTRL-U). - Circuit: - - Arduino Leonardo, Micro, Due, LilyPad USB, or Yún - - wire to connect D2 to ground. + Circuit: + - Arduino Leonardo, Micro, Due, LilyPad USB, or Yún + - wire to connect D2 to ground. - created 5 Mar 2012 - modified 29 Mar 2012 - by Tom Igoe - modified 3 May 2014 - by Scott Fitzgerald + created 5 Mar 2012 + modified 29 Mar 2012 + by Tom Igoe + modified 3 May 2014 + by Scott Fitzgerald - This example is in the public domain + This example is in the public domain - http://www.arduino.cc/en/Tutorial/KeyboardReprogram + http://www.arduino.cc/en/Tutorial/KeyboardReprogram */ #include "Keyboard.h" diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino b/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino index 6fa798a2bd2..4deae41ac1b 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino @@ -1,22 +1,22 @@ /* - Keyboard test + Keyboard test - For the Arduino Leonardo, Micro or Due + For the Arduino Leonardo, Micro or Due - Reads a byte from the serial port, sends a keystroke back. - The sent keystroke is one higher than what's received, e.g. - if you send a, you get b, send A you get B, and so forth. + Reads a byte from the serial port, sends a keystroke back. + The sent keystroke is one higher than what's received, e.g. + if you send a, you get b, send A you get B, and so forth. - The circuit: - - none + The circuit: + - none - created 21 Oct 2011 - modified 27 Mar 2012 - by Tom Igoe + created 21 Oct 2011 + modified 27 Mar 2012 + by Tom Igoe - This example code is in the public domain. + This example code is in the public domain. - http://www.arduino.cc/en/Tutorial/KeyboardSerial + http://www.arduino.cc/en/Tutorial/KeyboardSerial */ #include "Keyboard.h" diff --git a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino index 78e1417d6d0..bf258ef7892 100644 --- a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino +++ b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino @@ -2,22 +2,22 @@ /* KeyboardAndMouseControl - Controls the mouse from five pushbuttons on an Arduino Leonardo, Micro or Due. + Controls the mouse from five pushbuttons on an Arduino Leonardo, Micro or Due. - Hardware: - - 5 pushbuttons attached to D2, D3, D4, D5, D6 + Hardware: + - 5 pushbuttons attached to D2, D3, D4, D5, D6 - The mouse movement is always relative. This sketch reads - four pushbuttons, and uses them to set the movement of the mouse. + The mouse movement is always relative. This sketch reads + four pushbuttons, and uses them to set the movement of the mouse. - WARNING: When you use the Mouse.move() command, the Arduino takes - over your mouse! Make sure you have control before you use the mouse commands. + WARNING: When you use the Mouse.move() command, the Arduino takes + over your mouse! Make sure you have control before you use the mouse commands. - created 15 Mar 2012 - modified 27 Mar 2012 - by Tom Igoe + created 15 Mar 2012 + modified 27 Mar 2012 + by Tom Igoe - this code is in the public domain + this code is in the public domain */ diff --git a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino index 4164f17b548..db596bb1dc3 100644 --- a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino @@ -2,25 +2,25 @@ /* ButtonMouseControl - For Leonardo and Due boards only. + For Leonardo and Due boards only. - Controls the mouse from five pushbuttons on an Arduino Leonardo, Micro or Due. + Controls the mouse from five pushbuttons on an Arduino Leonardo, Micro or Due. - Hardware: - - 5 pushbuttons attached to D2, D3, D4, D5, D6 + Hardware: + - 5 pushbuttons attached to D2, D3, D4, D5, D6 - The mouse movement is always relative. This sketch reads - four pushbuttons, and uses them to set the movement of the mouse. + The mouse movement is always relative. This sketch reads + four pushbuttons, and uses them to set the movement of the mouse. - WARNING: When you use the Mouse.move() command, the Arduino takes - over your mouse! Make sure you have control before you use the mouse commands. + WARNING: When you use the Mouse.move() command, the Arduino takes + over your mouse! Make sure you have control before you use the mouse commands. - created 15 Mar 2012 - modified 27 Mar 2012 - by Tom Igoe + created 15 Mar 2012 + modified 27 Mar 2012 + by Tom Igoe - this code is in the public domain + this code is in the public domain */ diff --git a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino index 28b3d4f882b..46b54e01c85 100644 --- a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino @@ -1,30 +1,30 @@ /* JoystickMouseControl - Controls the mouse from a joystick on an Arduino Leonardo, Micro or Due. - Uses a pushbutton to turn on and off mouse control, and - a second pushbutton to click the left mouse button + Controls the mouse from a joystick on an Arduino Leonardo, Micro or Due. + Uses a pushbutton to turn on and off mouse control, and + a second pushbutton to click the left mouse button - Hardware: - - 2-axis joystick connected to pins A0 and A1 - - pushbuttons connected to pin D2 and D3 + Hardware: + - 2-axis joystick connected to pins A0 and A1 + - pushbuttons connected to pin D2 and D3 - The mouse movement is always relative. This sketch reads - two analog inputs that range from 0 to 1023 (or less on either end) - and translates them into ranges of -6 to 6. - The sketch assumes that the joystick resting values are around the - middle of the range, but that they vary within a threshold. + The mouse movement is always relative. This sketch reads + two analog inputs that range from 0 to 1023 (or less on either end) + and translates them into ranges of -6 to 6. + The sketch assumes that the joystick resting values are around the + middle of the range, but that they vary within a threshold. - WARNING: When you use the Mouse.move() command, the Arduino takes - over your mouse! Make sure you have control before you use the command. - This sketch includes a pushbutton to toggle the mouse control state, so - you can turn on and off mouse control. + WARNING: When you use the Mouse.move() command, the Arduino takes + over your mouse! Make sure you have control before you use the command. + This sketch includes a pushbutton to toggle the mouse control state, so + you can turn on and off mouse control. - created 15 Sept 2011 - updated 28 Mar 2012 - by Tom Igoe + created 15 Sept 2011 + updated 28 Mar 2012 + by Tom Igoe - this code is in the public domain + this code is in the public domain */ @@ -97,7 +97,7 @@ void loop() { /* reads an axis (0 or 1 for x or y) and scales the - analog input range to a range from 0 to + analog input range to a range from 0 to */ int readAxis(int thisAxis) { diff --git a/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino b/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino index 11d458d2247..a963a3f278a 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino @@ -1,23 +1,23 @@ /* Arduino Starter Kit example - Project 2 - Spaceship Interface + Project 2 - Spaceship Interface - This sketch is written to accompany Project 2 in the - Arduino Starter Kit + This sketch is written to accompany Project 2 in the + Arduino Starter Kit - Parts required: - 1 green LED - 2 red LEDs - pushbutton - 10 kilohm resistor - 3 220 ohm resistors + Parts required: + 1 green LED + 2 red LEDs + pushbutton + 10 kilohm resistor + 3 220 ohm resistors - Created 13 September 2012 - by Scott Fitzgerald + Created 13 September 2012 + by Scott Fitzgerald - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ // Create a global variable to hold the diff --git a/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino b/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino index ea63abe2785..8bd82fed7be 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino @@ -1,21 +1,21 @@ /* Arduino Starter Kit example - Project 3 - Love-O-Meter + Project 3 - Love-O-Meter - This sketch is written to accompany Project 3 in the - Arduino Starter Kit + This sketch is written to accompany Project 3 in the + Arduino Starter Kit - Parts required: - 1 TMP36 temperature sensor - 3 red LEDs - 3 220 ohm resistors + Parts required: + 1 TMP36 temperature sensor + 3 red LEDs + 3 220 ohm resistors - Created 13 September 2012 - by Scott Fitzgerald + Created 13 September 2012 + by Scott Fitzgerald - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ // named constant for the pin the sensor is connected to diff --git a/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino b/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino index e80b74a6e88..8b7fe862bdd 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino @@ -1,25 +1,25 @@ /* Arduino Starter Kit example - Project 4 - Color Mixing Lamp + Project 4 - Color Mixing Lamp - This sketch is written to accompany Project 3 in the - Arduino Starter Kit + This sketch is written to accompany Project 3 in the + Arduino Starter Kit - Parts required: - 1 RGB LED - three 10 kilohm resistors - 3 220 ohm resistors - 3 photoresistors - red green and blue colored gels + Parts required: + 1 RGB LED + three 10 kilohm resistors + 3 220 ohm resistors + 3 photoresistors + red green and blue colored gels - Created 13 September 2012 - Modified 14 November 2012 - by Scott Fitzgerald - Thanks to Federico Vanzati for improvements + Created 13 September 2012 + Modified 14 November 2012 + by Scott Fitzgerald + Thanks to Federico Vanzati for improvements - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ const int greenLEDPin = 9; // LED connected to digital pin 9 @@ -71,10 +71,10 @@ void loop() { Serial.println(blueSensorValue); /* - In order to use the values from the sensor for the LED, - you need to do some math. The ADC provides a 10-bit number, - but analogWrite() uses 8 bits. You'll want to divide your - sensor readings by 4 to keep them in range of the output. + In order to use the values from the sensor for the LED, + you need to do some math. The ADC provides a 10-bit number, + but analogWrite() uses 8 bits. You'll want to divide your + sensor readings by 4 to keep them in range of the output. */ redValue = redSensorValue / 4; greenValue = greenSensorValue / 4; diff --git a/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino b/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino index c7e2eeabec7..e545c9d55e9 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino @@ -1,21 +1,21 @@ /* Arduino Starter Kit example - Project 5 - Servo Mood Indicator + Project 5 - Servo Mood Indicator - This sketch is written to accompany Project 5 in the - Arduino Starter Kit + This sketch is written to accompany Project 5 in the + Arduino Starter Kit - Parts required: - servo motor - 10 kilohm potentiometer - 2 100 uF electrolytic capacitors + Parts required: + servo motor + 10 kilohm potentiometer + 2 100 uF electrolytic capacitors - Created 13 September 2012 - by Scott Fitzgerald + Created 13 September 2012 + by Scott Fitzgerald - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ // include the Servo library diff --git a/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino b/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino index e61de6d5b68..aceeee47e76 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino @@ -1,21 +1,21 @@ /* Arduino Starter Kit example - Project 6 - Light Theremin + Project 6 - Light Theremin - This sketch is written to accompany Project 6 in the - Arduino Starter Kit + This sketch is written to accompany Project 6 in the + Arduino Starter Kit - Parts required: - photoresistor - 10 kilohm resistor - piezo + Parts required: + photoresistor + 10 kilohm resistor + piezo - Created 13 September 2012 - by Scott Fitzgerald + Created 13 September 2012 + by Scott Fitzgerald - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ // variable to hold sensor value diff --git a/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino b/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino index 48d9877b170..3636501f736 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino @@ -1,23 +1,23 @@ /* Arduino Starter Kit example - Project 7 - Keyboard + Project 7 - Keyboard - This sketch is written to accompany Project 7 in the - Arduino Starter Kit + This sketch is written to accompany Project 7 in the + Arduino Starter Kit - Parts required: - two 10 kilohm resistors - 1 Megohm resistor - 220 ohm resistor - 4 pushbuttons - piezo + Parts required: + two 10 kilohm resistors + 1 Megohm resistor + 220 ohm resistor + 4 pushbuttons + piezo - Created 13 September 2012 - by Scott Fitzgerald + Created 13 September 2012 + by Scott Fitzgerald - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ // create an array of notes diff --git a/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino b/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino index 4d6eda450d5..183e7fbe2fa 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino @@ -1,22 +1,22 @@ /* Arduino Starter Kit example - Project 8 - Digital Hourglass + Project 8 - Digital Hourglass - This sketch is written to accompany Project 8 in the - Arduino Starter Kit + This sketch is written to accompany Project 8 in the + Arduino Starter Kit - Parts required: - 10 kilohm resistor - six 220 ohm resistors - six LEDs - tilt switch + Parts required: + 10 kilohm resistor + six 220 ohm resistors + six LEDs + tilt switch - Created 13 September 2012 - by Scott Fitzgerald + Created 13 September 2012 + by Scott Fitzgerald - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ // named constant for the switch pin diff --git a/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino b/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino index c61ce0ea18b..d858f1a4844 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino @@ -1,24 +1,24 @@ /* Arduino Starter Kit example - Project 9 - Motorized Pinwheel + Project 9 - Motorized Pinwheel - This sketch is written to accompany Project 9 in the - Arduino Starter Kit + This sketch is written to accompany Project 9 in the + Arduino Starter Kit - Parts required: - 10 kilohm resistor - pushbutton - motor - 9V battery - IRF520 MOSFET - 1N4007 diode + Parts required: + 10 kilohm resistor + pushbutton + motor + 9V battery + IRF520 MOSFET + 1N4007 diode - Created 13 September 2012 - by Scott Fitzgerald + Created 13 September 2012 + by Scott Fitzgerald - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ // named constants for the switch and motor pins diff --git a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino index d12c3b995a7..d9126efde15 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino @@ -1,25 +1,25 @@ /* Arduino Starter Kit example - Project 10 - Zoetrope + Project 10 - Zoetrope - This sketch is written to accompany Project 10 in the - Arduino Starter Kit + This sketch is written to accompany Project 10 in the + Arduino Starter Kit - Parts required: - two 10 kilohm resistors - 2 momentary pushbuttons - one 10 kilohm potentiometer - motor - 9V battery - H-Bridge + Parts required: + two 10 kilohm resistors + 2 momentary pushbuttons + one 10 kilohm potentiometer + motor + 9V battery + H-Bridge - Created 13 September 2012 - by Scott Fitzgerald - Thanks to Federico Vanzati for improvements + Created 13 September 2012 + by Scott Fitzgerald + Thanks to Federico Vanzati for improvements - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ const int controlPin1 = 2; // connected to pin 7 on the H-bridge diff --git a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino index e905b640b7b..518f7a8b320 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino @@ -1,24 +1,24 @@ /* Arduino Starter Kit example - Project 11 - Crystal Ball + Project 11 - Crystal Ball - This sketch is written to accompany Project 11 in the - Arduino Starter Kit + This sketch is written to accompany Project 11 in the + Arduino Starter Kit - Parts required: - 220 ohm resistor - 10 kilohm resistor - 10 kilohm potentiometer - 16x2 LCD screen - tilt switch + Parts required: + 220 ohm resistor + 10 kilohm resistor + 10 kilohm potentiometer + 16x2 LCD screen + tilt switch - Created 13 September 2012 - by Scott Fitzgerald + Created 13 September 2012 + by Scott Fitzgerald - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ // include the library code: diff --git a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino index 70154d2288d..545e0e50483 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino @@ -1,29 +1,29 @@ /* Arduino Starter Kit example - Project 12 - Knock Lock - - This sketch is written to accompany Project 12 in the - Arduino Starter Kit - - Parts required: - 1 Megohm resistor - 10 kilohm resistor - three 220 ohm resistors - piezo - servo motor - push button - one red LED - one yellow LED - one green LED - 100 uF capacitor - - Created 18 September 2012 - by Scott Fitzgerald - Thanks to Federico Vanzati for improvements - - http://www.arduino.cc/starterKit - - This example code is part of the public domain + Project 12 - Knock Lock + + This sketch is written to accompany Project 12 in the + Arduino Starter Kit + + Parts required: + 1 Megohm resistor + 10 kilohm resistor + three 220 ohm resistors + piezo + servo motor + push button + one red LED + one yellow LED + one green LED + 100 uF capacitor + + Created 18 September 2012 + by Scott Fitzgerald + Thanks to Federico Vanzati for improvements + + http://www.arduino.cc/starterKit + + This example code is part of the public domain */ // import the library diff --git a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino index bfa7633aeb3..396c127d3cd 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino @@ -1,26 +1,26 @@ /* Arduino Starter Kit example - Project 13 - Touch Sensor Lamp + Project 13 - Touch Sensor Lamp - This sketch is written to accompany Project 13 in the - Arduino Starter Kit + This sketch is written to accompany Project 13 in the + Arduino Starter Kit - Parts required: - 1 Megohm resistor - metal foil or copper mesh - 220 ohm resistor - LED + Parts required: + 1 Megohm resistor + metal foil or copper mesh + 220 ohm resistor + LED - Software required : - CapacitiveSensor library by Paul Badger - http://www.arduino.cc/playground/Main/CapacitiveSensor + Software required : + CapacitiveSensor library by Paul Badger + http://www.arduino.cc/playground/Main/CapacitiveSensor - Created 18 September 2012 - by Scott Fitzgerald + Created 18 September 2012 + by Scott Fitzgerald - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ // import the library (must be located in the diff --git a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino index 38741fb9a67..5411b1aea11 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino @@ -1,23 +1,23 @@ /* Arduino Starter Kit example - Project 14 - Tweak the Arduino Logo + Project 14 - Tweak the Arduino Logo - This sketch is written to accompany Project 14 in the - Arduino Starter Kit + This sketch is written to accompany Project 14 in the + Arduino Starter Kit - Parts required: - 10 kilohm potentiometer + Parts required: + 10 kilohm potentiometer - Software required : - Processing (3.0 or newer) http://processing.org - Active Internet connection + Software required : + Processing (3.0 or newer) http://processing.org + Active Internet connection - Created 18 September 2012 - by Scott Fitzgerald + Created 18 September 2012 + by Scott Fitzgerald - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ @@ -34,69 +34,69 @@ void loop() { } /* Processing code for this example -// Tweak the Arduino Logo -// by Scott Fitzgerald -// This example code is in the public domain - -// import the serial library -import processing.serial.*; - -// create an instance of the serial library -Serial myPort; + // Tweak the Arduino Logo + // by Scott Fitzgerald + // This example code is in the public domain + + // import the serial library + import processing.serial.*; + + // create an instance of the serial library + Serial myPort; + + // create an instance of PImage + PImage logo; + + // a variable to hold the background color + int bgcolor = 0; + + void setup() { + size(1, 1); + surface.setResizable(true); + // set the color mode to Hue/Saturation/Brightness + colorMode(HSB, 255); + + // load the Arduino logo into the PImage instance + logo = loadImage("http://www.arduino.cc/arduino_logo.png"); + + // make the window the same size as the image + surface.setSize(logo.width, logo.height); + + // print a list of available serial ports to the + // Processing status window + println("Available serial ports:"); + println(Serial.list()); + + // Tell the serial object the information it needs to communicate + // with the Arduino. Change Serial.list()[0] to the correct + // port corresponding to your Arduino board. The last + // parameter (e.g. 9600) is the speed of the communication. It + // has to correspond to the value passed to Serial.begin() in your + // Arduino sketch. + myPort = new Serial(this, Serial.list()[0], 9600); + + // If you know the name of the port used by the Arduino board, you + // can specify it directly like this. + // port = new Serial(this, "COM1", 9600); + } -// create an instance of PImage -PImage logo; + void draw() { -// a variable to hold the background color -int bgcolor = 0; + // if there is information in the serial port + if ( myPort.available() > 0) { + // read the value and store it in a variable + bgcolor = myPort.read(); -void setup() { - size(1, 1); - surface.setResizable(true); - // set the color mode to Hue/Saturation/Brightness - colorMode(HSB, 255); - - // load the Arduino logo into the PImage instance - logo = loadImage("http://www.arduino.cc/arduino_logo.png"); - - // make the window the same size as the image - surface.setSize(logo.width, logo.height); - - // print a list of available serial ports to the - // Processing status window - println("Available serial ports:"); - println(Serial.list()); - - // Tell the serial object the information it needs to communicate - // with the Arduino. Change Serial.list()[0] to the correct - // port corresponding to your Arduino board. The last - // parameter (e.g. 9600) is the speed of the communication. It - // has to correspond to the value passed to Serial.begin() in your - // Arduino sketch. - myPort = new Serial(this, Serial.list()[0], 9600); - - // If you know the name of the port used by the Arduino board, you - // can specify it directly like this. - // port = new Serial(this, "COM1", 9600); -} + // print the value to the status window + println(bgcolor); + } -void draw() { + // Draw the background. the variable bgcolor + // contains the Hue, determined by the value + // from the serial port + background(bgcolor, 255, 255); - // if there is information in the serial port - if ( myPort.available() > 0) { - // read the value and store it in a variable - bgcolor = myPort.read(); - - // print the value to the status window - println(bgcolor); + // draw the Arduino logo + image(logo, 0, 0); } - - // Draw the background. the variable bgcolor - // contains the Hue, determined by the value - // from the serial port - background(bgcolor, 255, 255); - - // draw the Arduino logo - image(logo, 0, 0); -} */ diff --git a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino index a7292831cdd..313a38c2dfa 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino @@ -1,21 +1,21 @@ /* Arduino Starter Kit example - Project 15 - Hacking Buttons + Project 15 - Hacking Buttons - This sketch is written to accompany Project 15 in the - Arduino Starter Kit + This sketch is written to accompany Project 15 in the + Arduino Starter Kit - Parts required: - battery powered component - 220 ohm resistor - 4N35 optocoupler + Parts required: + battery powered component + 220 ohm resistor + 4N35 optocoupler - Created 18 September 2012 - by Scott Fitzgerald + Created 18 September 2012 + by Scott Fitzgerald - http://www.arduino.cc/starterKit + http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain */ const int optoPin = 2; // the pin the optocoupler is connected to From 99cefffbfc61a775692f7ea47452fda4e8b546d0 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 14 Jul 2017 15:35:58 -0700 Subject: [PATCH 06/11] Auto Format all built-in examples The only changes I left out are the Max/MSP patches because I don't know whether the indentation would break them. --- .../shared/examples/01.Basics/Blink/Blink.ino | 8 +- .../DigitalReadSerial/DigitalReadSerial.ino | 2 +- build/shared/examples/01.Basics/Fade/Fade.ino | 4 +- .../BlinkWithoutDelay/BlinkWithoutDelay.ino | 4 +- .../examples/02.Digital/Button/Button.ino | 2 +- .../examples/02.Digital/Debounce/Debounce.ino | 2 +- .../DigitalInputPullup/DigitalInputPullup.ino | 2 +- .../StateChangeDetection.ino | 2 +- .../02.Digital/toneKeyboard/toneKeyboard.ino | 2 +- .../02.Digital/toneMelody/toneMelody.ino | 2 +- .../02.Digital/toneMultiple/toneMultiple.ino | 2 +- .../tonePitchFollower/tonePitchFollower.ino | 2 +- .../AnalogInOutSerial/AnalogInOutSerial.ino | 2 +- .../03.Analog/AnalogInput/AnalogInput.ino | 2 +- .../AnalogWriteMega/AnalogWriteMega.ino | 2 +- .../03.Analog/Calibration/Calibration.ino | 2 +- .../examples/03.Analog/Fading/Fading.ino | 2 +- .../ASCIITable/ASCIITable.ino | 2 +- .../04.Communication/Dimmer/Dimmer.ino | 4 +- .../examples/04.Communication/Graph/Graph.ino | 2 +- .../examples/04.Communication/Midi/Midi.ino | 2 +- .../MultiSerial/MultiSerial.ino | 2 +- .../PhysicalPixel/PhysicalPixel.ino | 4 +- .../ReadASCIIString/ReadASCIIString.ino | 4 +- .../SerialCallResponse/SerialCallResponse.ino | 2 +- .../SerialCallResponseASCII.ino | 2 +- .../SerialEvent/SerialEvent.ino | 6 +- .../VirtualColorMixer/VirtualColorMixer.ino | 4 +- .../examples/05.Control/Arrays/Arrays.ino | 2 +- .../ForLoopIteration/ForLoopIteration.ino | 2 +- .../IfStatementConditional.ino | 2 +- .../WhileStatementConditional.ino | 2 +- .../05.Control/switchCase/switchCase.ino | 2 +- .../05.Control/switchCase2/switchCase2.ino | 2 +- .../examples/06.Sensors/Knock/Knock.ino | 2 +- .../06.Sensors/Memsic2125/Memsic2125.ino | 2 +- .../shared/examples/06.Sensors/Ping/Ping.ino | 2 +- .../RowColumnScanning/RowColumnScanning.ino | 2 +- .../examples/07.Display/barGraph/barGraph.ino | 2 +- .../CharacterAnalysis/CharacterAnalysis.ino | 2 +- .../StringAdditionOperator.ino | 2 +- .../StringAppendOperator.ino | 2 +- .../StringCaseChanges/StringCaseChanges.ino | 2 +- .../StringCharacters/StringCharacters.ino | 2 +- .../StringComparisonOperators.ino | 2 +- .../StringConstructors/StringConstructors.ino | 2 +- .../StringIndexOf/StringIndexOf.ino | 2 +- .../08.Strings/StringLength/StringLength.ino | 2 +- .../StringLengthTrim/StringLengthTrim.ino | 2 +- .../StringReplace/StringReplace.ino | 2 +- .../StringStartsWithEndsWith.ino | 2 +- .../StringSubstring/StringSubstring.ino | 2 +- .../08.Strings/StringToInt/StringToInt.ino | 2 +- .../KeyboardLogout/KeyboardLogout.ino | 2 +- .../KeyboardMessage/KeyboardMessage.ino | 2 +- .../KeyboardReprogram/KeyboardReprogram.ino | 2 +- .../KeyboardSerial/KeyboardSerial.ino | 2 +- .../KeyboardAndMouseControl.ino | 2 +- .../ButtonMouseControl/ButtonMouseControl.ino | 2 +- .../JoystickMouseControl.ino | 4 +- .../p03_LoveOMeter/p03_LoveOMeter.ino | 2 +- .../p04_ColorMixingLamp.ino | 4 +- .../p05_ServoMoodIndicator.ino | 2 +- .../p08_DigitalHourglass.ino | 2 +- .../p09_MotorizedPinwheel.ino | 2 +- .../p10_Zoetrope/p10_Zoetrope.ino | 2 +- .../p11_CrystalBall/p11_CrystalBall.ino | 2 +- .../p12_KnockLock/p12_KnockLock.ino | 2 +- .../p13_TouchSensorLamp.ino | 2 +- .../p14_TweakTheArduinoLogo.ino | 6 +- .../p15_HackingButtons/p15_HackingButtons.ino | 2 +- .../11.ArduinoISP/ArduinoISP/ArduinoISP.ino | 78 +++++++++---------- 72 files changed, 125 insertions(+), 125 deletions(-) diff --git a/build/shared/examples/01.Basics/Blink/Blink.ino b/build/shared/examples/01.Basics/Blink/Blink.ino index f65f23b81ef..3bfc1a75345 100644 --- a/build/shared/examples/01.Basics/Blink/Blink.ino +++ b/build/shared/examples/01.Basics/Blink/Blink.ino @@ -2,20 +2,20 @@ Blink Turns an LED on for one second, then off for one second, repeatedly. - Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO + Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used. If you want to know what pin the on-board LED is connected to on your Arduino model, check the Technical Specs of your board at https://www.arduino.cc/en/Main/Products - + This example code is in the public domain. modified 8 May 2014 by Scott Fitzgerald - + modified 2 Sep 2016 by Arturo Guadalupi - + modified 8 Sep 2016 by Colby Newman */ diff --git a/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino b/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino index a97be3cd92f..afa9a0aab7f 100644 --- a/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino +++ b/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino @@ -3,7 +3,7 @@ Reads a digital input on pin 2, prints the result to the Serial Monitor This example code is in the public domain. - */ +*/ // digital pin 2 has a pushbutton attached to it. Give it a name: int pushButton = 2; diff --git a/build/shared/examples/01.Basics/Fade/Fade.ino b/build/shared/examples/01.Basics/Fade/Fade.ino index f3734f339c6..d249fb5efcb 100644 --- a/build/shared/examples/01.Basics/Fade/Fade.ino +++ b/build/shared/examples/01.Basics/Fade/Fade.ino @@ -7,11 +7,11 @@ The analogWrite() function uses PWM, so if you want to change the pin you're using, be sure to use another PWM capable pin. On most - Arduino, the PWM pins are identified with + Arduino, the PWM pins are identified with a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11. This example code is in the public domain. - */ +*/ int led = 9; // the PWM pin the LED is attached to int brightness = 0; // how bright the LED is diff --git a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino index 08ddf9de8ff..724127cf5d2 100644 --- a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino +++ b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino @@ -6,7 +6,7 @@ The circuit: - Use the onboard LED. - - Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO + - Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used. If you want to know what pin the on-board LED is connected to on your Arduino model, check @@ -25,7 +25,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay - */ +*/ // constants won't change. Used here to set a pin number: const int ledPin = LED_BUILTIN;// the number of the LED pin diff --git a/build/shared/examples/02.Digital/Button/Button.ino b/build/shared/examples/02.Digital/Button/Button.ino index 2aafd8e2466..d48606fe32f 100644 --- a/build/shared/examples/02.Digital/Button/Button.ino +++ b/build/shared/examples/02.Digital/Button/Button.ino @@ -22,7 +22,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Button - */ +*/ // constants won't change. They're used here to // set pin numbers: diff --git a/build/shared/examples/02.Digital/Debounce/Debounce.ino b/build/shared/examples/02.Digital/Debounce/Debounce.ino index 2c5ae85534f..4cbfe69aed6 100644 --- a/build/shared/examples/02.Digital/Debounce/Debounce.ino +++ b/build/shared/examples/02.Digital/Debounce/Debounce.ino @@ -28,7 +28,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Debounce - */ +*/ // constants won't change. They're used here to // set pin numbers: diff --git a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino index 5ca6e09965b..91783d7e96b 100644 --- a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino +++ b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino @@ -19,7 +19,7 @@ This example code is in the public domain - */ +*/ void setup() { //start serial connection diff --git a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino index b72d7b828f0..73ea4f02662 100644 --- a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino +++ b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino @@ -23,7 +23,7 @@ http://www.arduino.cc/en/Tutorial/ButtonStateChange - */ +*/ // this constant won't change: const int buttonPin = 2; // the pin that the pushbutton is attached to diff --git a/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino b/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino index 90a027ff14f..035c4c17563 100644 --- a/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino +++ b/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino @@ -16,7 +16,7 @@ http://www.arduino.cc/en/Tutorial/Tone3 - */ +*/ #include "pitches.h" diff --git a/build/shared/examples/02.Digital/toneMelody/toneMelody.ino b/build/shared/examples/02.Digital/toneMelody/toneMelody.ino index c4024b8e88e..9f86a1cac47 100644 --- a/build/shared/examples/02.Digital/toneMelody/toneMelody.ino +++ b/build/shared/examples/02.Digital/toneMelody/toneMelody.ino @@ -14,7 +14,7 @@ http://www.arduino.cc/en/Tutorial/Tone - */ +*/ #include "pitches.h" // notes in the melody: diff --git a/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino b/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino index 3b504e5f0d9..0abe1c6e498 100644 --- a/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino +++ b/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino @@ -14,7 +14,7 @@ http://www.arduino.cc/en/Tutorial/Tone4 - */ +*/ void setup() { diff --git a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino index bb44e76ae43..2090b19020a 100644 --- a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino +++ b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino @@ -16,7 +16,7 @@ http://www.arduino.cc/en/Tutorial/Tone2 - */ +*/ void setup() { diff --git a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino index 337c8caf6f8..79eb7bd2376 100644 --- a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino +++ b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino @@ -17,7 +17,7 @@ This example code is in the public domain. - */ +*/ // These constants won't change. They're used to give names // to the pins used: diff --git a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino index e6367798f03..6259f70bbfd 100644 --- a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino +++ b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino @@ -25,7 +25,7 @@ http://www.arduino.cc/en/Tutorial/AnalogInput - */ +*/ int sensorPin = A0; // select the input pin for the potentiometer int ledPin = 13; // select the pin for the LED diff --git a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino index ce2c5977746..0e508ebbe1f 100644 --- a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino +++ b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino @@ -12,7 +12,7 @@ This example code is in the public domain. - */ +*/ // These constants won't change. They're used to give names // to the pins used: const int lowestPin = 2; diff --git a/build/shared/examples/03.Analog/Calibration/Calibration.ino b/build/shared/examples/03.Analog/Calibration/Calibration.ino index 3740ac4e5fa..3853182f02b 100644 --- a/build/shared/examples/03.Analog/Calibration/Calibration.ino +++ b/build/shared/examples/03.Analog/Calibration/Calibration.ino @@ -24,7 +24,7 @@ This example code is in the public domain. - */ +*/ // These constants won't change: const int sensorPin = A0; // pin that the sensor is attached to diff --git a/build/shared/examples/03.Analog/Fading/Fading.ino b/build/shared/examples/03.Analog/Fading/Fading.ino index 95f3bc2fed4..53378c06919 100644 --- a/build/shared/examples/03.Analog/Fading/Fading.ino +++ b/build/shared/examples/03.Analog/Fading/Fading.ino @@ -15,7 +15,7 @@ This example code is in the public domain. - */ +*/ int ledPin = 9; // LED connected to digital pin 9 diff --git a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino index 658c3bc610e..e336c3e221b 100644 --- a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino +++ b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino @@ -18,7 +18,7 @@ - */ +*/ void setup() { //Initialize serial and wait for port to open: Serial.begin(9600); diff --git a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino index d1a28aaf5e9..0032c3bcce1 100644 --- a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino +++ b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino @@ -19,7 +19,7 @@ http://www.arduino.cc/en/Tutorial/Dimmer - */ +*/ const int ledPin = 9; // the pin that the LED is attached to @@ -80,7 +80,7 @@ void loop() { // a single byte port.write(mouseX); } - */ +*/ /* Max/MSP v5 patch for this example diff --git a/build/shared/examples/04.Communication/Graph/Graph.ino b/build/shared/examples/04.Communication/Graph/Graph.ino index 7786014a40d..6eba7eca9ef 100644 --- a/build/shared/examples/04.Communication/Graph/Graph.ino +++ b/build/shared/examples/04.Communication/Graph/Graph.ino @@ -24,7 +24,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Graph - */ +*/ void setup() { // initialize the serial communication: diff --git a/build/shared/examples/04.Communication/Midi/Midi.ino b/build/shared/examples/04.Communication/Midi/Midi.ino index ac3966f2fb9..3465d0bdb28 100644 --- a/build/shared/examples/04.Communication/Midi/Midi.ino +++ b/build/shared/examples/04.Communication/Midi/Midi.ino @@ -20,7 +20,7 @@ http://www.arduino.cc/en/Tutorial/Midi - */ +*/ void setup() { // Set MIDI baud rate: diff --git a/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino b/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino index f7995107364..f5474ac0264 100644 --- a/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino +++ b/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino @@ -18,7 +18,7 @@ This example code is in the public domain. - */ +*/ void setup() { diff --git a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino index 008108a7719..ed756307a3c 100644 --- a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino +++ b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino @@ -21,7 +21,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/PhysicalPixel - */ +*/ const int ledPin = 13; // the pin that the LED is attached to int incomingByte; // a variable to read incoming serial data into @@ -121,7 +121,7 @@ void loop() { } - */ +*/ /* Max/MSP version 5 patch to run with this example: diff --git a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino index 18108163426..406afc2dc8f 100644 --- a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino +++ b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino @@ -13,12 +13,12 @@ created 13 Apr 2012 by Tom Igoe - + modified 14 Mar 2016 by Arturo Guadalupi This example code is in the public domain. - */ +*/ // pins for the LEDs: const int redPin = 3; diff --git a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino index a9774ff2a23..b514e076d99 100644 --- a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino +++ b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino @@ -22,7 +22,7 @@ http://www.arduino.cc/en/Tutorial/SerialCallResponse - */ +*/ int firstSensor = 0; // first analog sensor int secondSensor = 0; // second analog sensor diff --git a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino index de874d884a6..125fc568067 100644 --- a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino +++ b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino @@ -26,7 +26,7 @@ http://www.arduino.cc/en/Tutorial/SerialCallResponseASCII - */ +*/ int firstSensor = 0; // first analog sensor int secondSensor = 0; // second analog sensor diff --git a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino index 0594ab802cd..3f7db628e51 100644 --- a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino +++ b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino @@ -10,7 +10,7 @@ NOTE: The serialEvent() feature is not available on the Leonardo, Micro, or other ATmega32U4 based boards. - + Created 9 May 2011 by Tom Igoe @@ -18,7 +18,7 @@ http://www.arduino.cc/en/Tutorial/SerialEvent - */ +*/ String inputString = ""; // a String to hold incoming data boolean stringComplete = false; // whether the string is complete @@ -45,7 +45,7 @@ void loop() { hardware serial RX. This routine is run between each time loop() runs, so using delay inside loop can delay response. Multiple bytes of data may be available. - */ +*/ void serialEvent() { while (Serial.available()) { // get the new byte: diff --git a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino index e278b534be4..b984b7a2813 100644 --- a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino +++ b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino @@ -14,7 +14,7 @@ by Tom Igoe and Scott Fitzgerald This example code is in the public domain. - */ +*/ const int redPin = A0; // sensor to control red color const int greenPin = A1; // sensor to control green color @@ -86,7 +86,7 @@ void loop() { } } - */ +*/ /* Max/MSP patch for this example diff --git a/build/shared/examples/05.Control/Arrays/Arrays.ino b/build/shared/examples/05.Control/Arrays/Arrays.ino index 80f1b6ea365..a05e8a13736 100644 --- a/build/shared/examples/05.Control/Arrays/Arrays.ino +++ b/build/shared/examples/05.Control/Arrays/Arrays.ino @@ -19,7 +19,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Array - */ +*/ int timer = 100; // The higher the number, the slower the timing. int ledPins[] = { diff --git a/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino b/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino index 41690fc14bd..54ad38a2695 100644 --- a/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino +++ b/build/shared/examples/05.Control/ForLoopIteration/ForLoopIteration.ino @@ -15,7 +15,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/ForLoop - */ +*/ int timer = 100; // The higher the number, the slower the timing. diff --git a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino index 52598dd97e9..a9fa64f0f58 100644 --- a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino +++ b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino @@ -23,7 +23,7 @@ http://www.arduino.cc/en/Tutorial/IfStatement - */ +*/ // These constants won't change: const int analogPin = A0; // pin that the sensor is attached to diff --git a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino index 1b84265daa1..9db1980fe78 100644 --- a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino +++ b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino @@ -26,7 +26,7 @@ http://www.arduino.cc/en/Tutorial/WhileLoop - */ +*/ // These constants won't change: diff --git a/build/shared/examples/05.Control/switchCase/switchCase.ino b/build/shared/examples/05.Control/switchCase/switchCase.ino index 040526d8eb2..b7f82dcb549 100644 --- a/build/shared/examples/05.Control/switchCase/switchCase.ino +++ b/build/shared/examples/05.Control/switchCase/switchCase.ino @@ -20,7 +20,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/SwitchCase - */ +*/ // these constants won't change. They are the // lowest and highest readings you get from your sensor: diff --git a/build/shared/examples/05.Control/switchCase2/switchCase2.ino b/build/shared/examples/05.Control/switchCase2/switchCase2.ino index fce099adaf0..c626ebd6313 100644 --- a/build/shared/examples/05.Control/switchCase2/switchCase2.ino +++ b/build/shared/examples/05.Control/switchCase2/switchCase2.ino @@ -18,7 +18,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/SwitchCase2 - */ +*/ void setup() { // initialize serial communication: diff --git a/build/shared/examples/06.Sensors/Knock/Knock.ino b/build/shared/examples/06.Sensors/Knock/Knock.ino index fc2f9e8b91c..e5c130732cf 100644 --- a/build/shared/examples/06.Sensors/Knock/Knock.ino +++ b/build/shared/examples/06.Sensors/Knock/Knock.ino @@ -19,7 +19,7 @@ This example code is in the public domain. - */ +*/ // these constants won't change: diff --git a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino index 20f9612e85f..572a93dfcc3 100644 --- a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino +++ b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino @@ -21,7 +21,7 @@ This example code is in the public domain. - */ +*/ // these constants won't change: const int xPin = 2; // X output of the accelerometer diff --git a/build/shared/examples/06.Sensors/Ping/Ping.ino b/build/shared/examples/06.Sensors/Ping/Ping.ino index 078a99b5265..a2e410d644f 100644 --- a/build/shared/examples/06.Sensors/Ping/Ping.ino +++ b/build/shared/examples/06.Sensors/Ping/Ping.ino @@ -20,7 +20,7 @@ This example code is in the public domain. - */ +*/ // this constant won't change. It's the pin number // of the sensor's output: diff --git a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino index 00df13e0d72..84cf6359682 100644 --- a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino +++ b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino @@ -31,7 +31,7 @@ http://www.arduino.cc/en/Tutorial/RowColumnScanning see also http://www.tigoe.net/pcomp/code/category/arduinowiring/514 for more - */ +*/ // 2-dimensional array of row pin numbers: diff --git a/build/shared/examples/07.Display/barGraph/barGraph.ino b/build/shared/examples/07.Display/barGraph/barGraph.ino index fdd94ae8fe3..6968c0c0c7d 100644 --- a/build/shared/examples/07.Display/barGraph/barGraph.ino +++ b/build/shared/examples/07.Display/barGraph/barGraph.ino @@ -18,7 +18,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/BarGraph - */ +*/ // these constants won't change: diff --git a/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino b/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino index cc85eab1067..3fbdeb145f0 100644 --- a/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino +++ b/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino @@ -9,7 +9,7 @@ by Tom Igoe This example code is in the public domain. - */ +*/ void setup() { // Open serial communications and wait for port to open: diff --git a/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino b/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino index 724a9b48dfe..fc13191c3ed 100644 --- a/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino +++ b/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino @@ -11,7 +11,7 @@ http://www.arduino.cc/en/Tutorial/StringAdditionOperator This example code is in the public domain. - */ +*/ // declare three Strings: String stringOne, stringTwo, stringThree; diff --git a/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino b/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino index 94a2c82c8ea..da01481cfcd 100644 --- a/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino +++ b/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino @@ -10,7 +10,7 @@ http://www.arduino.cc/en/Tutorial/StringAppendOperator This example code is in the public domain. - */ +*/ String stringOne, stringTwo; diff --git a/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino b/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino index ae5d51ba263..2ec8c93f368 100644 --- a/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino +++ b/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino @@ -10,7 +10,7 @@ http://www.arduino.cc/en/Tutorial/StringCaseChanges This example code is in the public domain. - */ +*/ void setup() { // Open serial communications and wait for port to open: diff --git a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino index 7cd02b21dda..44eabe87b60 100644 --- a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino +++ b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino @@ -10,7 +10,7 @@ http://www.arduino.cc/en/Tutorial/StringCharacters This example code is in the public domain. - */ +*/ void setup() { // Open serial communications and wait for port to open: diff --git a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino index 89fe378549f..56a2a829bb5 100644 --- a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino +++ b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino @@ -10,7 +10,7 @@ http://www.arduino.cc/en/Tutorial/StringComparisonOperators This example code is in the public domain. - */ +*/ String stringOne, stringTwo; diff --git a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino index 70310a8e196..9277c6ab59e 100644 --- a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino +++ b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino @@ -10,7 +10,7 @@ http://www.arduino.cc/en/Tutorial/StringConstructors This example code is in the public domain. - */ +*/ void setup() { // Open serial communications and wait for port to open: diff --git a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino index d97f4910487..8de5055cc94 100644 --- a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino +++ b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino @@ -10,7 +10,7 @@ http://www.arduino.cc/en/Tutorial/StringIndexOf This example code is in the public domain. - */ +*/ void setup() { // Open serial communications and wait for port to open: diff --git a/build/shared/examples/08.Strings/StringLength/StringLength.ino b/build/shared/examples/08.Strings/StringLength/StringLength.ino index c7ed18b1720..bc748349d42 100644 --- a/build/shared/examples/08.Strings/StringLength/StringLength.ino +++ b/build/shared/examples/08.Strings/StringLength/StringLength.ino @@ -10,7 +10,7 @@ http://www.arduino.cc/en/Tutorial/StringLengthTrim This example code is in the public domain. - */ +*/ String txtMsg = ""; // a string for incoming text unsigned int lastStringLength = txtMsg.length(); // previous length of the String diff --git a/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino b/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino index 78b4d1638fc..d68ef8f29a0 100644 --- a/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino +++ b/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino @@ -10,7 +10,7 @@ http://www.arduino.cc/en/Tutorial/StringLengthTrim This example code is in the public domain. - */ +*/ void setup() { // Open serial communications and wait for port to open: diff --git a/build/shared/examples/08.Strings/StringReplace/StringReplace.ino b/build/shared/examples/08.Strings/StringReplace/StringReplace.ino index ecc0cb1a54f..6262170653d 100644 --- a/build/shared/examples/08.Strings/StringReplace/StringReplace.ino +++ b/build/shared/examples/08.Strings/StringReplace/StringReplace.ino @@ -10,7 +10,7 @@ http://www.arduino.cc/en/Tutorial/StringReplace This example code is in the public domain. - */ +*/ void setup() { // Open serial communications and wait for port to open: diff --git a/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino b/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino index 359d1b948d0..bfd72fd931c 100644 --- a/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino +++ b/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino @@ -10,7 +10,7 @@ http://www.arduino.cc/en/Tutorial/StringStartsWithEndsWith This example code is in the public domain. - */ +*/ void setup() { // Open serial communications and wait for port to open: diff --git a/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino b/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino index 4671c05230f..9772afaca06 100644 --- a/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino +++ b/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino @@ -10,7 +10,7 @@ http://www.arduino.cc/en/Tutorial/StringSubstring This example code is in the public domain. - */ +*/ void setup() { // Open serial communications and wait for port to open: diff --git a/build/shared/examples/08.Strings/StringToInt/StringToInt.ino b/build/shared/examples/08.Strings/StringToInt/StringToInt.ino index 7fdb6ed92eb..da3e1261d0f 100644 --- a/build/shared/examples/08.Strings/StringToInt/StringToInt.ino +++ b/build/shared/examples/08.Strings/StringToInt/StringToInt.ino @@ -11,7 +11,7 @@ by Tom Igoe This example code is in the public domain. - */ +*/ String inString = ""; // string to hold input diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino index c2466828bd6..1ddf63ed8c6 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino @@ -23,7 +23,7 @@ This example is in the public domain http://www.arduino.cc/en/Tutorial/KeyboardLogout - */ +*/ #define OSX 0 #define WINDOWS 1 diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino b/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino index 4f46057b730..d55453d1b0c 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino @@ -18,7 +18,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/KeyboardMessage - */ +*/ #include "Keyboard.h" diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino index 50461e608dc..7691aff0f81 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino @@ -25,7 +25,7 @@ This example is in the public domain http://www.arduino.cc/en/Tutorial/KeyboardReprogram - */ +*/ #include "Keyboard.h" diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino b/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino index 4deae41ac1b..0e9c7e43617 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino @@ -17,7 +17,7 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/KeyboardSerial - */ +*/ #include "Keyboard.h" diff --git a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino index bf258ef7892..6f92161b82f 100644 --- a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino +++ b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino @@ -19,7 +19,7 @@ this code is in the public domain - */ +*/ #include "Keyboard.h" #include "Mouse.h" diff --git a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino index db596bb1dc3..7f131539141 100644 --- a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino @@ -22,7 +22,7 @@ this code is in the public domain - */ +*/ #include "Mouse.h" diff --git a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino index 46b54e01c85..8b50376e56a 100644 --- a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino @@ -26,7 +26,7 @@ this code is in the public domain - */ +*/ #include "Mouse.h" @@ -98,7 +98,7 @@ void loop() { /* reads an axis (0 or 1 for x or y) and scales the analog input range to a range from 0 to - */ +*/ int readAxis(int thisAxis) { // read the analog input: diff --git a/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino b/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino index 8bd82fed7be..7949de3a629 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino @@ -16,7 +16,7 @@ http://www.arduino.cc/starterKit This example code is part of the public domain - */ +*/ // named constant for the pin the sensor is connected to const int sensorPin = A0; diff --git a/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino b/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino index 8b7fe862bdd..44c973c9439 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino @@ -20,7 +20,7 @@ http://www.arduino.cc/starterKit This example code is part of the public domain - */ +*/ const int greenLEDPin = 9; // LED connected to digital pin 9 const int redLEDPin = 10; // LED connected to digital pin 10 @@ -89,7 +89,7 @@ void loop() { Serial.println(blueValue); /* - Now that you have a usable value, it's time to PWM the LED. + Now that you have a usable value, it's time to PWM the LED. */ analogWrite(redLEDPin, redValue); analogWrite(greenLEDPin, greenValue); diff --git a/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino b/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino index e545c9d55e9..d51a4909544 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino @@ -16,7 +16,7 @@ http://www.arduino.cc/starterKit This example code is part of the public domain - */ +*/ // include the Servo library #include diff --git a/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino b/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino index 183e7fbe2fa..b4454b6e077 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino @@ -17,7 +17,7 @@ http://www.arduino.cc/starterKit This example code is part of the public domain - */ +*/ // named constant for the switch pin const int switchPin = 8; diff --git a/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino b/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino index d858f1a4844..71592fe9f32 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino @@ -19,7 +19,7 @@ http://www.arduino.cc/starterKit This example code is part of the public domain - */ +*/ // named constants for the switch and motor pins const int switchPin = 2; // the number of the switch pin diff --git a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino index d9126efde15..b650f379646 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino @@ -20,7 +20,7 @@ http://www.arduino.cc/starterKit This example code is part of the public domain - */ +*/ const int controlPin1 = 2; // connected to pin 7 on the H-bridge const int controlPin2 = 3; // connected to pin 2 on the H-bridge diff --git a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino index 518f7a8b320..1c2904a6e56 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino @@ -19,7 +19,7 @@ http://www.arduino.cc/starterKit This example code is part of the public domain - */ +*/ // include the library code: #include diff --git a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino index 545e0e50483..e8c8d445f00 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino @@ -24,7 +24,7 @@ http://www.arduino.cc/starterKit This example code is part of the public domain - */ +*/ // import the library #include diff --git a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino index 396c127d3cd..2c4196ce284 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino @@ -21,7 +21,7 @@ http://www.arduino.cc/starterKit This example code is part of the public domain - */ +*/ // import the library (must be located in the // Arduino/libraries directory) diff --git a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino index 5411b1aea11..4949875f73f 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino @@ -10,7 +10,7 @@ Software required : Processing (3.0 or newer) http://processing.org - Active Internet connection + Active Internet connection Created 18 September 2012 by Scott Fitzgerald @@ -18,7 +18,7 @@ http://www.arduino.cc/starterKit This example code is part of the public domain - */ +*/ void setup() { @@ -99,4 +99,4 @@ void loop() { // draw the Arduino logo image(logo, 0, 0); } - */ +*/ diff --git a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino index 313a38c2dfa..3ec039b4ff7 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino @@ -16,7 +16,7 @@ http://www.arduino.cc/starterKit This example code is part of the public domain - */ +*/ const int optoPin = 2; // the pin the optocoupler is connected to diff --git a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino index bc0739bc5d0..4180a963b7d 100644 --- a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino +++ b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino @@ -24,7 +24,7 @@ // // Alternatively you can use any other digital pin by configuring software ('BitBanged') // SPI and having appropriate defines for PIN_MOSI, PIN_MISO and PIN_SCK. -// +// // IMPORTANT: When using an Arduino that is not 5V tolerant (Due, Zero, ...) // as the programmer, make sure to not expose any of the programmer's pins to 5V. // A simple way to accomplish this is to power the complete system (programmer @@ -68,7 +68,7 @@ // Configure which pins to use: // The standard pin configuration. -#ifndef ARDUINO_HOODLOADER2 +#ifndef ARDUINO_HOODLOADER2 #define RESET 10 // Use pin 10 to reset the target rather than SS #define LED_HB 9 @@ -88,10 +88,10 @@ #endif -// HOODLOADER2 means running sketches on the ATmega16U2 +// HOODLOADER2 means running sketches on the ATmega16U2 // serial converter chips on Uno or Mega boards. // We must use pins that are broken out: -#else +#else #define RESET 4 #define LED_HB 7 @@ -166,51 +166,51 @@ void pulse(int pin, int times); #define SPI_MODE0 0x00 class SPISettings { -public: - // clock is in Hz - SPISettings(uint32_t clock, uint8_t bitOrder, uint8_t dataMode) : clock(clock){ - (void) bitOrder; - (void) dataMode; - }; + public: + // clock is in Hz + SPISettings(uint32_t clock, uint8_t bitOrder, uint8_t dataMode) : clock(clock) { + (void) bitOrder; + (void) dataMode; + }; -private: - uint32_t clock; + private: + uint32_t clock; -friend class BitBangedSPI; + friend class BitBangedSPI; }; class BitBangedSPI { -public: - void begin() { - digitalWrite(PIN_SCK, LOW); - digitalWrite(PIN_MOSI, LOW); - pinMode(PIN_SCK, OUTPUT); - pinMode(PIN_MOSI, OUTPUT); - pinMode(PIN_MISO, INPUT); - } + public: + void begin() { + digitalWrite(PIN_SCK, LOW); + digitalWrite(PIN_MOSI, LOW); + pinMode(PIN_SCK, OUTPUT); + pinMode(PIN_MOSI, OUTPUT); + pinMode(PIN_MISO, INPUT); + } - void beginTransaction(SPISettings settings) { - pulseWidth = (500000 + settings.clock - 1) / settings.clock; - if (pulseWidth == 0) - pulseWidth = 1; - } + void beginTransaction(SPISettings settings) { + pulseWidth = (500000 + settings.clock - 1) / settings.clock; + if (pulseWidth == 0) + pulseWidth = 1; + } - void end() {} + void end() {} - uint8_t transfer (uint8_t b) { - for (unsigned int i = 0; i < 8; ++i) { - digitalWrite(PIN_MOSI, (b & 0x80) ? HIGH : LOW); - digitalWrite(PIN_SCK, HIGH); - delayMicroseconds(pulseWidth); - b = (b << 1) | digitalRead(PIN_MISO); - digitalWrite(PIN_SCK, LOW); // slow pulse - delayMicroseconds(pulseWidth); + uint8_t transfer (uint8_t b) { + for (unsigned int i = 0; i < 8; ++i) { + digitalWrite(PIN_MOSI, (b & 0x80) ? HIGH : LOW); + digitalWrite(PIN_SCK, HIGH); + delayMicroseconds(pulseWidth); + b = (b << 1) | digitalRead(PIN_MISO); + digitalWrite(PIN_SCK, LOW); // slow pulse + delayMicroseconds(pulseWidth); + } + return b; } - return b; - } -private: - unsigned long pulseWidth; // in microseconds + private: + unsigned long pulseWidth; // in microseconds }; static BitBangedSPI SPI; From 515b7733a12f0a5aa052f604259522ace7830e3f Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 12 Jul 2017 13:18:23 -0700 Subject: [PATCH 07/11] Make the formatting of opening comments of built-in examples consistent --- .../AnalogReadSerial/AnalogReadSerial.ino | 5 +++- .../shared/examples/01.Basics/Blink/Blink.ino | 10 +++---- .../DigitalReadSerial/DigitalReadSerial.ino | 3 +++ build/shared/examples/01.Basics/Fade/Fade.ino | 2 ++ .../ReadAnalogVoltage/ReadAnalogVoltage.ino | 5 +++- .../BlinkWithoutDelay/BlinkWithoutDelay.ino | 12 ++++----- .../examples/02.Digital/Button/Button.ino | 4 +-- .../examples/02.Digital/Debounce/Debounce.ino | 8 +++--- .../DigitalInputPullup/DigitalInputPullup.ino | 11 ++++---- .../StateChangeDetection.ino | 3 +-- .../02.Digital/toneKeyboard/toneKeyboard.ino | 9 +++---- .../02.Digital/toneMelody/toneMelody.ino | 4 +-- .../02.Digital/toneMultiple/toneMultiple.ino | 5 ++-- .../tonePitchFollower/tonePitchFollower.ino | 6 ++--- .../AnalogInOutSerial/AnalogInOutSerial.ino | 1 + .../03.Analog/AnalogInput/AnalogInput.ino | 20 +++++++------- .../AnalogWriteMega/AnalogWriteMega.ino | 2 ++ .../03.Analog/Calibration/Calibration.ino | 9 +++---- .../examples/03.Analog/Fading/Fading.ino | 10 +++---- .../03.Analog/Smoothing/Smoothing.ino | 11 +++----- .../ASCIITable/ASCIITable.ino | 6 ++--- .../04.Communication/Dimmer/Dimmer.ino | 5 ++-- .../examples/04.Communication/Graph/Graph.ino | 2 +- .../examples/04.Communication/Midi/Midi.ino | 6 ++--- .../MultiSerial/MultiSerial.ino | 9 +++---- .../ReadASCIIString/ReadASCIIString.ino | 9 +++---- .../SerialCallResponse/SerialCallResponse.ino | 10 +++---- .../SerialCallResponseASCII.ino | 10 +++---- .../SerialEvent/SerialEvent.ino | 3 +-- .../SerialPassthrough/SerialPassthrough.ino | 4 +-- .../VirtualColorMixer/VirtualColorMixer.ino | 6 ++--- .../IfStatementConditional.ino | 7 +++-- .../WhileStatementConditional.ino | 5 ++-- .../05.Control/switchCase2/switchCase2.ino | 4 +-- .../examples/06.Sensors/ADXL3xx/ADXL3xx.ino | 16 +++++------- .../examples/06.Sensors/Knock/Knock.ino | 12 ++++----- .../06.Sensors/Memsic2125/Memsic2125.ino | 11 ++++---- .../shared/examples/06.Sensors/Ping/Ping.ino | 12 ++++----- .../RowColumnScanning/RowColumnScanning.ino | 21 +++++++-------- .../examples/07.Display/barGraph/barGraph.ino | 3 +-- .../CharacterAnalysis/CharacterAnalysis.ino | 2 ++ .../StringAdditionOperator.ino | 6 ++--- .../StringAppendOperator.ino | 6 ++--- .../StringCaseChanges/StringCaseChanges.ino | 6 ++--- .../StringCharacters/StringCharacters.ino | 6 ++--- .../StringComparisonOperators.ino | 6 ++--- .../StringConstructors/StringConstructors.ino | 6 ++--- .../StringIndexOf/StringIndexOf.ino | 6 ++--- .../08.Strings/StringLength/StringLength.ino | 4 +-- .../StringLengthTrim/StringLengthTrim.ino | 6 ++--- .../StringReplace/StringReplace.ino | 6 ++--- .../StringStartsWithEndsWith.ino | 6 ++--- .../StringSubstring/StringSubstring.ino | 6 ++--- .../08.Strings/StringToInt/StringToInt.ino | 4 ++- .../KeyboardLogout/KeyboardLogout.ino | 4 +-- .../KeyboardMessage/KeyboardMessage.ino | 2 +- .../KeyboardReprogram/KeyboardReprogram.ino | 4 +-- .../KeyboardAndMouseControl.ino | 6 ++--- .../ButtonMouseControl/ButtonMouseControl.ino | 7 +++-- .../JoystickMouseControl.ino | 7 ++--- .../p02_SpaceshipInterface.ino | 14 +++++----- .../p03_LoveOMeter/p03_LoveOMeter.ino | 10 +++---- .../p04_ColorMixingLamp.ino | 18 ++++++------- .../p05_ServoMoodIndicator.ino | 10 +++---- .../p06_LightTheremin/p06_LightTheremin.ino | 10 +++---- .../p07_Keyboard/p07_Keyboard.ino | 14 +++++----- .../p08_DigitalHourglass.ino | 12 ++++----- .../p09_MotorizedPinwheel.ino | 18 ++++++------- .../p10_Zoetrope/p10_Zoetrope.ino | 18 ++++++------- .../p11_CrystalBall/p11_CrystalBall.ino | 15 +++++------ .../p12_KnockLock/p12_KnockLock.ino | 26 +++++++++---------- .../p13_TouchSensorLamp.ino | 16 ++++++------ .../p14_TweakTheArduinoLogo.ino | 14 +++++----- .../p15_HackingButtons/p15_HackingButtons.ino | 10 +++---- .../11.ArduinoISP/ArduinoISP/ArduinoISP.ino | 2 +- 75 files changed, 298 insertions(+), 316 deletions(-) diff --git a/build/shared/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino b/build/shared/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino index b413e9baf5b..789785dcc9a 100644 --- a/build/shared/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino +++ b/build/shared/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino @@ -1,10 +1,13 @@ /* AnalogReadSerial + Reads an analog input on pin 0, prints the result to the Serial Monitor. - Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu) + Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu). Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground. This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/AnalogReadSerial */ // the setup routine runs once when you press reset: diff --git a/build/shared/examples/01.Basics/Blink/Blink.ino b/build/shared/examples/01.Basics/Blink/Blink.ino index 3bfc1a75345..aa12be61782 100644 --- a/build/shared/examples/01.Basics/Blink/Blink.ino +++ b/build/shared/examples/01.Basics/Blink/Blink.ino @@ -1,5 +1,6 @@ /* Blink + Turns an LED on for one second, then off for one second, repeatedly. Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO @@ -8,18 +9,17 @@ If you want to know what pin the on-board LED is connected to on your Arduino model, check the Technical Specs of your board at https://www.arduino.cc/en/Main/Products - This example code is in the public domain. - modified 8 May 2014 by Scott Fitzgerald - modified 2 Sep 2016 by Arturo Guadalupi - modified 8 Sep 2016 by Colby Newman -*/ + This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/Blink +*/ // the setup function runs once when you press reset or power the board void setup() { diff --git a/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino b/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino index afa9a0aab7f..b3040af4e69 100644 --- a/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino +++ b/build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino @@ -1,8 +1,11 @@ /* DigitalReadSerial + Reads a digital input on pin 2, prints the result to the Serial Monitor This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/DigitalReadSerial */ // digital pin 2 has a pushbutton attached to it. Give it a name: diff --git a/build/shared/examples/01.Basics/Fade/Fade.ino b/build/shared/examples/01.Basics/Fade/Fade.ino index d249fb5efcb..e92a69f9ad1 100644 --- a/build/shared/examples/01.Basics/Fade/Fade.ino +++ b/build/shared/examples/01.Basics/Fade/Fade.ino @@ -11,6 +11,8 @@ a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11. This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/Fade */ int led = 9; // the PWM pin the LED is attached to diff --git a/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.ino b/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.ino index 46f1a039dbc..4473b4e185c 100644 --- a/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.ino +++ b/build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.ino @@ -1,10 +1,13 @@ /* ReadAnalogVoltage + Reads an analog input on pin 0, converts it to voltage, and prints the result to the Serial Monitor. - Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu) + Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu). Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground. This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/ReadAnalogVoltage */ // the setup routine runs once when you press reset: diff --git a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino index 724127cf5d2..22607d8f768 100644 --- a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino +++ b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino @@ -1,4 +1,5 @@ -/* Blink without Delay +/* + Blink without Delay Turns on and off a light emitting diode (LED) connected to a digital pin, without using the delay() function. This means that other code @@ -7,10 +8,10 @@ The circuit: - Use the onboard LED. - Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO - it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to - the correct LED pin independent of which board is used. - If you want to know what pin the on-board LED is connected to on your Arduino model, check - the Technical Specs of your board at https://www.arduino.cc/en/Main/Products + it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to + the correct LED pin independent of which board is used. + If you want to know what pin the on-board LED is connected to on your Arduino model, check + the Technical Specs of your board at https://www.arduino.cc/en/Main/Products created 2005 by David A. Mellis @@ -21,7 +22,6 @@ modified 9 Jan 2017 by Arturo Guadalupi - This example code is in the public domain. http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay diff --git a/build/shared/examples/02.Digital/Button/Button.ino b/build/shared/examples/02.Digital/Button/Button.ino index d48606fe32f..955013f1584 100644 --- a/build/shared/examples/02.Digital/Button/Button.ino +++ b/build/shared/examples/02.Digital/Button/Button.ino @@ -4,15 +4,13 @@ Turns on and off a light emitting diode(LED) connected to digital pin 13, when pressing a pushbutton attached to pin 2. - The circuit: - LED attached from pin 13 to ground - pushbutton attached to pin 2 from +5V - 10K resistor attached to pin 2 from ground - Note: on most Arduinos there is already an LED on the board - attached to pin 13. - + attached to pin 13. created 2005 by DojoDave diff --git a/build/shared/examples/02.Digital/Debounce/Debounce.ino b/build/shared/examples/02.Digital/Debounce/Debounce.ino index 4cbfe69aed6..e21410cd165 100644 --- a/build/shared/examples/02.Digital/Debounce/Debounce.ino +++ b/build/shared/examples/02.Digital/Debounce/Debounce.ino @@ -9,13 +9,12 @@ The circuit: - LED attached from pin 13 to ground - pushbutton attached from pin 2 to +5V - - 10K resistor attached from pin 2 to ground + - 10 kilohm resistor attached from pin 2 to ground - Note: On most Arduino boards, there is already an LED on the board - connected to pin 13, so you don't need any extra components for this example. + connected to pin 13, so you don't need any extra components for this example. - - created 21 November 2006 + created 21 Nov 2006 by David A. Mellis modified 30 Aug 2011 by Limor Fried @@ -24,7 +23,6 @@ modified 30 Aug 2016 by Arturo Guadalupi - This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Debounce diff --git a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino index 91783d7e96b..8fc945db32c 100644 --- a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino +++ b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino @@ -5,20 +5,19 @@ digital input on pin 2 and prints the results to the Serial Monitor. The circuit: - - Momentary switch attached from pin 2 to ground - - Built-in LED on pin 13 + - momentary switch attached from pin 2 to ground + - built-in LED on pin 13 Unlike pinMode(INPUT), there is no pull-down resistor necessary. An internal 20K-ohm resistor is pulled to 5V. This configuration causes the input to read HIGH when the switch is open, and LOW when it is closed. - created 14 March 2012 + created 14 Mar 2012 by Scott Fitzgerald - http://www.arduino.cc/en/Tutorial/InputPullupSerial - - This example code is in the public domain + This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/InputPullupSerial */ void setup() { diff --git a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino index 73ea4f02662..ba47e8b616d 100644 --- a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino +++ b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino @@ -11,7 +11,7 @@ The circuit: - pushbutton attached to pin 2 from +5V - - 10K resistor attached to pin 2 from ground + - 10 kilohm resistor attached to pin 2 from ground - LED attached from pin 13 to ground (or use the built-in LED on most Arduino boards) @@ -22,7 +22,6 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/ButtonStateChange - */ // this constant won't change: diff --git a/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino b/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino index 035c4c17563..7a958c90aa9 100644 --- a/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino +++ b/build/shared/examples/02.Digital/toneKeyboard/toneKeyboard.ino @@ -1,12 +1,12 @@ /* - keyboard + Keyboard Plays a pitch that changes based on a changing analog input circuit: - - 3 force-sensing resistors from +5V to analog in 0 through 5 - - 3 10K resistors from analog in 0 through 5 to ground - - 8-ohm speaker on digital pin 8 + - three force-sensing resistors from +5V to analog in 0 through 5 + - three 10 kilohm resistors from analog in 0 through 5 to ground + - 8 ohm speaker on digital pin 8 created 21 Jan 2010 modified 9 Apr 2012 @@ -15,7 +15,6 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Tone3 - */ #include "pitches.h" diff --git a/build/shared/examples/02.Digital/toneMelody/toneMelody.ino b/build/shared/examples/02.Digital/toneMelody/toneMelody.ino index 9f86a1cac47..e8b3371e981 100644 --- a/build/shared/examples/02.Digital/toneMelody/toneMelody.ino +++ b/build/shared/examples/02.Digital/toneMelody/toneMelody.ino @@ -4,7 +4,7 @@ Plays a melody circuit: - - 8-ohm speaker on digital pin 8 + - 8 ohm speaker on digital pin 8 created 21 Jan 2010 modified 30 Aug 2011 @@ -13,8 +13,8 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Tone - */ + #include "pitches.h" // notes in the melody: diff --git a/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino b/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino index 0abe1c6e498..24cf7d687d4 100644 --- a/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino +++ b/build/shared/examples/02.Digital/toneMultiple/toneMultiple.ino @@ -4,16 +4,15 @@ Plays multiple tones on multiple pins in sequence circuit: - - 3 8-ohm speaker on digital pins 6, 7, and 8 + - three 8 ohm speakers on digital pins 6, 7, and 8 - created 8 March 2010 + created 8 Mar 2010 by Tom Igoe based on a snippet from Greg Borenstein This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Tone4 - */ void setup() { diff --git a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino index 2090b19020a..29ef4a83b08 100644 --- a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino +++ b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino @@ -4,9 +4,9 @@ Plays a pitch that changes based on a changing analog input circuit: - - 8-ohm speaker on digital pin 9 + - 8 ohm speaker on digital pin 9 - photoresistor on analog 0 to 5V - - 4.7K resistor on analog 0 to ground + - 4.7 kilohm resistor on analog 0 to ground created 21 Jan 2010 modified 31 May 2012 @@ -15,10 +15,8 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Tone2 - */ - void setup() { // initialize serial communications (for debugging only): Serial.begin(9600); diff --git a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino index 79eb7bd2376..f78b05d23a0 100644 --- a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino +++ b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino @@ -17,6 +17,7 @@ This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/AnalogInOutSerial */ // These constants won't change. They're used to give names diff --git a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino index 6259f70bbfd..4dfcbe4d814 100644 --- a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino +++ b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino @@ -1,30 +1,30 @@ /* Analog Input + Demonstrates analog input by reading an analog sensor on analog pin 0 and turning on and off a light emitting diode(LED) connected to digital pin 13. The amount of time the LED will be on and off depends on the value obtained by analogRead(). The circuit: - - Potentiometer attached to analog input 0 - - center pin of the potentiometer to the analog pin - - one side pin (either one) to ground - - the other side pin to +5V - - LED anode (long leg) attached to digital output 13 - - LED cathode (short leg) attached to ground + - potentiometer + center pin of the potentiometer to the analog input 0 + one side pin (either one) to ground + the other side pin to +5V + - LED + anode (long leg) attached to digital output 13 + cathode (short leg) attached to ground - Note: because most Arduinos have a built-in LED attached - to pin 13 on the board, the LED is optional. - + to pin 13 on the board, the LED is optional. - Created by David Cuartielles + created by David Cuartielles modified 30 Aug 2011 By Tom Igoe This example code is in the public domain. http://www.arduino.cc/en/Tutorial/AnalogInput - */ int sensorPin = A0; // select the input pin for the potentiometer diff --git a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino index 0e508ebbe1f..decdb589e27 100644 --- a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino +++ b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino @@ -12,7 +12,9 @@ This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/AnalogWriteMega */ + // These constants won't change. They're used to give names // to the pins used: const int lowestPin = 2; diff --git a/build/shared/examples/03.Analog/Calibration/Calibration.ino b/build/shared/examples/03.Analog/Calibration/Calibration.ino index 3853182f02b..1e1ff7befca 100644 --- a/build/shared/examples/03.Analog/Calibration/Calibration.ino +++ b/build/shared/examples/03.Analog/Calibration/Calibration.ino @@ -12,18 +12,17 @@ maximum low and listen for anything higher as the new maximum. The circuit: - - Analog sensor (potentiometer will do) attached to analog input 0 + - analog sensor (potentiometer will do) attached to analog input 0 - LED attached from digital pin 9 to ground created 29 Oct 2008 - By David A Mellis + by David A Mellis modified 30 Aug 2011 - By Tom Igoe - - http://www.arduino.cc/en/Tutorial/Calibration + by Tom Igoe This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/Calibration */ // These constants won't change: diff --git a/build/shared/examples/03.Analog/Fading/Fading.ino b/build/shared/examples/03.Analog/Fading/Fading.ino index 53378c06919..1612b8b9999 100644 --- a/build/shared/examples/03.Analog/Fading/Fading.ino +++ b/build/shared/examples/03.Analog/Fading/Fading.ino @@ -6,18 +6,16 @@ The circuit: - LED attached from digital pin 9 to ground. - Created 1 Nov 2008 - By David A. Mellis + created 1 Nov 2008 + by David A. Mellis modified 30 Aug 2011 - By Tom Igoe - - http://www.arduino.cc/en/Tutorial/Fading + by Tom Igoe This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/Fading */ - int ledPin = 9; // LED connected to digital pin 9 void setup() { diff --git a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino index 7036314d200..077976e0f1c 100644 --- a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino +++ b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino @@ -1,5 +1,4 @@ /* - Smoothing Reads repeatedly from an analog input, calculating a running average @@ -7,20 +6,18 @@ continually averages them. The circuit: - - Analog sensor (potentiometer will do) attached to analog input 0 + - analog sensor (potentiometer will do) attached to analog input 0 - Created 22 April 2007 - By David A. Mellis + created 22 Apr 2007 + by David A. Mellis modified 9 Apr 2012 by Tom Igoe - http://www.arduino.cc/en/Tutorial/Smoothing This example code is in the public domain. - + http://www.arduino.cc/en/Tutorial/Smoothing */ - // Define the number of samples to keep track of. The higher the number, // the more the readings will be smoothed, but the slower the output will // respond to the input. Using a constant rather than a normal variable lets diff --git a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino index e336c3e221b..3ded18b7d20 100644 --- a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino +++ b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino @@ -10,15 +10,15 @@ The circuit: No external hardware needed. created 2006 - by Nicholas Zambetti + by Nicholas Zambetti modified 9 Apr 2012 by Tom Igoe This example code is in the public domain. - - + http://www.arduino.cc/en/Tutorial/ASCIITable */ + void setup() { //Initialize serial and wait for port to open: Serial.begin(9600); diff --git a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino index 0032c3bcce1..d2e0a57e971 100644 --- a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino +++ b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino @@ -7,8 +7,8 @@ reads these bytes and uses them to set the brightness of the LED. The circuit: - LED attached from digital pin 9 to ground. - Serial connection to Processing, Max/MSP, or another serial application + - LED attached from digital pin 9 to ground. + - Serial connection to Processing, Max/MSP, or another serial application created 2006 by David A. Mellis @@ -18,7 +18,6 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Dimmer - */ const int ledPin = 9; // the pin that the LED is attached to diff --git a/build/shared/examples/04.Communication/Graph/Graph.ino b/build/shared/examples/04.Communication/Graph/Graph.ino index 6eba7eca9ef..d6535ffef7d 100644 --- a/build/shared/examples/04.Communication/Graph/Graph.ino +++ b/build/shared/examples/04.Communication/Graph/Graph.ino @@ -14,7 +14,7 @@ so you can see the value of the analog input changing over time. The circuit: - Any analog input sensor is attached to analog in pin 0. + - any analog input sensor attached to analog in pin 0 created 2006 by David A. Mellis diff --git a/build/shared/examples/04.Communication/Midi/Midi.ino b/build/shared/examples/04.Communication/Midi/Midi.ino index 3465d0bdb28..b55553c9aeb 100644 --- a/build/shared/examples/04.Communication/Midi/Midi.ino +++ b/build/shared/examples/04.Communication/Midi/Midi.ino @@ -5,12 +5,11 @@ If this circuit is connected to a MIDI synth, it will play the notes F#-0 (0x1E) to F#-5 (0x5A) in sequence. - The circuit: - digital in 1 connected to MIDI jack pin 5 - MIDI jack pin 2 connected to ground - - MIDI jack pin 4 connected to +5V through 220-ohm resistor - Attach a MIDI cable to the jack, then to a MIDI synth, and play music. + - MIDI jack pin 4 connected to +5V through 220 ohm resistor + - Attach a MIDI cable to the jack, then to a MIDI synth, and play music. created 13 Jun 2006 modified 13 Aug 2012 @@ -19,7 +18,6 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Midi - */ void setup() { diff --git a/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino b/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino index f5474ac0264..d356f51b807 100644 --- a/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino +++ b/build/shared/examples/04.Communication/MultiSerial/MultiSerial.ino @@ -4,20 +4,19 @@ Receives from the main serial port, sends to the others. Receives from serial port 1, sends to the main serial (Serial 0). - This example works only with boards with more than one serial like Arduino Mega, Due, Zero etc + This example works only with boards with more than one serial like Arduino Mega, Due, Zero etc. The circuit: - - Any serial device attached to Serial port 1 - - Serial monitor open on Serial port 0: + - any serial device attached to Serial port 1 + - Serial Monitor open on Serial port 0 - created 30 Dec. 2008 + created 30 Dec 2008 modified 20 May 2012 by Tom Igoe & Jed Roach modified 27 Nov 2015 by Arturo Guadalupi This example code is in the public domain. - */ diff --git a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino index 406afc2dc8f..e3ff7915565 100644 --- a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino +++ b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino @@ -6,14 +6,13 @@ It parses them into ints, and uses those to fade an RGB LED. Circuit: Common-Cathode RGB LED wired like so: - - Red anode: digital pin 3 - - Green anode: digital pin 5 - - Blue anode: digital pin 6 - - Cathode : GND + - red anode: digital pin 3 + - green anode: digital pin 5 + - blue anode: digital pin 6 + - cathode: GND created 13 Apr 2012 by Tom Igoe - modified 14 Mar 2016 by Arturo Guadalupi diff --git a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino index b514e076d99..1fedbaab48b 100644 --- a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino +++ b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino @@ -7,21 +7,19 @@ Then it waits for a byte in the serial port, and sends three sensor values whenever it gets a byte in. - Thanks to Greg Shakar and Scott Fitzgerald for the improvements - - The circuit: + The circuit: - potentiometers attached to analog inputs 0 and 1 - pushbutton attached to digital I/O 2 - Created 26 Sept. 2005 + created 26 Sep 2005 by Tom Igoe - modified 24 April 2012 + modified 24 Apr 2012 by Tom Igoe and Scott Fitzgerald + Thanks to Greg Shakar and Scott Fitzgerald for the improvements This example code is in the public domain. http://www.arduino.cc/en/Tutorial/SerialCallResponse - */ int firstSensor = 0; // first analog sensor diff --git a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino index 125fc568067..76304da6149 100644 --- a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino +++ b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino @@ -9,23 +9,19 @@ truncated by a linefeed and carriage return, whenever it gets a byte in. - Thanks to Greg Shakar and Scott Fitzgerald for the improvements - - The circuit: + The circuit: - potentiometers attached to analog inputs 0 and 1 - pushbutton attached to digital I/O 2 - - - Created 26 Sept. 2005 + created 26 Sep 2005 by Tom Igoe modified 24 Apr 2012 by Tom Igoe and Scott Fitzgerald + Thanks to Greg Shakar and Scott Fitzgerald for the improvements This example code is in the public domain. http://www.arduino.cc/en/Tutorial/SerialCallResponseASCII - */ int firstSensor = 0; // first analog sensor diff --git a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino index 3f7db628e51..5105a108dd4 100644 --- a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino +++ b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino @@ -11,13 +11,12 @@ NOTE: The serialEvent() feature is not available on the Leonardo, Micro, or other ATmega32U4 based boards. - Created 9 May 2011 + created 9 May 2011 by Tom Igoe This example code is in the public domain. http://www.arduino.cc/en/Tutorial/SerialEvent - */ String inputString = ""; // a String to hold incoming data diff --git a/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino b/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino index 75687040079..0116027ae31 100644 --- a/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino +++ b/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino @@ -19,8 +19,8 @@ but you can change these names to connect any two serial ports on a board that has multiple ports. - Created 23 May 2016 - by Erik Nyquist + created 23 May 2016 + by Erik Nyquist */ void setup() { diff --git a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino index b984b7a2813..4fd6baa8701 100644 --- a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino +++ b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino @@ -6,14 +6,14 @@ The circuit: - potentiometers attached to analog inputs 0, 1, and 2 - http://www.arduino.cc/en/Tutorial/VirtualColorMixer - created 2 Dec 2006 by David A. Mellis modified 30 Aug 2011 by Tom Igoe and Scott Fitzgerald This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/VirtualColorMixer */ const int redPin = A0; // sensor to control red color @@ -34,7 +34,7 @@ void loop() { /* Processing code for this example - // This example code is in the public domain. + // This example code is in the public domain. import processing.serial.*; diff --git a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino index a9fa64f0f58..48ee22de398 100644 --- a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino +++ b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino @@ -7,9 +7,9 @@ regardless of the level. The circuit: - - potentiometer connected to analog pin 0. - Center pin of the potentiometer goes to the analog pin. - side pins of the potentiometer go to +5V and ground + - potentiometer + Center pin of the potentiometer goes to analog pin 0. + Side pins of the potentiometer go to +5V and ground. - LED connected from digital pin 13 to ground - Note: On most Arduino boards, there is already an LED on the board @@ -22,7 +22,6 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/IfStatement - */ // These constants won't change: diff --git a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino index 9db1980fe78..9efda34f3f5 100644 --- a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino +++ b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino @@ -11,10 +11,10 @@ The circuit: - photoresistor connected from +5V to analog in pin 0 - - 10K resistor connected from ground to analog in pin 0 + - 10 kilohm resistor connected from ground to analog in pin 0 - LED connected from digital pin 9 to ground through 220 ohm resistor - pushbutton attached from pin 2 to +5V - - 10K resistor attached from pin 2 to ground + - 10 kilohm resistor attached from pin 2 to ground created 17 Jan 2009 modified 30 Aug 2011 @@ -25,7 +25,6 @@ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/WhileLoop - */ diff --git a/build/shared/examples/05.Control/switchCase2/switchCase2.ino b/build/shared/examples/05.Control/switchCase2/switchCase2.ino index c626ebd6313..6c8c52db9ad 100644 --- a/build/shared/examples/05.Control/switchCase2/switchCase2.ino +++ b/build/shared/examples/05.Control/switchCase2/switchCase2.ino @@ -1,5 +1,5 @@ /* - Switch statement with serial input + Switch statement with serial input Demonstrates the use of a switch statement. The switch statement allows you to choose from among a set of discrete values @@ -10,7 +10,7 @@ the LEDs off. The circuit: - - 5 LEDs attached to digital pins 2 through 6 through 220-ohm resistors + - five LEDs attached to digital pins 2 through 6 through 220 ohm resistors created 1 Jul 2009 by Tom Igoe diff --git a/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino b/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino index 30ba37e5452..443861a8b7b 100644 --- a/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino +++ b/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino @@ -1,4 +1,3 @@ - /* ADXL3xx @@ -7,15 +6,13 @@ compatible with the breakout boards from SparkFun, available from: http://www.sparkfun.com/commerce/categories.php?c=80 - http://www.arduino.cc/en/Tutorial/ADXL3xx - The circuit: - analog 0: accelerometer self test - analog 1: z-axis - analog 2: y-axis - analog 3: x-axis - analog 4: ground - analog 5: vcc + - analog 0: accelerometer self test + - analog 1: z-axis + - analog 2: y-axis + - analog 3: x-axis + - analog 4: ground + - analog 5: vcc created 2 Jul 2008 by David A. Mellis @@ -24,6 +21,7 @@ This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/ADXL3xx */ // these constants describe the pins. They won't change: diff --git a/build/shared/examples/06.Sensors/Knock/Knock.ino b/build/shared/examples/06.Sensors/Knock/Knock.ino index e5c130732cf..9c6160c50d8 100644 --- a/build/shared/examples/06.Sensors/Knock/Knock.ino +++ b/build/shared/examples/06.Sensors/Knock/Knock.ino @@ -1,4 +1,5 @@ -/* Knock Sensor +/* + Knock Sensor This sketch reads a piezo element to detect a knocking sound. It reads an analog pin and compares the result to a set threshold. @@ -6,11 +7,9 @@ "knock" to the serial port, and toggles the LED on pin 13. The circuit: - - + connection of the piezo attached to analog in 0 - - - connection of the piezo attached to ground - - 1-megohm resistor attached from analog in 0 to ground - - http://www.arduino.cc/en/Tutorial/Knock + - positive connection of the piezo attached to analog in 0 + - negative connection of the piezo attached to ground + - 1 megohm resistor attached from analog in 0 to ground created 25 Mar 2007 by David Cuartielles @@ -19,6 +18,7 @@ This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/Knock */ diff --git a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino index 572a93dfcc3..d8daae78d79 100644 --- a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino +++ b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino @@ -7,12 +7,10 @@ computer. The circuit: - - X output of accelerometer to digital pin 2 - - Y output of accelerometer to digital pin 3 - - +V of accelerometer to +5V - - GND of accelerometer to ground - - http://www.arduino.cc/en/Tutorial/Memsic2125 + - X output of accelerometer to digital pin 2 + - Y output of accelerometer to digital pin 3 + - +V of accelerometer to +5V + - GND of accelerometer to ground created 6 Nov 2008 by David A. Mellis @@ -21,6 +19,7 @@ This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/Memsic2125 */ // these constants won't change: diff --git a/build/shared/examples/06.Sensors/Ping/Ping.ino b/build/shared/examples/06.Sensors/Ping/Ping.ino index a2e410d644f..235d5e33f48 100644 --- a/build/shared/examples/06.Sensors/Ping/Ping.ino +++ b/build/shared/examples/06.Sensors/Ping/Ping.ino @@ -1,4 +1,5 @@ -/* Ping))) Sensor +/* + Ping))) Sensor This sketch reads a PING))) ultrasonic rangefinder and returns the distance to the closest object in range. To do this, it sends a pulse @@ -7,11 +8,9 @@ the distance of the object from the sensor. The circuit: - - +V connection of the PING))) attached to +5V - - GND connection of the PING))) attached to ground - - SIG connection of the PING))) attached to digital pin 7 - - http://www.arduino.cc/en/Tutorial/Ping + - +V connection of the PING))) attached to +5V + - GND connection of the PING))) attached to ground + - SIG connection of the PING))) attached to digital pin 7 created 3 Nov 2008 by David A. Mellis @@ -20,6 +19,7 @@ This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/Ping */ // this constant won't change. It's the pin number diff --git a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino index 84cf6359682..cf1fa9e3077 100644 --- a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino +++ b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino @@ -1,18 +1,14 @@ /* Row-Column Scanning an 8x8 LED matrix with X-Y input - This example controls an 8x8 LED matrix using two analog inputs - - created 27 May 2009 - modified 30 Aug 2011 - by Tom Igoe + This example controls an 8x8 LED matrix using two analog inputs. This example works for the Lumex LDM-24488NI Matrix. See http://sigma.octopart.com/140413/datasheet/Lumex-LDM-24488NI.pdf - for the pin connections + for the pin connections. For other LED cathode column matrixes, you should only need to change - the pin numbers in the row[] and column[] arrays + the pin numbers in the row[] and column[] arrays. rows are the anodes cols are the cathodes @@ -20,20 +16,23 @@ Pin numbers: Matrix: - - Digital pins 2 through 13, + - digital pins 2 through 13, - analog pins 2 through 5 used as digital 16 through 19 Potentiometers: - center pins are attached to analog pins 0 and 1, respectively - - side pins attached to +5V and ground, respectively. + - side pins attached to +5V and ground, respectively + + created 27 May 2009 + modified 30 Aug 2011 + by Tom Igoe This example code is in the public domain. http://www.arduino.cc/en/Tutorial/RowColumnScanning - see also http://www.tigoe.net/pcomp/code/category/arduinowiring/514 for more + see also http://www.tigoe.net/pcomp/code/category/arduinowiring for more */ - // 2-dimensional array of row pin numbers: const int row[8] = { 2, 7, 19, 5, 13, 18, 12, 16 diff --git a/build/shared/examples/07.Display/barGraph/barGraph.ino b/build/shared/examples/07.Display/barGraph/barGraph.ino index 6968c0c0c7d..aaa0a572c8e 100644 --- a/build/shared/examples/07.Display/barGraph/barGraph.ino +++ b/build/shared/examples/07.Display/barGraph/barGraph.ino @@ -10,7 +10,7 @@ depends on an analog input. The circuit: - - LEDs from pins 2 through 11 to ground + - LEDs from pins 2 through 11 to ground created 4 Sep 2010 by Tom Igoe @@ -20,7 +20,6 @@ http://www.arduino.cc/en/Tutorial/BarGraph */ - // these constants won't change: const int analogPin = A0; // the pin that the potentiometer is attached to const int ledCount = 10; // the number of LEDs in the bar graph diff --git a/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino b/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino index 3fbdeb145f0..07a89c582e3 100644 --- a/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino +++ b/build/shared/examples/08.Strings/CharacterAnalysis/CharacterAnalysis.ino @@ -9,6 +9,8 @@ by Tom Igoe This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/CharacterAnalysis */ void setup() { diff --git a/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino b/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino index fc13191c3ed..5f65e502074 100644 --- a/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino +++ b/build/shared/examples/08.Strings/StringAdditionOperator/StringAdditionOperator.ino @@ -4,13 +4,13 @@ Examples of how to add Strings together You can also add several different data types to String, as shown here: - created 27 July 2010 + created 27 Jul 2010 modified 2 Apr 2012 by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringAdditionOperator - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringAdditionOperator */ // declare three Strings: diff --git a/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino b/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino index da01481cfcd..abdfe76a331 100644 --- a/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino +++ b/build/shared/examples/08.Strings/StringAppendOperator/StringAppendOperator.ino @@ -3,13 +3,13 @@ Examples of how to append different data types to Strings - created 27 July 2010 + created 27 Jul 2010 modified 2 Apr 2012 by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringAppendOperator - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringAppendOperator */ String stringOne, stringTwo; diff --git a/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino b/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino index 2ec8c93f368..78a12705298 100644 --- a/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino +++ b/build/shared/examples/08.Strings/StringCaseChanges/StringCaseChanges.ino @@ -3,13 +3,13 @@ Examples of how to change the case of a String - created 27 July 2010 + created 27 Jul 2010 modified 2 Apr 2012 by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringCaseChanges - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringCaseChanges */ void setup() { diff --git a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino index 44eabe87b60..f985e7929d1 100644 --- a/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino +++ b/build/shared/examples/08.Strings/StringCharacters/StringCharacters.ino @@ -3,13 +3,13 @@ Examples of how to get and set characters of a String - created 27 July 2010 + created 27 Jul 2010 modified 2 Apr 2012 by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringCharacters - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringCharacters */ void setup() { diff --git a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino index 56a2a829bb5..9ab93f70730 100644 --- a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino +++ b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino @@ -3,13 +3,13 @@ Examples of how to compare Strings using the comparison operators - created 27 July 2010 + created 27 Jul 2010 modified 2 Apr 2012 by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringComparisonOperators - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringComparisonOperators */ String stringOne, stringTwo; diff --git a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino index 9277c6ab59e..414dd8dca06 100644 --- a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino +++ b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino @@ -3,13 +3,13 @@ Examples of how to create Strings from other data types - created 27 July 2010 + created 27 Jul 2010 modified 30 Aug 2011 by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringConstructors - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringConstructors */ void setup() { diff --git a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino index 8de5055cc94..46b224069a4 100644 --- a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino +++ b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino @@ -3,13 +3,13 @@ Examples of how to evaluate, look for, and replace characters in a String - created 27 July 2010 + created 27 Jul 2010 modified 2 Apr 2012 by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringIndexOf - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringIndexOf */ void setup() { diff --git a/build/shared/examples/08.Strings/StringLength/StringLength.ino b/build/shared/examples/08.Strings/StringLength/StringLength.ino index bc748349d42..0fe5203b90f 100644 --- a/build/shared/examples/08.Strings/StringLength/StringLength.ino +++ b/build/shared/examples/08.Strings/StringLength/StringLength.ino @@ -7,9 +7,9 @@ created 1 Aug 2010 by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringLengthTrim - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringLengthTrim */ String txtMsg = ""; // a string for incoming text diff --git a/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino b/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino index d68ef8f29a0..d107c8f09e7 100644 --- a/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino +++ b/build/shared/examples/08.Strings/StringLengthTrim/StringLengthTrim.ino @@ -3,13 +3,13 @@ Examples of how to use length() and trim() in a String - created 27 July 2010 + created 27 Jul 2010 modified 2 Apr 2012 by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringLengthTrim - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringLengthTrim */ void setup() { diff --git a/build/shared/examples/08.Strings/StringReplace/StringReplace.ino b/build/shared/examples/08.Strings/StringReplace/StringReplace.ino index 6262170653d..17407f1ec13 100644 --- a/build/shared/examples/08.Strings/StringReplace/StringReplace.ino +++ b/build/shared/examples/08.Strings/StringReplace/StringReplace.ino @@ -3,13 +3,13 @@ Examples of how to replace characters or substrings of a String - created 27 July 2010 + created 27 Jul 2010 modified 2 Apr 2012 by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringReplace - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringReplace */ void setup() { diff --git a/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino b/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino index bfd72fd931c..6ea6f2cce62 100644 --- a/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino +++ b/build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino @@ -3,13 +3,13 @@ Examples of how to use startsWith() and endsWith() in a String - created 27 July 2010 + created 27 Jul 2010 modified 2 Apr 2012 by Tom Igoe - http://www.arduino.cc/en/Tutorial/StringStartsWithEndsWith - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringStartsWithEndsWith */ void setup() { diff --git a/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino b/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino index 9772afaca06..ccdf2f330ee 100644 --- a/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino +++ b/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino @@ -3,13 +3,13 @@ Examples of how to use substring in a String - created 27 July 2010, + created 27 Jul 2010, modified 2 Apr 2012 by Zach Eveland - http://www.arduino.cc/en/Tutorial/StringSubstring - This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringSubstring */ void setup() { diff --git a/build/shared/examples/08.Strings/StringToInt/StringToInt.ino b/build/shared/examples/08.Strings/StringToInt/StringToInt.ino index da3e1261d0f..1d4a7ce0e40 100644 --- a/build/shared/examples/08.Strings/StringToInt/StringToInt.ino +++ b/build/shared/examples/08.Strings/StringToInt/StringToInt.ino @@ -5,12 +5,14 @@ the string to a number if the characters are digits. The circuit: - No external components needed. + - No external components needed. created 29 Nov 2010 by Tom Igoe This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/StringToInt */ String inString = ""; // string to hold input diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino index 1ddf63ed8c6..d159af6d5c8 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino @@ -14,13 +14,13 @@ Circuit: - Arduino Leonardo or Micro - - wire to connect D2 to ground. + - wire to connect D2 to ground created 6 Mar 2012 modified 27 Mar 2012 by Tom Igoe - This example is in the public domain + This example is in the public domain. http://www.arduino.cc/en/Tutorial/KeyboardLogout */ diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino b/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino index d55453d1b0c..32c3b9f81ce 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino @@ -7,7 +7,7 @@ The circuit: - pushbutton attached from pin 4 to +5V - - 10-kilohm resistor attached from pin 4 to ground + - 10 kilohm resistor attached from pin 4 to ground created 24 Oct 2011 modified 27 Mar 2012 diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino index 7691aff0f81..dc461fac8fb 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino @@ -14,7 +14,7 @@ Circuit: - Arduino Leonardo, Micro, Due, LilyPad USB, or Yún - - wire to connect D2 to ground. + - wire to connect D2 to ground created 5 Mar 2012 modified 29 Mar 2012 @@ -22,7 +22,7 @@ modified 3 May 2014 by Scott Fitzgerald - This example is in the public domain + This example is in the public domain. http://www.arduino.cc/en/Tutorial/KeyboardReprogram */ diff --git a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino index 6f92161b82f..ab5d78b56f7 100644 --- a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino +++ b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino @@ -1,11 +1,10 @@ - /* KeyboardAndMouseControl Controls the mouse from five pushbuttons on an Arduino Leonardo, Micro or Due. Hardware: - - 5 pushbuttons attached to D2, D3, D4, D5, D6 + - five pushbuttons attached to D2, D3, D4, D5, D6 The mouse movement is always relative. This sketch reads four pushbuttons, and uses them to set the movement of the mouse. @@ -17,8 +16,9 @@ modified 27 Mar 2012 by Tom Igoe - this code is in the public domain + This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/KeyboardAndMouseControl */ #include "Keyboard.h" diff --git a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino index 7f131539141..14e68a78d0f 100644 --- a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino @@ -1,4 +1,3 @@ - /* ButtonMouseControl @@ -7,8 +6,7 @@ Controls the mouse from five pushbuttons on an Arduino Leonardo, Micro or Due. Hardware: - - 5 pushbuttons attached to D2, D3, D4, D5, D6 - + - five pushbuttons attached to D2, D3, D4, D5, D6 The mouse movement is always relative. This sketch reads four pushbuttons, and uses them to set the movement of the mouse. @@ -20,8 +18,9 @@ modified 27 Mar 2012 by Tom Igoe - this code is in the public domain + This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/ButtonMouseControl */ #include "Mouse.h" diff --git a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino index 8b50376e56a..4539fa05641 100644 --- a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino @@ -3,7 +3,7 @@ Controls the mouse from a joystick on an Arduino Leonardo, Micro or Due. Uses a pushbutton to turn on and off mouse control, and - a second pushbutton to click the left mouse button + a second pushbutton to click the left mouse button. Hardware: - 2-axis joystick connected to pins A0 and A1 @@ -20,12 +20,13 @@ This sketch includes a pushbutton to toggle the mouse control state, so you can turn on and off mouse control. - created 15 Sept 2011 + created 15 Sep 2011 updated 28 Mar 2012 by Tom Igoe - this code is in the public domain + This example code is in the public domain. + http://www.arduino.cc/en/Tutorial/JoystickMouseControl */ #include "Mouse.h" diff --git a/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino b/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino index a963a3f278a..219afb42b05 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino @@ -6,18 +6,18 @@ Arduino Starter Kit Parts required: - 1 green LED - 2 red LEDs - pushbutton - 10 kilohm resistor - 3 220 ohm resistors + - one green LED + - two red LEDs + - pushbutton + - 10 kilohm resistor + - three 220 ohm resistors - Created 13 September 2012 + created 13 Sep 2012 by Scott Fitzgerald http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ // Create a global variable to hold the diff --git a/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino b/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino index 7949de3a629..03befe9308a 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino @@ -6,16 +6,16 @@ Arduino Starter Kit Parts required: - 1 TMP36 temperature sensor - 3 red LEDs - 3 220 ohm resistors + - one TMP36 temperature sensor + - three red LEDs + - three 220 ohm resistors - Created 13 September 2012 + created 13 Sep 2012 by Scott Fitzgerald http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ // named constant for the pin the sensor is connected to diff --git a/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino b/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino index 44c973c9439..3e6ab05b30c 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino @@ -6,20 +6,20 @@ Arduino Starter Kit Parts required: - 1 RGB LED - three 10 kilohm resistors - 3 220 ohm resistors - 3 photoresistors - red green and blue colored gels - - Created 13 September 2012 - Modified 14 November 2012 + - one RGB LED + - three 10 kilohm resistors + - three 220 ohm resistors + - three photoresistors + - red green and blue colored gels + + created 13 Sep 2012 + modified 14 Nov 2012 by Scott Fitzgerald Thanks to Federico Vanzati for improvements http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ const int greenLEDPin = 9; // LED connected to digital pin 9 diff --git a/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino b/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino index d51a4909544..2875e1aa401 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino @@ -6,16 +6,16 @@ Arduino Starter Kit Parts required: - servo motor - 10 kilohm potentiometer - 2 100 uF electrolytic capacitors + - servo motor + - 10 kilohm potentiometer + - two 100 uF electrolytic capacitors - Created 13 September 2012 + created 13 Sep 2012 by Scott Fitzgerald http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ // include the Servo library diff --git a/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino b/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino index aceeee47e76..496300b3c24 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino @@ -6,16 +6,16 @@ Arduino Starter Kit Parts required: - photoresistor - 10 kilohm resistor - piezo + - photoresistor + - 10 kilohm resistor + - piezo - Created 13 September 2012 + created 13 Sep 2012 by Scott Fitzgerald http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ // variable to hold sensor value diff --git a/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino b/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino index 3636501f736..798e84f3f74 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino @@ -6,18 +6,18 @@ Arduino Starter Kit Parts required: - two 10 kilohm resistors - 1 Megohm resistor - 220 ohm resistor - 4 pushbuttons - piezo + - two 10 kilohm resistors + - 1 megohm resistor + - 220 ohm resistor + - four pushbuttons + - piezo - Created 13 September 2012 + created 13 Sep 2012 by Scott Fitzgerald http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ // create an array of notes diff --git a/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino b/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino index b4454b6e077..978b0762dff 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino @@ -6,17 +6,17 @@ Arduino Starter Kit Parts required: - 10 kilohm resistor - six 220 ohm resistors - six LEDs - tilt switch + - 10 kilohm resistor + - six 220 ohm resistors + - six LEDs + - tilt switch - Created 13 September 2012 + created 13 Sep 2012 by Scott Fitzgerald http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ // named constant for the switch pin diff --git a/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino b/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino index 71592fe9f32..ffe1eb4fea6 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino @@ -6,19 +6,19 @@ Arduino Starter Kit Parts required: - 10 kilohm resistor - pushbutton - motor - 9V battery - IRF520 MOSFET - 1N4007 diode - - Created 13 September 2012 + - 10 kilohm resistor + - pushbutton + - motor + - 9V battery + - IRF520 MOSFET + - 1N4007 diode + + created 13 Sep 2012 by Scott Fitzgerald http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ // named constants for the switch and motor pins diff --git a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino index b650f379646..ca0a3698113 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino @@ -6,20 +6,20 @@ Arduino Starter Kit Parts required: - two 10 kilohm resistors - 2 momentary pushbuttons - one 10 kilohm potentiometer - motor - 9V battery - H-Bridge - - Created 13 September 2012 + - two 10 kilohm resistors + - two momentary pushbuttons + - one 10 kilohm potentiometer + - motor + - 9V battery + - H-Bridge + + created 13 Sep 2012 by Scott Fitzgerald Thanks to Federico Vanzati for improvements http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ const int controlPin1 = 2; // connected to pin 7 on the H-bridge diff --git a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino index 1c2904a6e56..1a6c71bf876 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino @@ -6,19 +6,18 @@ Arduino Starter Kit Parts required: - 220 ohm resistor - 10 kilohm resistor - 10 kilohm potentiometer - 16x2 LCD screen - tilt switch + - 220 ohm resistor + - 10 kilohm resistor + - 10 kilohm potentiometer + - 16x2 LCD screen + - tilt switch - - Created 13 September 2012 + created 13 Sep 2012 by Scott Fitzgerald http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ // include the library code: diff --git a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino index e8c8d445f00..68eda827b38 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino @@ -6,24 +6,24 @@ Arduino Starter Kit Parts required: - 1 Megohm resistor - 10 kilohm resistor - three 220 ohm resistors - piezo - servo motor - push button - one red LED - one yellow LED - one green LED - 100 uF capacitor - - Created 18 September 2012 + - 1 megohm resistor + - 10 kilohm resistor + - three 220 ohm resistors + - piezo + - servo motor + - push button + - one red LED + - one yellow LED + - one green LED + - 100 uF capacitor + + created 18 Sep 2012 by Scott Fitzgerald Thanks to Federico Vanzati for improvements http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ // import the library diff --git a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino index 2c4196ce284..4cb999b46b3 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino @@ -6,21 +6,21 @@ Arduino Starter Kit Parts required: - 1 Megohm resistor - metal foil or copper mesh - 220 ohm resistor - LED + - 1 megohm resistor + - metal foil or copper mesh + - 220 ohm resistor + - LED Software required : - CapacitiveSensor library by Paul Badger - http://www.arduino.cc/playground/Main/CapacitiveSensor + - CapacitiveSensor library by Paul Badger + http://www.arduino.cc/playground/Main/CapacitiveSensor - Created 18 September 2012 + created 18 Sep 2012 by Scott Fitzgerald http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ // import the library (must be located in the diff --git a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino index 4949875f73f..83e9a78f22b 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino @@ -6,18 +6,18 @@ Arduino Starter Kit Parts required: - 10 kilohm potentiometer + - 10 kilohm potentiometer - Software required : - Processing (3.0 or newer) http://processing.org - Active Internet connection + Software required: + - Processing (3.0 or newer) http://processing.org + - Active Internet connection - Created 18 September 2012 + created 18 Sep 2012 by Scott Fitzgerald http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ @@ -36,7 +36,7 @@ void loop() { /* Processing code for this example // Tweak the Arduino Logo // by Scott Fitzgerald - // This example code is in the public domain + // This example code is in the public domain. // import the serial library import processing.serial.*; diff --git a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino index 3ec039b4ff7..8b812f41399 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino @@ -6,16 +6,16 @@ Arduino Starter Kit Parts required: - battery powered component - 220 ohm resistor - 4N35 optocoupler + - battery powered component + - 220 ohm resistor + - 4N35 optocoupler - Created 18 September 2012 + created 18 Sep 2012 by Scott Fitzgerald http://www.arduino.cc/starterKit - This example code is part of the public domain + This example code is part of the public domain. */ const int optoPin = 2; // the pin the optocoupler is connected to diff --git a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino index 4180a963b7d..b695b512585 100644 --- a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino +++ b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino @@ -1,7 +1,7 @@ // ArduinoISP // Copyright (c) 2008-2011 Randall Bohn // If you require a license, see -// http://www.opensource.org/licenses/bsd-license.php +// http://www.opensource.org/licenses/bsd-license.php // // This sketch turns the Arduino into a AVRISP // using the following Arduino pins: From 93d763651ccd31f5e6e7e55cd8ccafd4a0ab2147 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 13 Jul 2017 01:01:49 -0700 Subject: [PATCH 08/11] Use a consistent number of spaces after punctuation in the comments of the built-in examples --- .../02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino | 2 +- build/shared/examples/02.Digital/Debounce/Debounce.ino | 4 ++-- .../StateChangeDetection/StateChangeDetection.ino | 4 ++-- .../03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino | 2 +- .../03.Analog/AnalogWriteMega/AnalogWriteMega.ino | 2 +- .../examples/03.Analog/Calibration/Calibration.ino | 2 +- .../shared/examples/03.Analog/Smoothing/Smoothing.ino | 6 +++--- .../04.Communication/ASCIITable/ASCIITable.ino | 4 ++-- .../shared/examples/04.Communication/Dimmer/Dimmer.ino | 10 +++++----- build/shared/examples/04.Communication/Graph/Graph.ino | 4 ++-- build/shared/examples/04.Communication/Midi/Midi.ino | 2 +- .../04.Communication/PhysicalPixel/PhysicalPixel.ino | 2 +- .../04.Communication/SerialEvent/SerialEvent.ino | 4 ++-- .../examples/05.Control/switchCase/switchCase.ino | 4 ++-- .../examples/05.Control/switchCase2/switchCase2.ino | 8 ++++---- build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino | 6 +++--- .../examples/06.Sensors/Memsic2125/Memsic2125.ino | 2 +- build/shared/examples/06.Sensors/Ping/Ping.ino | 6 +++--- .../KeyboardAndMouseControl.ino | 4 ++-- .../Mouse/ButtonMouseControl/ButtonMouseControl.ino | 4 ++-- .../JoystickMouseControl/JoystickMouseControl.ino | 4 ++-- 21 files changed, 43 insertions(+), 43 deletions(-) diff --git a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino index 22607d8f768..63151027be9 100644 --- a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino +++ b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino @@ -2,7 +2,7 @@ Blink without Delay Turns on and off a light emitting diode (LED) connected to a digital - pin, without using the delay() function. This means that other code + pin, without using the delay() function. This means that other code can run at the same time without being interrupted by the LED code. The circuit: diff --git a/build/shared/examples/02.Digital/Debounce/Debounce.ino b/build/shared/examples/02.Digital/Debounce/Debounce.ino index e21410cd165..875ec1d4705 100644 --- a/build/shared/examples/02.Digital/Debounce/Debounce.ino +++ b/build/shared/examples/02.Digital/Debounce/Debounce.ino @@ -2,7 +2,7 @@ Debounce Each time the input pin goes from LOW to HIGH (e.g. because of a push-button - press), the output pin is toggled from LOW to HIGH or HIGH to LOW. There's + press), the output pin is toggled from LOW to HIGH or HIGH to LOW. There's a minimum delay between toggles to debounce the circuit (i.e. to ignore noise). @@ -83,7 +83,7 @@ void loop() { // set the LED: digitalWrite(ledPin, ledState); - // save the reading. Next time through the loop, + // save the reading. Next time through the loop, // it'll be the lastButtonState: lastButtonState = reading; } diff --git a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino index ba47e8b616d..450896f711b 100644 --- a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino +++ b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino @@ -3,7 +3,7 @@ Often, you don't need to know the state of a digital input all the time, but you just need to know when the input changes from one state to another. - For example, you want to know when a button goes from OFF to ON. This is called + For example, you want to know when a button goes from OFF to ON. This is called state change detection, or edge detection. This example shows how to detect when a button or button changes from off to on @@ -55,7 +55,7 @@ void loop() { // went from off to on: buttonPushCounter++; Serial.println("on"); - Serial.print("number of button pushes: "); + Serial.print("number of button pushes: "); Serial.println(buttonPushCounter); } else { // if the current state is LOW then the button diff --git a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino index f78b05d23a0..be925c437a5 100644 --- a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino +++ b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino @@ -20,7 +20,7 @@ http://www.arduino.cc/en/Tutorial/AnalogInOutSerial */ -// These constants won't change. They're used to give names +// These constants won't change. They're used to give names // to the pins used: const int analogInPin = A0; // Analog input pin that the potentiometer is attached to const int analogOutPin = 9; // Analog output pin that the LED is attached to diff --git a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino index decdb589e27..a0d2eb7384a 100644 --- a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino +++ b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino @@ -15,7 +15,7 @@ http://www.arduino.cc/en/Tutorial/AnalogWriteMega */ -// These constants won't change. They're used to give names +// These constants won't change. They're used to give names // to the pins used: const int lowestPin = 2; const int highestPin = 13; diff --git a/build/shared/examples/03.Analog/Calibration/Calibration.ino b/build/shared/examples/03.Analog/Calibration/Calibration.ino index 1e1ff7befca..82fb8cd56e9 100644 --- a/build/shared/examples/03.Analog/Calibration/Calibration.ino +++ b/build/shared/examples/03.Analog/Calibration/Calibration.ino @@ -1,7 +1,7 @@ /* Calibration - Demonstrates one technique for calibrating sensor input. The + Demonstrates one technique for calibrating sensor input. The sensor readings during the first five seconds of the sketch execution define the minimum and maximum of expected values attached to the sensor pin. diff --git a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino index 077976e0f1c..dce81524a4d 100644 --- a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino +++ b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino @@ -2,7 +2,7 @@ Smoothing Reads repeatedly from an analog input, calculating a running average - and printing it to the computer. Keeps ten readings in an array and + and printing it to the computer. Keeps ten readings in an array and continually averages them. The circuit: @@ -18,9 +18,9 @@ http://www.arduino.cc/en/Tutorial/Smoothing */ -// Define the number of samples to keep track of. The higher the number, +// Define the number of samples to keep track of. The higher the number, // the more the readings will be smoothed, but the slower the output will -// respond to the input. Using a constant rather than a normal variable lets +// respond to the input. Using a constant rather than a normal variable lets // us use this value to determine the size of the readings array. const int numReadings = 10; diff --git a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino index 3ded18b7d20..6522d7b0050 100644 --- a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino +++ b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino @@ -7,7 +7,7 @@ For more on ASCII, see http://www.asciitable.com and http://en.wikipedia.org/wiki/ASCII - The circuit: No external hardware needed. + The circuit: No external hardware needed. created 2006 by Nicholas Zambetti @@ -39,7 +39,7 @@ int thisByte = 33; void loop() { // prints value unaltered, i.e. the raw binary version of the // byte. The Serial Monitor interprets all bytes as - // ASCII, so 33, the first number, will show up as '!' + // ASCII, so 33, the first number, will show up as '!' Serial.write(thisByte); Serial.print(", dec: "); diff --git a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino index d2e0a57e971..f3265ce363a 100644 --- a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino +++ b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino @@ -2,8 +2,8 @@ Dimmer Demonstrates sending data from the computer to the Arduino board, - in this case to control the brightness of an LED. The data is sent - in individual bytes, each of which ranges from 0 to 255. Arduino + in this case to control the brightness of an LED. The data is sent + in individual bytes, each of which ranges from 0 to 255. Arduino reads these bytes and uses them to set the brightness of the LED. The circuit: @@ -56,9 +56,9 @@ void loop() { // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); - // Uses the first port in this list (number 0). Change this to - // select the port corresponding to your Arduino board. The last - // parameter (e.g. 9600) is the speed of the communication. It + // Uses the first port in this list (number 0). Change this to + // select the port corresponding to your Arduino board. The last + // parameter (e.g. 9600) is the speed of the communication. It // has to correspond to the value passed to Serial.begin() in your // Arduino sketch. port = new Serial(this, Serial.list()[0], 9600); diff --git a/build/shared/examples/04.Communication/Graph/Graph.ino b/build/shared/examples/04.Communication/Graph/Graph.ino index d6535ffef7d..13e6c6a72b2 100644 --- a/build/shared/examples/04.Communication/Graph/Graph.ino +++ b/build/shared/examples/04.Communication/Graph/Graph.ino @@ -2,7 +2,7 @@ Graph A simple example of communication from the Arduino board to the computer: - the value of analog input 0 is sent out the serial port. We call this "serial" + the value of analog input 0 is sent out the serial port. We call this "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. Bytes are sent one after another (serially) from the Arduino @@ -10,7 +10,7 @@ You can use the Arduino Serial Monitor to view the sent data, or it can be read by Processing, PD, Max/MSP, or any other program capable of reading - data from a serial port. The Processing code below graphs the data received + data from a serial port. The Processing code below graphs the data received so you can see the value of the analog input changing over time. The circuit: diff --git a/build/shared/examples/04.Communication/Midi/Midi.ino b/build/shared/examples/04.Communication/Midi/Midi.ino index b55553c9aeb..1be5b7d7ea2 100644 --- a/build/shared/examples/04.Communication/Midi/Midi.ino +++ b/build/shared/examples/04.Communication/Midi/Midi.ino @@ -37,7 +37,7 @@ void loop() { } } -// plays a MIDI note. Doesn't check to see that +// plays a MIDI note. Doesn't check to see that // cmd is greater than 127, or that data values are less than 127: void noteOn(int cmd, int pitch, int velocity) { Serial.write(cmd); diff --git a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino index ed756307a3c..a64376d22b2 100644 --- a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino +++ b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino @@ -2,7 +2,7 @@ Physical Pixel An example of using the Arduino board to receive data from the - computer. In this case, the Arduino boards turns on an LED when + computer. In this case, the Arduino boards turns on an LED when it receives the character 'H', and turns off the LED when it receives the character 'L'. diff --git a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino index 5105a108dd4..4d5bb85c805 100644 --- a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino +++ b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino @@ -41,9 +41,9 @@ void loop() { /* SerialEvent occurs whenever a new data comes in the - hardware serial RX. This routine is run between each + hardware serial RX. This routine is run between each time loop() runs, so using delay inside loop can delay - response. Multiple bytes of data may be available. + response. Multiple bytes of data may be available. */ void serialEvent() { while (Serial.available()) { diff --git a/build/shared/examples/05.Control/switchCase/switchCase.ino b/build/shared/examples/05.Control/switchCase/switchCase.ino index b7f82dcb549..54908a59b24 100644 --- a/build/shared/examples/05.Control/switchCase/switchCase.ino +++ b/build/shared/examples/05.Control/switchCase/switchCase.ino @@ -1,9 +1,9 @@ /* Switch statement - Demonstrates the use of a switch statement. The switch + Demonstrates the use of a switch statement. The switch statement allows you to choose from among a set of discrete values - of a variable. It's like a series of if statements. + of a variable. It's like a series of if statements. To see this sketch in action, put the board and sensor in a well-lit room, open the Serial Monitor, and move your hand gradually down diff --git a/build/shared/examples/05.Control/switchCase2/switchCase2.ino b/build/shared/examples/05.Control/switchCase2/switchCase2.ino index 6c8c52db9ad..dbc74b082c3 100644 --- a/build/shared/examples/05.Control/switchCase2/switchCase2.ino +++ b/build/shared/examples/05.Control/switchCase2/switchCase2.ino @@ -1,12 +1,12 @@ /* Switch statement with serial input - Demonstrates the use of a switch statement. The switch + Demonstrates the use of a switch statement. The switch statement allows you to choose from among a set of discrete values - of a variable. It's like a series of if statements. + of a variable. It's like a series of if statements. To see this sketch in action, open the Serial monitor and send any character. - The characters a, b, c, d, and e, will turn on LEDs. Any other character will turn + The characters a, b, c, d, and e, will turn on LEDs. Any other character will turn the LEDs off. The circuit: @@ -36,7 +36,7 @@ void loop() { // do something different depending on the character received. // The switch statement expects single number values for each case; // in this example, though, you're using single quotes to tell - // the controller to get the ASCII value for the character. For + // the controller to get the ASCII value for the character. For // example 'a' = 97, 'b' = 98, and so forth: switch (inByte) { diff --git a/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino b/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino index 443861a8b7b..bee93c1440b 100644 --- a/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino +++ b/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino @@ -2,7 +2,7 @@ ADXL3xx Reads an Analog Devices ADXL3xx accelerometer and communicates the - acceleration to the computer. The pins used are designed to be easily + acceleration to the computer. The pins used are designed to be easily compatible with the breakout boards from SparkFun, available from: http://www.sparkfun.com/commerce/categories.php?c=80 @@ -36,8 +36,8 @@ void setup() { Serial.begin(9600); // Provide ground and power by using the analog inputs as normal - // digital pins. This makes it possible to directly connect the - // breakout board to the Arduino. If you use the normal 5V and + // digital pins. This makes it possible to directly connect the + // breakout board to the Arduino. If you use the normal 5V and // GND pins on the Arduino, you can remove these lines. pinMode(groundpin, OUTPUT); pinMode(powerpin, OUTPUT); diff --git a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino index d8daae78d79..6b72836e452 100644 --- a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino +++ b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino @@ -1,7 +1,7 @@ /* Memsic2125 - Read the Memsic 2125 two-axis accelerometer. Converts the + Read the Memsic 2125 two-axis accelerometer. Converts the pulses output by the 2125 into milli-g's (1/1000 of Earth's gravity) and prints them over the serial connection to the computer. diff --git a/build/shared/examples/06.Sensors/Ping/Ping.ino b/build/shared/examples/06.Sensors/Ping/Ping.ino index 235d5e33f48..da8fc0778a1 100644 --- a/build/shared/examples/06.Sensors/Ping/Ping.ino +++ b/build/shared/examples/06.Sensors/Ping/Ping.ino @@ -4,7 +4,7 @@ This sketch reads a PING))) ultrasonic rangefinder and returns the distance to the closest object in range. To do this, it sends a pulse to the sensor to initiate a reading, then listens for a pulse - to return. The length of the returning pulse is proportional to + to return. The length of the returning pulse is proportional to the distance of the object from the sensor. The circuit: @@ -22,7 +22,7 @@ http://www.arduino.cc/en/Tutorial/Ping */ -// this constant won't change. It's the pin number +// this constant won't change. It's the pin number // of the sensor's output: const int pingPin = 7; @@ -67,7 +67,7 @@ void loop() { long microsecondsToInches(long microseconds) { // According to Parallax's datasheet for the PING))), there are // 73.746 microseconds per inch (i.e. sound travels at 1130 feet per - // second). This gives the distance travelled by the ping, outbound + // second). This gives the distance travelled by the ping, outbound // and return, so we divide by 2 to get the distance of the obstacle. // See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf return microseconds / 74 / 2; diff --git a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino index ab5d78b56f7..a8b6125f8c8 100644 --- a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino +++ b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino @@ -9,8 +9,8 @@ The mouse movement is always relative. This sketch reads four pushbuttons, and uses them to set the movement of the mouse. - WARNING: When you use the Mouse.move() command, the Arduino takes - over your mouse! Make sure you have control before you use the mouse commands. + WARNING: When you use the Mouse.move() command, the Arduino takes + over your mouse! Make sure you have control before you use the mouse commands. created 15 Mar 2012 modified 27 Mar 2012 diff --git a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino index 14e68a78d0f..d68b06f402c 100644 --- a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino @@ -11,8 +11,8 @@ The mouse movement is always relative. This sketch reads four pushbuttons, and uses them to set the movement of the mouse. - WARNING: When you use the Mouse.move() command, the Arduino takes - over your mouse! Make sure you have control before you use the mouse commands. + WARNING: When you use the Mouse.move() command, the Arduino takes + over your mouse! Make sure you have control before you use the mouse commands. created 15 Mar 2012 modified 27 Mar 2012 diff --git a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino index 4539fa05641..72fa47b81c6 100644 --- a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino @@ -15,8 +15,8 @@ The sketch assumes that the joystick resting values are around the middle of the range, but that they vary within a threshold. - WARNING: When you use the Mouse.move() command, the Arduino takes - over your mouse! Make sure you have control before you use the command. + WARNING: When you use the Mouse.move() command, the Arduino takes + over your mouse! Make sure you have control before you use the command. This sketch includes a pushbutton to toggle the mouse control state, so you can turn on and off mouse control. From de0caf1ccf0681bb6750776acb838575f974eb21 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 14 Jul 2017 12:34:00 -0700 Subject: [PATCH 09/11] Use consistent line wrapping in built-in example comments --- .../shared/examples/01.Basics/Blink/Blink.ino | 5 +- build/shared/examples/01.Basics/Fade/Fade.ino | 14 ++--- .../BlinkWithoutDelay/BlinkWithoutDelay.ino | 24 ++++---- .../examples/02.Digital/Button/Button.ino | 10 ++-- .../examples/02.Digital/Debounce/Debounce.ino | 27 ++++----- .../DigitalInputPullup/DigitalInputPullup.ino | 13 ++--- .../StateChangeDetection.ino | 24 ++++---- .../02.Digital/toneMelody/toneMelody.ino | 3 +- .../tonePitchFollower/tonePitchFollower.ino | 4 +- .../AnalogInOutSerial/AnalogInOutSerial.ino | 12 ++-- .../03.Analog/AnalogInput/AnalogInput.ino | 8 +-- .../AnalogWriteMega/AnalogWriteMega.ino | 3 +- .../03.Analog/Calibration/Calibration.ino | 17 +++--- .../03.Analog/Smoothing/Smoothing.ino | 14 ++--- .../ASCIITable/ASCIITable.ino | 9 ++- .../04.Communication/Dimmer/Dimmer.ino | 21 ++++--- .../examples/04.Communication/Graph/Graph.ino | 31 +++++----- .../examples/04.Communication/Midi/Midi.ino | 8 +-- .../PhysicalPixel/PhysicalPixel.ino | 23 ++++---- .../ReadASCIIString/ReadASCIIString.ino | 3 +- .../SerialCallResponse/SerialCallResponse.ino | 14 ++--- .../SerialCallResponseASCII.ino | 25 ++++---- .../SerialEvent/SerialEvent.ino | 22 ++++--- .../SerialPassthrough/SerialPassthrough.ino | 27 +++++---- .../VirtualColorMixer/VirtualColorMixer.ino | 19 +++---- .../examples/05.Control/Arrays/Arrays.ino | 9 ++- .../IfStatementConditional.ino | 8 +-- .../WhileStatementConditional.ino | 4 +- .../05.Control/switchCase/switchCase.ino | 18 +++--- .../05.Control/switchCase2/switchCase2.ino | 18 +++--- .../examples/06.Sensors/ADXL3xx/ADXL3xx.ino | 8 +-- .../examples/06.Sensors/Knock/Knock.ino | 4 +- .../06.Sensors/Memsic2125/Memsic2125.ino | 10 ++-- .../shared/examples/06.Sensors/Ping/Ping.ino | 34 ++++++----- .../RowColumnScanning/RowColumnScanning.ino | 14 ++--- .../examples/07.Display/barGraph/barGraph.ino | 10 ++-- .../StringComparisonOperators.ino | 4 +- .../StringIndexOf/StringIndexOf.ino | 4 +- .../08.Strings/StringToInt/StringToInt.ino | 10 ++-- .../KeyboardLogout/KeyboardLogout.ino | 3 +- .../KeyboardReprogram/KeyboardReprogram.ino | 18 +++--- .../KeyboardSerial/KeyboardSerial.ino | 4 +- .../KeyboardAndMouseControl.ino | 8 +-- .../ButtonMouseControl/ButtonMouseControl.ino | 8 +-- .../JoystickMouseControl.ino | 29 +++++----- .../p02_SpaceshipInterface.ino | 20 +++---- .../p03_LoveOMeter/p03_LoveOMeter.ino | 9 +-- .../p04_ColorMixingLamp.ino | 11 ++-- .../p05_ServoMoodIndicator.ino | 3 +- .../p06_LightTheremin/p06_LightTheremin.ino | 3 +- .../p07_Keyboard/p07_Keyboard.ino | 6 +- .../p08_DigitalHourglass.ino | 3 +- .../p09_MotorizedPinwheel.ino | 3 +- .../p10_Zoetrope/p10_Zoetrope.ino | 11 ++-- .../p11_CrystalBall/p11_CrystalBall.ino | 8 +-- .../p12_KnockLock/p12_KnockLock.ino | 10 ++-- .../p13_TouchSensorLamp.ino | 6 +- .../p14_TweakTheArduinoLogo.ino | 30 +++++----- .../p15_HackingButtons/p15_HackingButtons.ino | 3 +- .../11.ArduinoISP/ArduinoISP/ArduinoISP.ino | 57 +++++++++---------- 60 files changed, 354 insertions(+), 434 deletions(-) diff --git a/build/shared/examples/01.Basics/Blink/Blink.ino b/build/shared/examples/01.Basics/Blink/Blink.ino index aa12be61782..b7377254259 100644 --- a/build/shared/examples/01.Basics/Blink/Blink.ino +++ b/build/shared/examples/01.Basics/Blink/Blink.ino @@ -6,8 +6,9 @@ Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used. - If you want to know what pin the on-board LED is connected to on your Arduino model, check - the Technical Specs of your board at https://www.arduino.cc/en/Main/Products + If you want to know what pin the on-board LED is connected to on your Arduino + model, check the Technical Specs of your board at: + https://www.arduino.cc/en/Main/Products modified 8 May 2014 by Scott Fitzgerald diff --git a/build/shared/examples/01.Basics/Fade/Fade.ino b/build/shared/examples/01.Basics/Fade/Fade.ino index e92a69f9ad1..744dc427799 100644 --- a/build/shared/examples/01.Basics/Fade/Fade.ino +++ b/build/shared/examples/01.Basics/Fade/Fade.ino @@ -1,14 +1,12 @@ /* Fade - This example shows how to fade an LED on pin 9 - using the analogWrite() function. - - The analogWrite() function uses PWM, so if - you want to change the pin you're using, be - sure to use another PWM capable pin. On most - Arduino, the PWM pins are identified with - a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11. + This example shows how to fade an LED on pin 9 using the analogWrite() + function. + + The analogWrite() function uses PWM, so if you want to change the pin you're + using, be sure to use another PWM capable pin. On most Arduino, the PWM pins + are identified with a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11. This example code is in the public domain. diff --git a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino index 63151027be9..c96f3baed3b 100644 --- a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino +++ b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino @@ -1,17 +1,18 @@ /* Blink without Delay - Turns on and off a light emitting diode (LED) connected to a digital - pin, without using the delay() function. This means that other code - can run at the same time without being interrupted by the LED code. + Turns on and off a light emitting diode (LED) connected to a digital pin, + without using the delay() function. This means that other code can run at the + same time without being interrupted by the LED code. The circuit: - Use the onboard LED. - - Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO - it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to - the correct LED pin independent of which board is used. - If you want to know what pin the on-board LED is connected to on your Arduino model, check - the Technical Specs of your board at https://www.arduino.cc/en/Main/Products + - Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA + and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN + is set to the correct LED pin independent of which board is used. + If you want to know what pin the on-board LED is connected to on your + Arduino model, check the Technical Specs of your board at: + https://www.arduino.cc/en/Main/Products created 2005 by David A. Mellis @@ -48,10 +49,9 @@ void setup() { void loop() { // here is where you'd put code that needs to be running all the time. - // check to see if it's time to blink the LED; that is, if the - // difference between the current time and last time you blinked - // the LED is bigger than the interval at which you want to - // blink the LED. + // check to see if it's time to blink the LED; that is, if the difference + // between the current time and last time you blinked the LED is bigger than + // the interval at which you want to blink the LED. unsigned long currentMillis = millis(); if (currentMillis - previousMillis >= interval) { diff --git a/build/shared/examples/02.Digital/Button/Button.ino b/build/shared/examples/02.Digital/Button/Button.ino index 955013f1584..06cb3518996 100644 --- a/build/shared/examples/02.Digital/Button/Button.ino +++ b/build/shared/examples/02.Digital/Button/Button.ino @@ -1,8 +1,8 @@ /* Button - Turns on and off a light emitting diode(LED) connected to digital - pin 13, when pressing a pushbutton attached to pin 2. + Turns on and off a light emitting diode(LED) connected to digital pin 13, + when pressing a pushbutton attached to pin 2. The circuit: - LED attached from pin 13 to ground @@ -22,8 +22,7 @@ http://www.arduino.cc/en/Tutorial/Button */ -// constants won't change. They're used here to -// set pin numbers: +// constants won't change. They're used here to set pin numbers: const int buttonPin = 2; // the number of the pushbutton pin const int ledPin = 13; // the number of the LED pin @@ -41,8 +40,7 @@ void loop() { // read the state of the pushbutton value: buttonState = digitalRead(buttonPin); - // check if the pushbutton is pressed. - // if it is, the buttonState is HIGH: + // check if the pushbutton is pressed. If it is, the buttonState is HIGH: if (buttonState == HIGH) { // turn LED on: digitalWrite(ledPin, HIGH); diff --git a/build/shared/examples/02.Digital/Debounce/Debounce.ino b/build/shared/examples/02.Digital/Debounce/Debounce.ino index 875ec1d4705..d5d48c91876 100644 --- a/build/shared/examples/02.Digital/Debounce/Debounce.ino +++ b/build/shared/examples/02.Digital/Debounce/Debounce.ino @@ -2,17 +2,16 @@ Debounce Each time the input pin goes from LOW to HIGH (e.g. because of a push-button - press), the output pin is toggled from LOW to HIGH or HIGH to LOW. There's - a minimum delay between toggles to debounce the circuit (i.e. to ignore - noise). + press), the output pin is toggled from LOW to HIGH or HIGH to LOW. There's a + minimum delay between toggles to debounce the circuit (i.e. to ignore noise). The circuit: - LED attached from pin 13 to ground - pushbutton attached from pin 2 to +5V - 10 kilohm resistor attached from pin 2 to ground - - Note: On most Arduino boards, there is already an LED on the board - connected to pin 13, so you don't need any extra components for this example. + - Note: On most Arduino boards, there is already an LED on the board connected + to pin 13, so you don't need any extra components for this example. created 21 Nov 2006 by David A. Mellis @@ -28,8 +27,7 @@ http://www.arduino.cc/en/Tutorial/Debounce */ -// constants won't change. They're used here to -// set pin numbers: +// constants won't change. They're used here to set pin numbers: const int buttonPin = 2; // the number of the pushbutton pin const int ledPin = 13; // the number of the LED pin @@ -38,8 +36,8 @@ int ledState = HIGH; // the current state of the output pin int buttonState; // the current reading from the input pin int lastButtonState = LOW; // the previous reading from the input pin -// the following variables are unsigned longs because the time, measured in milliseconds, -// will quickly become a bigger number than can be stored in an int. +// the following variables are unsigned longs because the time, measured in +// milliseconds, will quickly become a bigger number than can be stored in an int. unsigned long lastDebounceTime = 0; // the last time the output pin was toggled unsigned long debounceDelay = 50; // the debounce time; increase if the output flickers @@ -56,8 +54,8 @@ void loop() { int reading = digitalRead(buttonPin); // check to see if you just pressed the button - // (i.e. the input went from LOW to HIGH), and you've waited - // long enough since the last press to ignore any noise: + // (i.e. the input went from LOW to HIGH), and you've waited long enough + // since the last press to ignore any noise: // If the switch changed, due to noise or pressing: if (reading != lastButtonState) { @@ -66,8 +64,8 @@ void loop() { } if ((millis() - lastDebounceTime) > debounceDelay) { - // whatever the reading is at, it's been there for longer - // than the debounce delay, so take it as the actual current state: + // whatever the reading is at, it's been there for longer than the debounce + // delay, so take it as the actual current state: // if the button state has changed: if (reading != buttonState) { @@ -83,7 +81,6 @@ void loop() { // set the LED: digitalWrite(ledPin, ledState); - // save the reading. Next time through the loop, - // it'll be the lastButtonState: + // save the reading. Next time through the loop, it'll be the lastButtonState: lastButtonState = reading; } diff --git a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino index 8fc945db32c..dc641ac71fa 100644 --- a/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino +++ b/build/shared/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino @@ -1,16 +1,16 @@ /* Input Pull-up Serial - This example demonstrates the use of pinMode(INPUT_PULLUP). It reads a - digital input on pin 2 and prints the results to the Serial Monitor. + This example demonstrates the use of pinMode(INPUT_PULLUP). It reads a digital + input on pin 2 and prints the results to the Serial Monitor. The circuit: - momentary switch attached from pin 2 to ground - built-in LED on pin 13 Unlike pinMode(INPUT), there is no pull-down resistor necessary. An internal - 20K-ohm resistor is pulled to 5V. This configuration causes the input to - read HIGH when the switch is open, and LOW when it is closed. + 20K-ohm resistor is pulled to 5V. This configuration causes the input to read + HIGH when the switch is open, and LOW when it is closed. created 14 Mar 2012 by Scott Fitzgerald @@ -35,9 +35,8 @@ void loop() { //print out the value of the pushbutton Serial.println(sensorVal); - // Keep in mind the pull-up means the pushbutton's - // logic is inverted. It goes HIGH when it's open, - // and LOW when it's pressed. Turn on pin 13 when the + // Keep in mind the pull-up means the pushbutton's logic is inverted. It goes + // HIGH when it's open, and LOW when it's pressed. Turn on pin 13 when the // button's pressed, and off when it's not: if (sensorVal == HIGH) { digitalWrite(13, LOW); diff --git a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino index 450896f711b..a5ba8dab278 100644 --- a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino +++ b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino @@ -1,8 +1,8 @@ /* State change detection (edge detection) - Often, you don't need to know the state of a digital input all the time, - but you just need to know when the input changes from one state to another. + Often, you don't need to know the state of a digital input all the time, but + you just need to know when the input changes from one state to another. For example, you want to know when a button goes from OFF to ON. This is called state change detection, or edge detection. @@ -12,8 +12,8 @@ The circuit: - pushbutton attached to pin 2 from +5V - 10 kilohm resistor attached to pin 2 from ground - - LED attached from pin 13 to ground (or use the built-in LED on - most Arduino boards) + - LED attached from pin 13 to ground (or use the built-in LED on most + Arduino boards) created 27 Sep 2005 modified 30 Aug 2011 @@ -51,29 +51,25 @@ void loop() { if (buttonState != lastButtonState) { // if the state has changed, increment the counter if (buttonState == HIGH) { - // if the current state is HIGH then the button - // went from off to on: + // if the current state is HIGH then the button went from off to on: buttonPushCounter++; Serial.println("on"); Serial.print("number of button pushes: "); Serial.println(buttonPushCounter); } else { - // if the current state is LOW then the button - // went from on to off: + // if the current state is LOW then the button went from on to off: Serial.println("off"); } // Delay a little bit to avoid bouncing delay(50); } - // save the current state as the last state, - // for next time through the loop + // save the current state as the last state, for next time through the loop lastButtonState = buttonState; - // turns on the LED every four button pushes by - // checking the modulo of the button push counter. - // the modulo function gives you the remainder of - // the division of two numbers: + // turns on the LED every four button pushes by checking the modulo of the + // button push counter. the modulo function gives you the remainder of the + // division of two numbers: if (buttonPushCounter % 4 == 0) { digitalWrite(ledPin, HIGH); } else { diff --git a/build/shared/examples/02.Digital/toneMelody/toneMelody.ino b/build/shared/examples/02.Digital/toneMelody/toneMelody.ino index e8b3371e981..8cc1b53d071 100644 --- a/build/shared/examples/02.Digital/toneMelody/toneMelody.ino +++ b/build/shared/examples/02.Digital/toneMelody/toneMelody.ino @@ -31,8 +31,7 @@ void setup() { // iterate over the notes of the melody: for (int thisNote = 0; thisNote < 8; thisNote++) { - // to calculate the note duration, take one second - // divided by the note type. + // to calculate the note duration, take one second divided by the note type. //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc. int noteDuration = 1000 / noteDurations[thisNote]; tone(8, melody[thisNote], noteDuration); diff --git a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino index 29ef4a83b08..c8d85679cee 100644 --- a/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino +++ b/build/shared/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino @@ -29,8 +29,8 @@ void loop() { Serial.println(sensorReading); // map the analog input range (in this case, 400 - 1000 from the photoresistor) // to the output pitch range (120 - 1500Hz) - // change the minimum and maximum input numbers below - // depending on the range your sensor's giving: + // change the minimum and maximum input numbers below depending on the range + // your sensor's giving: int thisPitch = map(sensorReading, 400, 1000, 120, 1500); // play the pitch: diff --git a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino index be925c437a5..6675a8c88c1 100644 --- a/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino +++ b/build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino @@ -1,8 +1,8 @@ /* Analog input, analog output, serial output - Reads an analog input pin, maps the result to a range from 0 to 255 - and uses the result to set the pulse width modulation (PWM) of an output pin. + Reads an analog input pin, maps the result to a range from 0 to 255 and uses + the result to set the pulse width modulation (PWM) of an output pin. Also prints the results to the Serial Monitor. The circuit: @@ -20,8 +20,7 @@ http://www.arduino.cc/en/Tutorial/AnalogInOutSerial */ -// These constants won't change. They're used to give names -// to the pins used: +// These constants won't change. They're used to give names to the pins used: const int analogInPin = A0; // Analog input pin that the potentiometer is attached to const int analogOutPin = 9; // Analog output pin that the LED is attached to @@ -47,8 +46,7 @@ void loop() { Serial.print("\t output = "); Serial.println(outputValue); - // wait 2 milliseconds before the next loop - // for the analog-to-digital converter to settle - // after the last reading: + // wait 2 milliseconds before the next loop for the analog-to-digital + // converter to settle after the last reading: delay(2); } diff --git a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino index 4dfcbe4d814..13e7b522026 100644 --- a/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino +++ b/build/shared/examples/03.Analog/AnalogInput/AnalogInput.ino @@ -3,8 +3,8 @@ Demonstrates analog input by reading an analog sensor on analog pin 0 and turning on and off a light emitting diode(LED) connected to digital pin 13. - The amount of time the LED will be on and off depends on - the value obtained by analogRead(). + The amount of time the LED will be on and off depends on the value obtained + by analogRead(). The circuit: - potentiometer @@ -15,8 +15,8 @@ anode (long leg) attached to digital output 13 cathode (short leg) attached to ground - - Note: because most Arduinos have a built-in LED attached - to pin 13 on the board, the LED is optional. + - Note: because most Arduinos have a built-in LED attached to pin 13 on the + board, the LED is optional. created by David Cuartielles modified 30 Aug 2011 diff --git a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino index a0d2eb7384a..37a62a1fac4 100644 --- a/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino +++ b/build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino @@ -15,8 +15,7 @@ http://www.arduino.cc/en/Tutorial/AnalogWriteMega */ -// These constants won't change. They're used to give names -// to the pins used: +// These constants won't change. They're used to give names to the pins used: const int lowestPin = 2; const int highestPin = 13; diff --git a/build/shared/examples/03.Analog/Calibration/Calibration.ino b/build/shared/examples/03.Analog/Calibration/Calibration.ino index 82fb8cd56e9..5c0fc6dfa40 100644 --- a/build/shared/examples/03.Analog/Calibration/Calibration.ino +++ b/build/shared/examples/03.Analog/Calibration/Calibration.ino @@ -1,15 +1,14 @@ /* Calibration - Demonstrates one technique for calibrating sensor input. The - sensor readings during the first five seconds of the sketch - execution define the minimum and maximum of expected values - attached to the sensor pin. - - The sensor minimum and maximum initial values may seem backwards. - Initially, you set the minimum high and listen for anything - lower, saving it as the new minimum. Likewise, you set the - maximum low and listen for anything higher as the new maximum. + Demonstrates one technique for calibrating sensor input. The sensor readings + during the first five seconds of the sketch execution define the minimum and + maximum of expected values attached to the sensor pin. + + The sensor minimum and maximum initial values may seem backwards. Initially, + you set the minimum high and listen for anything lower, saving it as the new + minimum. Likewise, you set the maximum low and listen for anything higher as + the new maximum. The circuit: - analog sensor (potentiometer will do) attached to analog input 0 diff --git a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino index dce81524a4d..5df0d055446 100644 --- a/build/shared/examples/03.Analog/Smoothing/Smoothing.ino +++ b/build/shared/examples/03.Analog/Smoothing/Smoothing.ino @@ -1,9 +1,9 @@ /* Smoothing - Reads repeatedly from an analog input, calculating a running average - and printing it to the computer. Keeps ten readings in an array and - continually averages them. + Reads repeatedly from an analog input, calculating a running average and + printing it to the computer. Keeps ten readings in an array and continually + averages them. The circuit: - analog sensor (potentiometer will do) attached to analog input 0 @@ -18,10 +18,10 @@ http://www.arduino.cc/en/Tutorial/Smoothing */ -// Define the number of samples to keep track of. The higher the number, -// the more the readings will be smoothed, but the slower the output will -// respond to the input. Using a constant rather than a normal variable lets -// us use this value to determine the size of the readings array. +// Define the number of samples to keep track of. The higher the number, the +// more the readings will be smoothed, but the slower the output will respond to +// the input. Using a constant rather than a normal variable lets us use this +// value to determine the size of the readings array. const int numReadings = 10; int readings[numReadings]; // the readings from the analog input diff --git a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino index 6522d7b0050..7cf55d03ebe 100644 --- a/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino +++ b/build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino @@ -37,9 +37,9 @@ int thisByte = 33; // int thisByte = '!'; void loop() { - // prints value unaltered, i.e. the raw binary version of the - // byte. The Serial Monitor interprets all bytes as - // ASCII, so 33, the first number, will show up as '!' + // prints value unaltered, i.e. the raw binary version of the byte. + // The Serial Monitor interprets all bytes as ASCII, so 33, the first number, + // will show up as '!' Serial.write(thisByte); Serial.print(", dec: "); @@ -62,8 +62,7 @@ void loop() { Serial.print(thisByte, OCT); Serial.print(", bin: "); - // prints value as string in binary (base 2) - // also prints ending line break: + // prints value as string in binary (base 2) also prints ending line break: Serial.println(thisByte, BIN); // if printed last visible character '~' or 126, stop: diff --git a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino index f3265ce363a..3f2c6fc66a8 100644 --- a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino +++ b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino @@ -1,10 +1,10 @@ /* Dimmer - Demonstrates sending data from the computer to the Arduino board, - in this case to control the brightness of an LED. The data is sent - in individual bytes, each of which ranges from 0 to 255. Arduino - reads these bytes and uses them to set the brightness of the LED. + Demonstrates sending data from the computer to the Arduino board, in this case + to control the brightness of an LED. The data is sent in individual bytes, + each of which ranges from 0 to 255. Arduino reads these bytes and uses them to + set the brightness of the LED. The circuit: - LED attached from digital pin 9 to ground. @@ -56,15 +56,14 @@ void loop() { // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); - // Uses the first port in this list (number 0). Change this to - // select the port corresponding to your Arduino board. The last - // parameter (e.g. 9600) is the speed of the communication. It - // has to correspond to the value passed to Serial.begin() in your - // Arduino sketch. + // Uses the first port in this list (number 0). Change this to select the port + // corresponding to your Arduino board. The last parameter (e.g. 9600) is the + // speed of the communication. It has to correspond to the value passed to + // Serial.begin() in your Arduino sketch. port = new Serial(this, Serial.list()[0], 9600); - // If you know the name of the port used by the Arduino board, you - // can specify it directly like this. + // If you know the name of the port used by the Arduino board, you can specify + // it directly like this. //port = new Serial(this, "COM1", 9600); } diff --git a/build/shared/examples/04.Communication/Graph/Graph.ino b/build/shared/examples/04.Communication/Graph/Graph.ino index 13e6c6a72b2..4aaf8d68907 100644 --- a/build/shared/examples/04.Communication/Graph/Graph.ino +++ b/build/shared/examples/04.Communication/Graph/Graph.ino @@ -1,17 +1,16 @@ /* Graph - A simple example of communication from the Arduino board to the computer: - the value of analog input 0 is sent out the serial port. We call this "serial" + A simple example of communication from the Arduino board to the computer: The + value of analog input 0 is sent out the serial port. We call this "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. Bytes are sent one after another (serially) from the Arduino - to the computer. + computer as a serial port, even though it may actually use a USB cable. Bytes + are sent one after another (serially) from the Arduino to the computer. - You can use the Arduino Serial Monitor to view the sent data, or it can - be read by Processing, PD, Max/MSP, or any other program capable of reading - data from a serial port. The Processing code below graphs the data received - so you can see the value of the analog input changing over time. + You can use the Arduino Serial Monitor to view the sent data, or it can be + read by Processing, PD, Max/MSP, or any other program capable of reading data + from a serial port. The Processing code below graphs the data received so you + can see the value of the analog input changing over time. The circuit: - any analog input sensor attached to analog in pin 0 @@ -34,8 +33,8 @@ void setup() { void loop() { // send the value of analog input 0: Serial.println(analogRead(A0)); - // wait a bit for the analog-to-digital converter - // to stabilize after the last reading: + // wait a bit for the analog-to-digital converter to stabilize after the last + // reading: delay(2); } @@ -44,9 +43,9 @@ void loop() { // Graphing sketch - // This program takes ASCII-encoded strings - // from the serial port at 9600 baud and graphs them. It expects values in the - // range 0 to 1023, followed by a newline, or newline and carriage return + // This program takes ASCII-encoded strings from the serial port at 9600 baud + // and graphs them. It expects values in the range 0 to 1023, followed by a + // newline, or newline and carriage return // Created 20 Apr 2005 // Updated 24 Nov 2015 @@ -67,8 +66,8 @@ void loop() { // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); - // I know that the first port in the serial list on my Mac - // is always my Arduino, so I open Serial.list()[0]. + // I know that the first port in the serial list on my Mac is always my + // Arduino, so I open Serial.list()[0]. // Open whatever port is the one you're using. myPort = new Serial(this, Serial.list()[0], 9600); diff --git a/build/shared/examples/04.Communication/Midi/Midi.ino b/build/shared/examples/04.Communication/Midi/Midi.ino index 1be5b7d7ea2..5ef34062cac 100644 --- a/build/shared/examples/04.Communication/Midi/Midi.ino +++ b/build/shared/examples/04.Communication/Midi/Midi.ino @@ -2,8 +2,8 @@ MIDI note player This sketch shows how to use the serial transmit pin (pin 1) to send MIDI note data. - If this circuit is connected to a MIDI synth, it will play - the notes F#-0 (0x1E) to F#-5 (0x5A) in sequence. + If this circuit is connected to a MIDI synth, it will play the notes + F#-0 (0x1E) to F#-5 (0x5A) in sequence. The circuit: - digital in 1 connected to MIDI jack pin 5 @@ -37,8 +37,8 @@ void loop() { } } -// plays a MIDI note. Doesn't check to see that -// cmd is greater than 127, or that data values are less than 127: +// plays a MIDI note. Doesn't check to see that cmd is greater than 127, or that +// data values are less than 127: void noteOn(int cmd, int pitch, int velocity) { Serial.write(cmd); Serial.write(pitch); diff --git a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino index a64376d22b2..16ee3731da7 100644 --- a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino +++ b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino @@ -1,14 +1,12 @@ /* Physical Pixel - An example of using the Arduino board to receive data from the - computer. In this case, the Arduino boards turns on an LED when - it receives the character 'H', and turns off the LED when it - receives the character 'L'. + An example of using the Arduino board to receive data from the computer. In + this case, 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. + 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. The circuit: - LED connected from digital pin 13 to ground @@ -53,9 +51,8 @@ void loop() { // mouse over serial - // Demonstrates how to send data to the Arduino I/O board, in order to - // turn ON a light if the mouse is over a square and turn it off - // if the mouse is not. + // Demonstrates how to send data to the Arduino I/O board, in order to turn ON + // a light if the mouse is over a square and turn it off if the mouse is not. // created 2003-4 // based on examples by Casey Reas and Hernando Barragan @@ -81,9 +78,9 @@ void loop() { rectMode(RADIUS); // List all the available serial ports in the output pane. - // You will need to choose the port that the Arduino board is - // connected to from this list. The first port in the list is - // port #0 and the third port in the list is port #2. + // You will need to choose the port that the Arduino board is connected to + // from this list. The first port in the list is port #0 and the third port + // in the list is port #2. // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); diff --git a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino index e3ff7915565..ab26c282a6d 100644 --- a/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino +++ b/build/shared/examples/04.Communication/ReadASCIIString/ReadASCIIString.ino @@ -45,8 +45,7 @@ void loop() { // do it again: int blue = Serial.parseInt(); - // look for the newline. That's the end of your - // sentence: + // look for the newline. That's the end of your sentence: if (Serial.read() == '\n') { // constrain the values to 0 - 255 and invert // if you're using a common-cathode LED, just use "constrain(color, 0, 255);" diff --git a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino index 1fedbaab48b..6b0aa83369a 100644 --- a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino +++ b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino @@ -2,9 +2,8 @@ Serial Call and Response Language: Wiring/Arduino - This program sends an ASCII A (byte of value 65) on startup - and repeats that until it gets some data in. - Then it waits for a byte in the serial port, and + This program sends an ASCII A (byte of value 65) on startup and repeats that + until it gets some data in. Then it waits for a byte in the serial port, and sends three sensor values whenever it gets a byte in. The circuit: @@ -92,8 +91,8 @@ void establishContact() { // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); - // I know that the first port in the serial list on my Mac - // is always my FTDI adaptor, so I open Serial.list()[0]. + // I know that the first port in the serial list on my Mac is always my FTDI + // adaptor, so I open Serial.list()[0]. // On Windows machines, this generally opens COM1. // Open whatever port is the one you're using. String portName = Serial.list()[0]; @@ -110,9 +109,8 @@ void establishContact() { void serialEvent(Serial myPort) { // read a byte from the serial port: int inByte = myPort.read(); - // if this is the first byte received, and it's an A, - // clear the serial buffer and note that you've - // had first contact from the microcontroller. + // if this is the first byte received, and it's an A, clear the serial + // buffer and note that you've had first contact from the microcontroller. // Otherwise, add the incoming byte to the array: if (firstContact == false) { if (inByte == 'A') { diff --git a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino index 76304da6149..ef2eac5e6d0 100644 --- a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino +++ b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino @@ -2,12 +2,10 @@ Serial Call and Response in ASCII Language: Wiring/Arduino - This program sends an ASCII A (byte of value 65) on startup - and repeats that until it gets some data in. - Then it waits for a byte in the serial port, and - sends three ASCII-encoded, comma-separated sensor values, - truncated by a linefeed and carriage return, - whenever it gets a byte in. + This program sends an ASCII A (byte of value 65) on startup and repeats that + until it gets some data in. Then it waits for a byte in the serial port, and + sends three ASCII-encoded, comma-separated sensor values, truncated by a + linefeed and carriage return, whenever it gets a byte in. The circuit: - potentiometers attached to analog inputs 0 and 1 @@ -88,10 +86,10 @@ void establishContact() { // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); - // I know that the first port in the serial list on my Mac - // is always my Arduino board, so I open Serial.list()[0]. - // Change the 0 to the appropriate number of the serial port - // that your microcontroller is attached to. + // I know that the first port in the serial list on my Mac is always my + // Arduino board, so I open Serial.list()[0]. + // Change the 0 to the appropriate number of the serial port that your + // microcontroller is attached to. myPort = new Serial(this, Serial.list()[0], 9600); // read bytes into a buffer until you get a linefeed (ASCII 10): @@ -108,8 +106,8 @@ void establishContact() { ellipse(xpos, ypos, 20, 20); } - // serialEvent method is run automatically by the Processing applet - // whenever the buffer reaches the byte value set in the bufferUntil() + // serialEvent method is run automatically by the Processing applet whenever + // the buffer reaches the byte value set in the bufferUntil() // method in the setup(): void serialEvent(Serial myPort) { @@ -118,8 +116,7 @@ void establishContact() { // if you got any bytes other than the linefeed: myString = trim(myString); - // split the string at the commas - // and convert the sections into integers: + // split the string at the commas and convert the sections into integers: int sensors[] = int(split(myString, ',')); // print out the values you got: diff --git a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino index 4d5bb85c805..43f9eaf4e55 100644 --- a/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino +++ b/build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino @@ -2,14 +2,13 @@ Serial Event example When new serial data arrives, this sketch adds it to a String. - When a newline is received, the loop prints the string and - clears it. + When a newline is received, the loop prints the string and clears it. - A good test for this is to try it with a GPS receiver - that sends out NMEA 0183 sentences. + A good test for this is to try it with a GPS receiver that sends out + NMEA 0183 sentences. - NOTE: The serialEvent() feature is not available on the - Leonardo, Micro, or other ATmega32U4 based boards. + NOTE: The serialEvent() feature is not available on the Leonardo, Micro, or + other ATmega32U4 based boards. created 9 May 2011 by Tom Igoe @@ -40,10 +39,9 @@ void loop() { } /* - SerialEvent occurs whenever a new data comes in the - hardware serial RX. This routine is run between each - time loop() runs, so using delay inside loop can delay - response. Multiple bytes of data may be available. + SerialEvent occurs whenever a new data comes in the hardware serial RX. This + routine is run between each time loop() runs, so using delay inside loop can + delay response. Multiple bytes of data may be available. */ void serialEvent() { while (Serial.available()) { @@ -51,8 +49,8 @@ void serialEvent() { char inChar = (char)Serial.read(); // add it to the inputString: inputString += inChar; - // if the incoming character is a newline, set a flag - // so the main loop can do something about it: + // if the incoming character is a newline, set a flag so the main loop can + // do something about it: if (inChar == '\n') { stringComplete = true; } diff --git a/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino b/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino index 0116027ae31..81037ebdcd6 100644 --- a/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino +++ b/build/shared/examples/04.Communication/SerialPassthrough/SerialPassthrough.ino @@ -1,23 +1,22 @@ /* SerialPassthrough sketch - Some boards, like the Arduino 101, the MKR1000, Zero, or the Micro, - have one hardware serial port attached to Digital pins 0-1, and a - separate USB serial port attached to the IDE Serial Monitor. - This means that the "serial passthrough" which is possible with - the Arduino UNO (commonly used to interact with devices/shields that - require configuration via serial AT commands) will not work by default. + Some boards, like the Arduino 101, the MKR1000, Zero, or the Micro, have one + hardware serial port attached to Digital pins 0-1, and a separate USB serial + port attached to the IDE Serial Monitor. This means that the "serial + passthrough" which is possible with the Arduino UNO (commonly used to interact + with devices/shields that require configuration via serial AT commands) will + not work by default. - This sketch allows you to emulate the serial passthrough behaviour. - Any text you type in the IDE Serial monitor will be written - out to the serial port on Digital pins 0 and 1, and vice-versa. + This sketch allows you to emulate the serial passthrough behaviour. Any text + you type in the IDE Serial monitor will be written out to the serial port on + Digital pins 0 and 1, and vice-versa. On the 101, MKR1000, Zero, and Micro, "Serial" refers to the USB Serial port - attached to the Serial Monitor, and "Serial1" refers to the hardware - serial port attached to pins 0 and 1. This sketch will emulate Serial passthrough - using those two Serial ports on the boards mentioned above, - but you can change these names to connect any two serial ports on a board - that has multiple ports. + attached to the Serial Monitor, and "Serial1" refers to the hardware serial + port attached to pins 0 and 1. This sketch will emulate Serial passthrough + using those two Serial ports on the boards mentioned above, but you can change + these names to connect any two serial ports on a board that has multiple ports. created 23 May 2016 by Erik Nyquist diff --git a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino index 4fd6baa8701..cba36eda28d 100644 --- a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino +++ b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino @@ -1,7 +1,7 @@ /* - This example reads three analog sensors (potentiometers are easiest) - and sends their values serially. The Processing and Max/MSP programs at the bottom - take those three values and use them to change the background color of the screen. + This example reads three analog sensors (potentiometers are easiest) and sends + their values serially. The Processing and Max/MSP programs at the bottom take + those three values and use them to change the background color of the screen. The circuit: - potentiometers attached to analog inputs 0, 1, and 2 @@ -51,8 +51,8 @@ void loop() { // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); - // I know that the first port in the serial list on my Mac - // is always my Arduino, so I open Serial.list()[0]. + // I know that the first port in the serial list on my Mac is always my + // Arduino, so I open Serial.list()[0]. // Open whatever port is the one you're using. myPort = new Serial(this, Serial.list()[0], 9600); // don't generate a serialEvent() unless you get a newline character: @@ -71,12 +71,11 @@ void loop() { if (inString != null) { // trim off any whitespace: inString = trim(inString); - // split the string on the commas and convert the - // resulting substrings into an integer array: + // split the string on the commas and convert the resulting substrings + // into an integer array: float[] colors = float(split(inString, ",")); - // if the array has at least three elements, you know - // you got the whole thing. Put the numbers in the - // color variables: + // if the array has at least three elements, you know you got the whole + // thing. Put the numbers in the color variables: if (colors.length >=3) { // map them to the range 0-255: redValue = map(colors[0], 0, 1023, 0, 255); diff --git a/build/shared/examples/05.Control/Arrays/Arrays.ino b/build/shared/examples/05.Control/Arrays/Arrays.ino index a05e8a13736..549ac3463f4 100644 --- a/build/shared/examples/05.Control/Arrays/Arrays.ino +++ b/build/shared/examples/05.Control/Arrays/Arrays.ino @@ -1,12 +1,11 @@ /* Arrays - Demonstrates the use of an array to hold pin numbers - in order to iterate over the pins in a sequence. - Lights multiple LEDs in sequence, then in reverse. + Demonstrates the use of an array to hold pin numbers in order to iterate over + the pins in a sequence. Lights multiple LEDs in sequence, then in reverse. - Unlike the For Loop tutorial, where the pins have to be - contiguous, here the pins can be in any random order. + Unlike the For Loop tutorial, where the pins have to be contiguous, here the + pins can be in any random order. The circuit: - LEDs from pins 2 through 7 to ground diff --git a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino index 48ee22de398..4dd40901d1e 100644 --- a/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino +++ b/build/shared/examples/05.Control/IfStatementConditional/IfStatementConditional.ino @@ -3,8 +3,8 @@ This example demonstrates the use of if() statements. It reads the state of a potentiometer (an analog input) and turns on an LED - only if the potentiometer goes above a certain threshold level. It prints the analog value - regardless of the level. + only if the potentiometer goes above a certain threshold level. It prints the + analog value regardless of the level. The circuit: - potentiometer @@ -12,8 +12,8 @@ Side pins of the potentiometer go to +5V and ground. - LED connected from digital pin 13 to ground - - Note: On most Arduino boards, there is already an LED on the board - connected to pin 13, so you don't need any extra components for this example. + - Note: On most Arduino boards, there is already an LED on the board connected + to pin 13, so you don't need any extra components for this example. created 17 Jan 2009 modified 9 Apr 2012 diff --git a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino index 9efda34f3f5..4f1383f5edc 100644 --- a/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino +++ b/build/shared/examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino @@ -4,8 +4,8 @@ This example demonstrates the use of while() statements. While the pushbutton is pressed, the sketch runs the calibration routine. - The sensor readings during the while loop define the minimum and maximum - of expected values from the photoresistor. + The sensor readings during the while loop define the minimum and maximum of + expected values from the photoresistor. This is a variation on the calibrate example. diff --git a/build/shared/examples/05.Control/switchCase/switchCase.ino b/build/shared/examples/05.Control/switchCase/switchCase.ino index 54908a59b24..c313f6b9885 100644 --- a/build/shared/examples/05.Control/switchCase/switchCase.ino +++ b/build/shared/examples/05.Control/switchCase/switchCase.ino @@ -1,13 +1,12 @@ /* Switch statement - Demonstrates the use of a switch statement. The switch - statement allows you to choose from among a set of discrete values - of a variable. It's like a series of if statements. + Demonstrates the use of a switch statement. The switch statement allows you + to choose from among a set of discrete values of a variable. It's like a + series of if statements. - To see this sketch in action, put the board and sensor in a well-lit - room, open the Serial Monitor, and move your hand gradually down - over the sensor. + To see this sketch in action, put the board and sensor in a well-lit room, + open the Serial Monitor, and move your hand gradually down over the sensor. The circuit: - photoresistor from analog in 0 to +5V @@ -22,8 +21,8 @@ http://www.arduino.cc/en/Tutorial/SwitchCase */ -// these constants won't change. They are the -// lowest and highest readings you get from your sensor: +// these constants won't change. They are the lowest and highest readings you +// get from your sensor: const int sensorMin = 0; // sensor minimum, discovered through experiment const int sensorMax = 600; // sensor maximum, discovered through experiment @@ -38,8 +37,7 @@ void loop() { // map the sensor range to a range of four options: int range = map(sensorReading, sensorMin, sensorMax, 0, 3); - // do something different depending on the - // range value: + // do something different depending on the range value: switch (range) { case 0: // your hand is on the sensor Serial.println("dark"); diff --git a/build/shared/examples/05.Control/switchCase2/switchCase2.ino b/build/shared/examples/05.Control/switchCase2/switchCase2.ino index dbc74b082c3..c30843f730a 100644 --- a/build/shared/examples/05.Control/switchCase2/switchCase2.ino +++ b/build/shared/examples/05.Control/switchCase2/switchCase2.ino @@ -1,13 +1,13 @@ /* Switch statement with serial input - Demonstrates the use of a switch statement. The switch - statement allows you to choose from among a set of discrete values - of a variable. It's like a series of if statements. + Demonstrates the use of a switch statement. The switch statement allows you + to choose from among a set of discrete values of a variable. It's like a + series of if statements. To see this sketch in action, open the Serial monitor and send any character. - The characters a, b, c, d, and e, will turn on LEDs. Any other character will turn - the LEDs off. + The characters a, b, c, d, and e, will turn on LEDs. Any other character will + turn the LEDs off. The circuit: - five LEDs attached to digital pins 2 through 6 through 220 ohm resistors @@ -34,10 +34,10 @@ void loop() { if (Serial.available() > 0) { int inByte = Serial.read(); // do something different depending on the character received. - // The switch statement expects single number values for each case; - // in this example, though, you're using single quotes to tell - // the controller to get the ASCII value for the character. For - // example 'a' = 97, 'b' = 98, and so forth: + // The switch statement expects single number values for each case; in this + // example, though, you're using single quotes to tell the controller to get + // the ASCII value for the character. For example 'a' = 97, 'b' = 98, + // and so forth: switch (inByte) { case 'a': diff --git a/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino b/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino index bee93c1440b..1cf4be447af 100644 --- a/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino +++ b/build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino @@ -35,10 +35,10 @@ void setup() { // initialize the serial communications: Serial.begin(9600); - // Provide ground and power by using the analog inputs as normal - // digital pins. This makes it possible to directly connect the - // breakout board to the Arduino. If you use the normal 5V and - // GND pins on the Arduino, you can remove these lines. + // Provide ground and power by using the analog inputs as normal digital pins. + // This makes it possible to directly connect the breakout board to the + // Arduino. If you use the normal 5V and GND pins on the Arduino, + // you can remove these lines. pinMode(groundpin, OUTPUT); pinMode(powerpin, OUTPUT); digitalWrite(groundpin, LOW); diff --git a/build/shared/examples/06.Sensors/Knock/Knock.ino b/build/shared/examples/06.Sensors/Knock/Knock.ino index 9c6160c50d8..99b50e4de47 100644 --- a/build/shared/examples/06.Sensors/Knock/Knock.ino +++ b/build/shared/examples/06.Sensors/Knock/Knock.ino @@ -3,8 +3,8 @@ This sketch reads a piezo element to detect a knocking sound. It reads an analog pin and compares the result to a set threshold. - If the result is greater than the threshold, it writes - "knock" to the serial port, and toggles the LED on pin 13. + If the result is greater than the threshold, it writes "knock" to the serial + port, and toggles the LED on pin 13. The circuit: - positive connection of the piezo attached to analog in 0 diff --git a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino index 6b72836e452..da69df9d1d9 100644 --- a/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino +++ b/build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino @@ -1,10 +1,9 @@ /* Memsic2125 - Read the Memsic 2125 two-axis accelerometer. Converts the - pulses output by the 2125 into milli-g's (1/1000 of Earth's - gravity) and prints them over the serial connection to the - computer. + Read the Memsic 2125 two-axis accelerometer. Converts the pulses output by the + 2125 into milli-g's (1/1000 of Earth's gravity) and prints them over the + serial connection to the computer. The circuit: - X output of accelerometer to digital pin 2 @@ -29,8 +28,7 @@ const int yPin = 3; // Y output of the accelerometer void setup() { // initialize serial communications: Serial.begin(9600); - // initialize the pins connected to the accelerometer - // as inputs: + // initialize the pins connected to the accelerometer as inputs: pinMode(xPin, INPUT); pinMode(yPin, INPUT); } diff --git a/build/shared/examples/06.Sensors/Ping/Ping.ino b/build/shared/examples/06.Sensors/Ping/Ping.ino index da8fc0778a1..cdde18e45b7 100644 --- a/build/shared/examples/06.Sensors/Ping/Ping.ino +++ b/build/shared/examples/06.Sensors/Ping/Ping.ino @@ -1,11 +1,10 @@ /* Ping))) Sensor - This sketch reads a PING))) ultrasonic rangefinder and returns the - distance to the closest object in range. To do this, it sends a pulse - to the sensor to initiate a reading, then listens for a pulse - to return. The length of the returning pulse is proportional to - the distance of the object from the sensor. + This sketch reads a PING))) ultrasonic rangefinder and returns the distance + to the closest object in range. To do this, it sends a pulse to the sensor to + initiate a reading, then listens for a pulse to return. The length of the + returning pulse is proportional to the distance of the object from the sensor. The circuit: - +V connection of the PING))) attached to +5V @@ -22,8 +21,7 @@ http://www.arduino.cc/en/Tutorial/Ping */ -// this constant won't change. It's the pin number -// of the sensor's output: +// this constant won't change. It's the pin number of the sensor's output: const int pingPin = 7; void setup() { @@ -32,8 +30,8 @@ void setup() { } void loop() { - // establish variables for duration of the ping, - // and the distance result in inches and centimeters: + // establish variables for duration of the ping, and the distance result + // in inches and centimeters: long duration, inches, cm; // The PING))) is triggered by a HIGH pulse of 2 or more microseconds. @@ -45,9 +43,9 @@ void loop() { delayMicroseconds(5); digitalWrite(pingPin, LOW); - // The same pin is used to read the signal from the PING))): a HIGH - // pulse whose duration is the time (in microseconds) from the sending - // of the ping to the reception of its echo off of an object. + // The same pin is used to read the signal from the PING))): a HIGH pulse + // whose duration is the time (in microseconds) from the sending of the ping + // to the reception of its echo off of an object. pinMode(pingPin, INPUT); duration = pulseIn(pingPin, HIGH); @@ -65,17 +63,17 @@ void loop() { } long microsecondsToInches(long microseconds) { - // According to Parallax's datasheet for the PING))), there are - // 73.746 microseconds per inch (i.e. sound travels at 1130 feet per - // second). This gives the distance travelled by the ping, outbound - // and return, so we divide by 2 to get the distance of the obstacle. + // According to Parallax's datasheet for the PING))), there are 73.746 + // microseconds per inch (i.e. sound travels at 1130 feet per second). + // This gives the distance travelled by the ping, outbound and return, + // so we divide by 2 to get the distance of the obstacle. // See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf return microseconds / 74 / 2; } long microsecondsToCentimeters(long microseconds) { // The speed of sound is 340 m/s or 29 microseconds per centimeter. - // The ping travels out and back, so to find the distance of the - // object we take half of the distance travelled. + // The ping travels out and back, so to find the distance of the object we + // take half of the distance travelled. return microseconds / 29 / 2; } diff --git a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino index cf1fa9e3077..f2cf79525f3 100644 --- a/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino +++ b/build/shared/examples/07.Display/RowColumnScanning/RowColumnScanning.ino @@ -7,8 +7,8 @@ http://sigma.octopart.com/140413/datasheet/Lumex-LDM-24488NI.pdf for the pin connections. - For other LED cathode column matrixes, you should only need to change - the pin numbers in the row[] and column[] arrays. + For other LED cathode column matrixes, you should only need to change the pin + numbers in the row[] and column[] arrays. rows are the anodes cols are the cathodes @@ -51,14 +51,12 @@ int x = 5; int y = 5; void setup() { - // initialize the I/O pins as outputs - // iterate over the pins: + // initialize the I/O pins as outputs iterate over the pins: for (int thisPin = 0; thisPin < 8; thisPin++) { // initialize the output pins: pinMode(col[thisPin], OUTPUT); pinMode(row[thisPin], OUTPUT); - // take the col pins (i.e. the cathodes) high to ensure that - // the LEDS are off: + // take the col pins (i.e. the cathodes) high to ensure that the LEDS are off: digitalWrite(col[thisPin], HIGH); } @@ -84,8 +82,8 @@ void readSensors() { // read the sensors for X and Y values: x = 7 - map(analogRead(A0), 0, 1023, 0, 7); y = map(analogRead(A1), 0, 1023, 0, 7); - // set the new pixel position low so that the LED will turn on - // in the next screen refresh: + // set the new pixel position low so that the LED will turn on in the next + // screen refresh: pixels[x][y] = LOW; } diff --git a/build/shared/examples/07.Display/barGraph/barGraph.ino b/build/shared/examples/07.Display/barGraph/barGraph.ino index aaa0a572c8e..48327a98b51 100644 --- a/build/shared/examples/07.Display/barGraph/barGraph.ino +++ b/build/shared/examples/07.Display/barGraph/barGraph.ino @@ -2,12 +2,12 @@ LED bar graph Turns on a series of LEDs based on the value of an analog sensor. - This is a simple way to make a bar graph display. Though this graph - uses 10 LEDs, you can use any number by changing the LED count - and the pins in the array. + This is a simple way to make a bar graph display. Though this graph uses 10 + LEDs, you can use any number by changing the LED count and the pins in the + array. - This method can be used to control any series of digital outputs that - depends on an analog input. + This method can be used to control any series of digital outputs that depends + on an analog input. The circuit: - LEDs from pins 2 through 11 to ground diff --git a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino index 9ab93f70730..48540f9cd67 100644 --- a/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino +++ b/build/shared/examples/08.Strings/StringComparisonOperators/StringComparisonOperators.ino @@ -97,8 +97,8 @@ void loop() { // the compareTo() operator also allows you to compare Strings // it evaluates on the first character that's different. - // if the first character of the String you're comparing to - // comes first in alphanumeric order, then compareTo() is greater than 0: + // if the first character of the String you're comparing to comes first in + // alphanumeric order, then compareTo() is greater than 0: stringOne = "Cucumber"; stringTwo = "Cucuracha"; if (stringOne.compareTo(stringTwo) < 0) { diff --git a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino index 46b224069a4..bac9f81ef6b 100644 --- a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino +++ b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino @@ -25,8 +25,8 @@ void setup() { } void loop() { - // indexOf() returns the position (i.e. index) of a particular character - // in a String. For example, if you were parsing HTML tags, you could use it: + // indexOf() returns the position (i.e. index) of a particular character in a + // String. For example, if you were parsing HTML tags, you could use it: String stringOne = ""; int firstClosingBracket = stringOne.indexOf('>'); Serial.println("The index of > in the string " + stringOne + " is " + firstClosingBracket); diff --git a/build/shared/examples/08.Strings/StringToInt/StringToInt.ino b/build/shared/examples/08.Strings/StringToInt/StringToInt.ino index 1d4a7ce0e40..59e872aa2e8 100644 --- a/build/shared/examples/08.Strings/StringToInt/StringToInt.ino +++ b/build/shared/examples/08.Strings/StringToInt/StringToInt.ino @@ -1,8 +1,8 @@ /* String to Integer conversion - Reads a serial input string until it sees a newline, then converts - the string to a number if the characters are digits. + Reads a serial input string until it sees a newline, then converts the string + to a number if the characters are digits. The circuit: - No external components needed. @@ -34,12 +34,10 @@ void loop() { while (Serial.available() > 0) { int inChar = Serial.read(); if (isDigit(inChar)) { - // convert the incoming byte to a char - // and add it to the string: + // convert the incoming byte to a char and add it to the string: inString += (char)inChar; } - // if you get a newline, print the string, - // then the string's value: + // if you get a newline, print the string, then the string's value: if (inChar == '\n') { Serial.print("Value:"); Serial.println(inString.toInt()); diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino index d159af6d5c8..f6ea490c2d7 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino @@ -35,8 +35,7 @@ int platform = OSX; void setup() { - // make pin 2 an input and turn on the - // pull-up resistor so it goes high unless + // make pin 2 an input and turn on the pull-up resistor so it goes high unless // connected to ground: pinMode(2, INPUT_PULLUP); Keyboard.begin(); diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino index dc461fac8fb..7ec0d6d8974 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino @@ -5,12 +5,10 @@ For Leonardo and Due boards only. - When you connect pin 2 to ground, it creates a new - window with a key combination (CTRL-N), - then types in the Blink sketch, then auto-formats the text - using another key combination (CTRL-T), then - uploads the sketch to the currently selected Arduino using - a final key combination (CTRL-U). + When you connect pin 2 to ground, it creates a new window with a key + combination (CTRL-N), then types in the Blink sketch, then auto-formats the + text using another key combination (CTRL-T), then uploads the sketch to the + currently selected Arduino using a final key combination (CTRL-U). Circuit: - Arduino Leonardo, Micro, Due, LilyPad USB, or Yún @@ -38,8 +36,7 @@ char ctrlKey = KEY_LEFT_GUI; void setup() { - // make pin 2 an input and turn on the - // pull-up resistor so it goes high unless + // make pin 2 an input and turn on the pull-up resistor so it goes high unless // connected to ground: pinMode(2, INPUT_PULLUP); // initialize control over the keyboard: @@ -60,9 +57,8 @@ void loop() { // wait for new window to open: delay(1000); - // versions of the Arduino IDE after 1.5 pre-populate - // new sketches with setup() and loop() functions - // let's clear the window before typing anything new + // versions of the Arduino IDE after 1.5 pre-populate new sketches with + // setup() and loop() functions let's clear the window before typing anything new // select all Keyboard.press(ctrlKey); Keyboard.press('a'); diff --git a/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino b/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino index 0e9c7e43617..72d9dddf538 100644 --- a/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino +++ b/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino @@ -4,8 +4,8 @@ For the Arduino Leonardo, Micro or Due Reads a byte from the serial port, sends a keystroke back. - The sent keystroke is one higher than what's received, e.g. - if you send a, you get b, send A you get B, and so forth. + The sent keystroke is one higher than what's received, e.g. if you send a, + you get b, send A you get B, and so forth. The circuit: - none diff --git a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino index a8b6125f8c8..971354134e0 100644 --- a/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino +++ b/build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino @@ -6,11 +6,11 @@ Hardware: - five pushbuttons attached to D2, D3, D4, D5, D6 - The mouse movement is always relative. This sketch reads - four pushbuttons, and uses them to set the movement of the mouse. + The mouse movement is always relative. This sketch reads four pushbuttons, and + uses them to set the movement of the mouse. - WARNING: When you use the Mouse.move() command, the Arduino takes - over your mouse! Make sure you have control before you use the mouse commands. + WARNING: When you use the Mouse.move() command, the Arduino takes over your + mouse! Make sure you have control before you use the mouse commands. created 15 Mar 2012 modified 27 Mar 2012 diff --git a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino index d68b06f402c..9c78eda5503 100644 --- a/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino @@ -8,11 +8,11 @@ Hardware: - five pushbuttons attached to D2, D3, D4, D5, D6 - The mouse movement is always relative. This sketch reads - four pushbuttons, and uses them to set the movement of the mouse. + The mouse movement is always relative. This sketch reads four pushbuttons, + and uses them to set the movement of the mouse. - WARNING: When you use the Mouse.move() command, the Arduino takes - over your mouse! Make sure you have control before you use the mouse commands. + WARNING: When you use the Mouse.move() command, the Arduino takes over your + mouse! Make sure you have control before you use the mouse commands. created 15 Mar 2012 modified 27 Mar 2012 diff --git a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino index 72fa47b81c6..1405322eea7 100644 --- a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino +++ b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino @@ -2,23 +2,23 @@ JoystickMouseControl Controls the mouse from a joystick on an Arduino Leonardo, Micro or Due. - Uses a pushbutton to turn on and off mouse control, and - a second pushbutton to click the left mouse button. + Uses a pushbutton to turn on and off mouse control, and a second pushbutton + to click the left mouse button. Hardware: - 2-axis joystick connected to pins A0 and A1 - pushbuttons connected to pin D2 and D3 - The mouse movement is always relative. This sketch reads - two analog inputs that range from 0 to 1023 (or less on either end) - and translates them into ranges of -6 to 6. - The sketch assumes that the joystick resting values are around the - middle of the range, but that they vary within a threshold. + The mouse movement is always relative. This sketch reads two analog inputs + that range from 0 to 1023 (or less on either end) and translates them into + ranges of -6 to 6. + The sketch assumes that the joystick resting values are around the middle of + the range, but that they vary within a threshold. - WARNING: When you use the Mouse.move() command, the Arduino takes - over your mouse! Make sure you have control before you use the command. - This sketch includes a pushbutton to toggle the mouse control state, so - you can turn on and off mouse control. + WARNING: When you use the Mouse.move() command, the Arduino takes over your + mouse! Make sure you have control before you use the command. This sketch + includes a pushbutton to toggle the mouse control state, so you can turn on + and off mouse control. created 15 Sep 2011 updated 28 Mar 2012 @@ -97,8 +97,8 @@ void loop() { } /* - reads an axis (0 or 1 for x or y) and scales the - analog input range to a range from 0 to + reads an axis (0 or 1 for x or y) and scales the analog input range to a range + from 0 to */ int readAxis(int thisAxis) { @@ -108,8 +108,7 @@ int readAxis(int thisAxis) { // map the reading from the analog input range to the output range: reading = map(reading, 0, 1023, 0, range); - // if the output reading is outside from the - // rest position threshold, use it: + // if the output reading is outside from the rest position threshold, use it: int distance = reading - center; if (abs(distance) < threshold) { diff --git a/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino b/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino index 219afb42b05..41283dad1f3 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 2 - Spaceship Interface - This sketch is written to accompany Project 2 in the - Arduino Starter Kit + This sketch is written to accompany Project 2 in the Arduino Starter Kit Parts required: - one green LED @@ -20,10 +19,9 @@ This example code is part of the public domain. */ -// Create a global variable to hold the -// state of the switch. This variable is persistent -// throughout the program. Whenever you refer to -// switchState, you’re talking about the number it holds +// Create a global variable to hold the state of the switch. This variable is +// persistent throughout the program. Whenever you refer to switchState, you’re +// talking about the number it holds int switchstate = 0; void setup() { @@ -39,20 +37,18 @@ void setup() { void loop() { // read the value of the switch - // digitalRead() checks to see if there is voltage - // on the pin or not + // digitalRead() checks to see if there is voltage on the pin or not switchstate = digitalRead(2); - // if the button is not pressed - // turn on the green LED and off the red LEDs + // if the button is not pressed turn on the green LED and off the red LEDs if (switchstate == LOW) { digitalWrite(3, HIGH); // turn the green LED on pin 3 on digitalWrite(4, LOW); // turn the red LED on pin 4 off digitalWrite(5, LOW); // turn the red LED on pin 5 off } // this else is part of the above if() statement. - // if the switch is not LOW (the button is pressed) - // turn off the green LED and blink alternatively the red LEDs + // if the switch is not LOW (the button is pressed) turn off the green LED and + // blink alternatively the red LEDs else { digitalWrite(3, LOW); // turn the green LED on pin 3 off digitalWrite(4, LOW); // turn the red LED on pin 4 off diff --git a/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino b/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino index 03befe9308a..2a72f46d7f3 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p03_LoveOMeter/p03_LoveOMeter.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 3 - Love-O-Meter - This sketch is written to accompany Project 3 in the - Arduino Starter Kit + This sketch is written to accompany Project 3 in the Arduino Starter Kit Parts required: - one TMP36 temperature sensor @@ -35,8 +34,7 @@ void setup() { } void loop() { - // read the value on AnalogIn pin 0 - // and store it in a variable + // read the value on AnalogIn pin 0 and store it in a variable int sensorVal = analogRead(sensorPin); // send the 10-bit sensor value out the serial port @@ -58,8 +56,7 @@ void loop() { float temperature = (voltage - .5) * 100; Serial.println(temperature); - // if the current temperature is lower than the baseline - // turn off all LEDs + // if the current temperature is lower than the baseline turn off all LEDs if (temperature < baselineTemp + 2) { digitalWrite(2, LOW); digitalWrite(3, LOW); diff --git a/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino b/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino index 3e6ab05b30c..1e15f1cb377 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p04_ColorMixingLamp/p04_ColorMixingLamp.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 4 - Color Mixing Lamp - This sketch is written to accompany Project 3 in the - Arduino Starter Kit + This sketch is written to accompany Project 3 in the Arduino Starter Kit Parts required: - one RGB LED @@ -71,10 +70,10 @@ void loop() { Serial.println(blueSensorValue); /* - In order to use the values from the sensor for the LED, - you need to do some math. The ADC provides a 10-bit number, - but analogWrite() uses 8 bits. You'll want to divide your - sensor readings by 4 to keep them in range of the output. + In order to use the values from the sensor for the LED, you need to do some + math. The ADC provides a 10-bit number, but analogWrite() uses 8 bits. + You'll want to divide your sensor readings by 4 to keep them in range + of the output. */ redValue = redSensorValue / 4; greenValue = greenSensorValue / 4; diff --git a/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino b/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino index 2875e1aa401..b56e860ef99 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p05_ServoMoodIndicator/p05_ServoMoodIndicator.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 5 - Servo Mood Indicator - This sketch is written to accompany Project 5 in the - Arduino Starter Kit + This sketch is written to accompany Project 5 in the Arduino Starter Kit Parts required: - servo motor diff --git a/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino b/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino index 496300b3c24..6f6475c24f7 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p06_LightTheremin/p06_LightTheremin.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 6 - Light Theremin - This sketch is written to accompany Project 6 in the - Arduino Starter Kit + This sketch is written to accompany Project 6 in the Arduino Starter Kit Parts required: - photoresistor diff --git a/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino b/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino index 798e84f3f74..ad39bd19892 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p07_Keyboard/p07_Keyboard.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 7 - Keyboard - This sketch is written to accompany Project 7 in the - Arduino Starter Kit + This sketch is written to accompany Project 7 in the Arduino Starter Kit Parts required: - two 10 kilohm resistors @@ -21,8 +20,7 @@ */ // create an array of notes -// the numbers below correspond to -// the frequencies of middle C, D, E, and F +// the numbers below correspond to the frequencies of middle C, D, E, and F int notes[] = {262, 294, 330, 349}; void setup() { diff --git a/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino b/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino index 978b0762dff..801f8cd4110 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 8 - Digital Hourglass - This sketch is written to accompany Project 8 in the - Arduino Starter Kit + This sketch is written to accompany Project 8 in the Arduino Starter Kit Parts required: - 10 kilohm resistor diff --git a/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino b/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino index ffe1eb4fea6..23e19b1bc8f 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p09_MotorizedPinwheel/p09_MotorizedPinwheel.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 9 - Motorized Pinwheel - This sketch is written to accompany Project 9 in the - Arduino Starter Kit + This sketch is written to accompany Project 9 in the Arduino Starter Kit Parts required: - 10 kilohm resistor diff --git a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino index ca0a3698113..4d675ed6609 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p10_Zoetrope/p10_Zoetrope.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 10 - Zoetrope - This sketch is written to accompany Project 10 in the - Arduino Starter Kit + This sketch is written to accompany Project 10 in the Arduino Starter Kit Parts required: - two 10 kilohm resistors @@ -59,8 +58,8 @@ void loop() { // read the value of the direction switch directionSwitchState = digitalRead(directionSwitchPin); - // read the value of the pot and divide by 4 to get - // a value that can be used for PWM + // read the value of the pot and divide by 4 to get a value that can be + // used for PWM motorSpeed = analogRead(potPin) / 4; // if the on/off button changed state since the last loop() @@ -79,8 +78,8 @@ void loop() { } } - // change the direction the motor spins by talking - // to the control pins on the H-Bridge + // change the direction the motor spins by talking to the control pins + // on the H-Bridge if (motorDirection == 1) { digitalWrite(controlPin1, HIGH); digitalWrite(controlPin2, LOW); diff --git a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino index 1a6c71bf876..63aefc4c407 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p11_CrystalBall/p11_CrystalBall.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 11 - Crystal Ball - This sketch is written to accompany Project 11 in the - Arduino Starter Kit + This sketch is written to accompany Project 11 in the Arduino Starter Kit Parts required: - 220 ohm resistor @@ -60,9 +59,8 @@ void loop() { // compare the switchState to its previous state if (switchState != prevSwitchState) { - // if the state has changed from HIGH to LOW - // you know that the ball has been tilted from - // one direction to the other + // if the state has changed from HIGH to LOW you know that the ball has been + // tilted from one direction to the other if (switchState == LOW) { // randomly chose a reply reply = random(8); diff --git a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino index 68eda827b38..9486725a286 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p12_KnockLock/p12_KnockLock.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 12 - Knock Lock - This sketch is written to accompany Project 12 in the - Arduino Starter Kit + This sketch is written to accompany Project 12 in the Arduino Starter Kit Parts required: - 1 megohm resistor @@ -146,11 +145,10 @@ void loop() { } } -// this function checks to see if a -// detected knock is within max and min range +// this function checks to see if a detected knock is within max and min range boolean checkForKnock(int value) { - // if the value of the knock is greater than - // the minimum, and larger than the maximum + // if the value of the knock is greater than the minimum, and larger + // than the maximum if (value > quietKnock && value < loudKnock) { // turn the status LED on digitalWrite(yellowLed, HIGH); diff --git a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino index 4cb999b46b3..8f7a28a5b9b 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 13 - Touch Sensor Lamp - This sketch is written to accompany Project 13 in the - Arduino Starter Kit + This sketch is written to accompany Project 13 in the Arduino Starter Kit Parts required: - 1 megohm resistor @@ -23,8 +22,7 @@ This example code is part of the public domain. */ -// import the library (must be located in the -// Arduino/libraries directory) +// import the library (must be located in the Arduino/libraries directory) #include // create an instance of the library diff --git a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino index 83e9a78f22b..1b2e0c0dc96 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 14 - Tweak the Arduino Logo - This sketch is written to accompany Project 14 in the - Arduino Starter Kit + This sketch is written to accompany Project 14 in the Arduino Starter Kit Parts required: - 10 kilohm potentiometer @@ -27,8 +26,8 @@ void setup() { } void loop() { - // read the value of A0, divide by 4 and - // send it as a byte over the serial connection + // read the value of A0, divide by 4 and send it as a byte over the + // serial connection Serial.write(analogRead(A0) / 4); delay(1); } @@ -62,21 +61,19 @@ void loop() { // make the window the same size as the image surface.setSize(logo.width, logo.height); - // print a list of available serial ports to the - // Processing status window + // print a list of available serial ports to the Processing status window println("Available serial ports:"); println(Serial.list()); - // Tell the serial object the information it needs to communicate - // with the Arduino. Change Serial.list()[0] to the correct - // port corresponding to your Arduino board. The last - // parameter (e.g. 9600) is the speed of the communication. It - // has to correspond to the value passed to Serial.begin() in your - // Arduino sketch. + // Tell the serial object the information it needs to communicate with the + // Arduino. Change Serial.list()[0] to the correct port corresponding to + // your Arduino board. The last parameter (e.g. 9600) is the speed of the + // communication. It has to correspond to the value passed to + // Serial.begin() in your Arduino sketch. myPort = new Serial(this, Serial.list()[0], 9600); - // If you know the name of the port used by the Arduino board, you - // can specify it directly like this. + // If you know the name of the port used by the Arduino board, you can + // specify it directly like this. // port = new Serial(this, "COM1", 9600); } @@ -91,9 +88,8 @@ void loop() { println(bgcolor); } - // Draw the background. the variable bgcolor - // contains the Hue, determined by the value - // from the serial port + // Draw the background. the variable bgcolor contains the Hue, determined by + // the value from the serial port background(bgcolor, 255, 255); // draw the Arduino logo diff --git a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino index 8b812f41399..d5d530a2bd2 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p15_HackingButtons/p15_HackingButtons.ino @@ -2,8 +2,7 @@ Arduino Starter Kit example Project 15 - Hacking Buttons - This sketch is written to accompany Project 15 in the - Arduino Starter Kit + This sketch is written to accompany Project 15 in the Arduino Starter Kit Parts required: - battery powered component diff --git a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino index b695b512585..8caa58eabe1 100644 --- a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino +++ b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino @@ -3,30 +3,30 @@ // If you require a license, see // http://www.opensource.org/licenses/bsd-license.php // -// This sketch turns the Arduino into a AVRISP -// using the following Arduino pins: +// This sketch turns the Arduino into a AVRISP using the following Arduino pins: // // Pin 10 is used to reset the target microcontroller. // -// By default, the hardware SPI pins MISO, MOSI and SCK are used -// to communicate with the target. On all Arduinos, these pins can be found +// By default, the hardware SPI pins MISO, MOSI and SCK are used to communicate +// with the target. On all Arduinos, these pins can be found // on the ICSP/SPI header: // // MISO °. . 5V (!) Avoid this pin on Due, Zero... // SCK . . MOSI // . . GND // -// On some Arduinos (Uno,...), pins MOSI, MISO and SCK are the same pins -// as digital pin 11, 12 and 13, respectively. That is why many tutorials -// instruct you to hook up the target to these pins. If you find this wiring -// more practical, have a define USE_OLD_STYLE_WIRING. This will work even -// when not using an Uno. (On an Uno this is not needed). +// On some Arduinos (Uno,...), pins MOSI, MISO and SCK are the same pins as +// digital pin 11, 12 and 13, respectively. That is why many tutorials instruct +// you to hook up the target to these pins. If you find this wiring more +// practical, have a define USE_OLD_STYLE_WIRING. This will work even when not +// using an Uno. (On an Uno this is not needed). // -// Alternatively you can use any other digital pin by configuring software ('BitBanged') -// SPI and having appropriate defines for PIN_MOSI, PIN_MISO and PIN_SCK. +// Alternatively you can use any other digital pin by configuring +// software ('BitBanged') SPI and having appropriate defines for PIN_MOSI, +// PIN_MISO and PIN_SCK. // -// IMPORTANT: When using an Arduino that is not 5V tolerant (Due, Zero, ...) -// as the programmer, make sure to not expose any of the programmer's pins to 5V. +// IMPORTANT: When using an Arduino that is not 5V tolerant (Due, Zero, ...) as +// the programmer, make sure to not expose any of the programmer's pins to 5V. // A simple way to accomplish this is to power the complete system (programmer // and target) at 3V3. // @@ -43,9 +43,9 @@ #define PROG_FLICKER true // Configure SPI clock (in Hz). -// E.g. for an ATtiny @ 128 kHz: the datasheet states that both the high -// and low SPI clock pulse must be > 2 CPU cycles, so take 3 cycles i.e. -// divide target f_cpu by 6: +// E.g. for an ATtiny @ 128 kHz: the datasheet states that both the high and low +// SPI clock pulse must be > 2 CPU cycles, so take 3 cycles i.e. divide target +// f_cpu by 6: // #define SPI_CLOCK (128000/6) // // A clock slow enough for an ATtiny85 @ 1 MHz, is a reasonable default: @@ -54,8 +54,8 @@ // Select hardware or software SPI, depending on SPI clock. -// Currently only for AVR, for other architectures (Due, Zero,...), -// hardware SPI is probably too fast anyway. +// Currently only for AVR, for other architectures (Due, Zero,...), hardware SPI +// is probably too fast anyway. #if defined(ARDUINO_ARCH_AVR) @@ -88,9 +88,8 @@ #endif -// HOODLOADER2 means running sketches on the ATmega16U2 -// serial converter chips on Uno or Mega boards. -// We must use pins that are broken out: +// HOODLOADER2 means running sketches on the ATmega16U2 serial converter chips +// on Uno or Mega boards. We must use pins that are broken out: #else #define RESET 4 @@ -401,10 +400,8 @@ void start_pmode() { // Reset target before driving PIN_SCK or PIN_MOSI - // SPI.begin() will configure SS as output, - // so SPI master mode is selected. - // We have defined RESET as pin 10, - // which for many Arduinos is not the SS pin. + // SPI.begin() will configure SS as output, so SPI master mode is selected. + // We have defined RESET as pin 10, which for many Arduinos is not the SS pin. // So we have to configure RESET as output here, // (reset_target() first sets the correct level) reset_target(true); @@ -418,8 +415,8 @@ void start_pmode() { digitalWrite(PIN_SCK, LOW); delay(20); // discharge PIN_SCK, value arbitrarily chosen reset_target(false); - // Pulse must be minimum 2 target CPU clock cycles - // so 100 usec is ok for CPU speeds above 20 KHz + // Pulse must be minimum 2 target CPU clock cycles so 100 usec is ok for CPU + // speeds above 20 KHz delayMicroseconds(100); reset_target(true); @@ -431,8 +428,7 @@ void start_pmode() { void end_pmode() { SPI.end(); - // We're about to take the target out of reset - // so configure SPI pins as input + // We're about to take the target out of reset so configure SPI pins as input pinMode(PIN_MOSI, INPUT); pinMode(PIN_SCK, INPUT); reset_target(false); @@ -530,8 +526,7 @@ uint8_t write_eeprom(unsigned int length) { } // write (length) bytes, (start) is a byte address uint8_t write_eeprom_chunk(unsigned int start, unsigned int length) { - // this writes byte-by-byte, - // page writing may be faster (4 bytes at a time) + // this writes byte-by-byte, page writing may be faster (4 bytes at a time) fill(length); prog_lamp(LOW); for (unsigned int x = 0; x < length; x++) { From f058473f429d590b6c5f5b6ba9b3db6b6d9635d7 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 14 Jul 2017 17:54:32 -0700 Subject: [PATCH 10/11] Use consistent formatting style for Processing code included in built-in example comments --- .../04.Communication/Dimmer/Dimmer.ino | 43 +++++----- .../examples/04.Communication/Graph/Graph.ino | 7 +- .../PhysicalPixel/PhysicalPixel.ino | 83 +++++++++---------- .../SerialCallResponse/SerialCallResponse.ino | 14 ++-- .../SerialCallResponseASCII.ino | 50 ++++++----- .../VirtualColorMixer/VirtualColorMixer.ino | 2 +- .../p14_TweakTheArduinoLogo.ino | 3 + 7 files changed, 100 insertions(+), 102 deletions(-) diff --git a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino index 3f2c6fc66a8..969d3363a35 100644 --- a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino +++ b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino @@ -42,7 +42,9 @@ void loop() { } /* Processing code for this example + // Dimmer - sends bytes over a serial port + // by David A. Mellis // This example code is in the public domain. @@ -50,34 +52,35 @@ void loop() { Serial port; void setup() { - size(256, 150); + size(256, 150); - println("Available serial ports:"); - // if using Processing 2.1 or later, use Serial.printArray() - println(Serial.list()); + println("Available serial ports:"); + // if using Processing 2.1 or later, use Serial.printArray() + println(Serial.list()); - // Uses the first port in this list (number 0). Change this to select the port - // corresponding to your Arduino board. The last parameter (e.g. 9600) is the - // speed of the communication. It has to correspond to the value passed to - // Serial.begin() in your Arduino sketch. - port = new Serial(this, Serial.list()[0], 9600); + // Uses the first port in this list (number 0). Change this to select the port + // corresponding to your Arduino board. The last parameter (e.g. 9600) is the + // speed of the communication. It has to correspond to the value passed to + // Serial.begin() in your Arduino sketch. + port = new Serial(this, Serial.list()[0], 9600); - // If you know the name of the port used by the Arduino board, you can specify - // it directly like this. - //port = new Serial(this, "COM1", 9600); + // If you know the name of the port used by the Arduino board, you can specify + // it directly like this. + //port = new Serial(this, "COM1", 9600); } void draw() { - // draw a gradient from black to white - for (int i = 0; i < 256; i++) { - stroke(i); - line(i, 0, i, 150); + // draw a gradient from black to white + for (int i = 0; i < 256; i++) { + stroke(i); + line(i, 0, i, 150); + } + + // write the current X-position of the mouse to the serial port as + // a single byte + port.write(mouseX); } - // write the current X-position of the mouse to the serial port as - // a single byte - port.write(mouseX); - } */ /* Max/MSP v5 patch for this example diff --git a/build/shared/examples/04.Communication/Graph/Graph.ino b/build/shared/examples/04.Communication/Graph/Graph.ino index 4aaf8d68907..1fba39cf3c4 100644 --- a/build/shared/examples/04.Communication/Graph/Graph.ino +++ b/build/shared/examples/04.Communication/Graph/Graph.ino @@ -42,13 +42,12 @@ void loop() { // Graphing sketch - // This program takes ASCII-encoded strings from the serial port at 9600 baud // and graphs them. It expects values in the range 0 to 1023, followed by a // newline, or newline and carriage return - // Created 20 Apr 2005 - // Updated 24 Nov 2015 + // created 20 Apr 2005 + // updated 24 Nov 2015 // by Tom Igoe // This example code is in the public domain. @@ -77,6 +76,7 @@ void loop() { // set initial background: background(0); } + void draw () { // draw the line: stroke(127, 34, 255); @@ -92,7 +92,6 @@ void loop() { } } - void serialEvent (Serial myPort) { // get the ASCII string: String inString = myPort.readStringUntil('\n'); diff --git a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino index 16ee3731da7..645bc5dfd91 100644 --- a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino +++ b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino @@ -49,7 +49,7 @@ void loop() { /* Processing code for this example - // mouse over serial + // Mouse over serial // Demonstrates how to send data to the Arduino I/O board, in order to turn ON // a light if the mouse is over a square and turn it off if the mouse is not. @@ -60,8 +60,6 @@ void loop() { // by Tom Igoe // This example code is in the public domain. - - import processing.serial.*; float boxX; @@ -72,52 +70,49 @@ void loop() { Serial port; void setup() { - size(200, 200); - boxX = width/2.0; - boxY = height/2.0; - rectMode(RADIUS); - - // List all the available serial ports in the output pane. - // You will need to choose the port that the Arduino board is connected to - // from this list. The first port in the list is port #0 and the third port - // in the list is port #2. - // if using Processing 2.1 or later, use Serial.printArray() - println(Serial.list()); - - // Open the port that the Arduino board is connected to (in this case #0) - // Make sure to open the port at the same speed Arduino is using (9600bps) - port = new Serial(this, Serial.list()[0], 9600); - + size(200, 200); + boxX = width / 2.0; + boxY = height / 2.0; + rectMode(RADIUS); + + // List all the available serial ports in the output pane. + // You will need to choose the port that the Arduino board is connected to + // from this list. The first port in the list is port #0 and the third port + // in the list is port #2. + // if using Processing 2.1 or later, use Serial.printArray() + println(Serial.list()); + + // Open the port that the Arduino board is connected to (in this case #0) + // Make sure to open the port at the same speed Arduino is using (9600bps) + port = new Serial(this, Serial.list()[0], 9600); } - void draw() - { - background(0); - - // Test if the cursor is over the box - if (mouseX > boxX-boxSize && mouseX < boxX+boxSize && - mouseY > boxY-boxSize && mouseY < boxY+boxSize) { - mouseOverBox = true; - // draw a line around the box and change its color: - stroke(255); - fill(153); - // send an 'H' to indicate mouse is over square: - port.write('H'); - } - else { - // return the box to its inactive state: - stroke(153); - fill(153); - // send an 'L' to turn the LED off: - port.write('L'); - mouseOverBox = false; - } + void draw() { + background(0); + + // Test if the cursor is over the box + if (mouseX > boxX - boxSize && mouseX < boxX + boxSize && + mouseY > boxY - boxSize && mouseY < boxY + boxSize) { + mouseOverBox = true; + // draw a line around the box and change its color: + stroke(255); + fill(153); + // send an 'H' to indicate mouse is over square: + port.write('H'); + } + else { + // return the box to its inactive state: + stroke(153); + fill(153); + // send an 'L' to turn the LED off: + port.write('L'); + mouseOverBox = false; + } - // Draw the box - rect(boxX, boxY, boxSize, boxSize); + // Draw the box + rect(boxX, boxY, boxSize, boxSize); } - */ /* diff --git a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino index 6b0aa83369a..19ed9bbe494 100644 --- a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino +++ b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino @@ -64,19 +64,18 @@ void establishContact() { } } -/* - Processing sketch to run with this example: +/* Processing sketch to run with this example: // This example code is in the public domain. import processing.serial.*; - int bgcolor; // Background color - int fgcolor; // Fill color + int bgcolor; // Background color + int fgcolor; // Fill color Serial myPort; // The serial port int[] serialInArray = new int[3]; // Where we'll put what we receive int serialCount = 0; // A count of how many bytes we receive - int xpos, ypos; // Starting position of the ball + int xpos, ypos; // Starting position of the ball boolean firstContact = false; // Whether we've heard from the microcontroller void setup() { @@ -84,8 +83,8 @@ void establishContact() { noStroke(); // No border on the next thing drawn // Set the starting position of the ball (middle of the stage) - xpos = width/2; - ypos = height/2; + xpos = width / 2; + ypos = height / 2; // Print a list of the serial ports for debugging purposes // if using Processing 2.1 or later, use Serial.printArray() @@ -140,6 +139,7 @@ void establishContact() { } } } + */ /* diff --git a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino index ef2eac5e6d0..bb5b87ad0a9 100644 --- a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino +++ b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino @@ -66,24 +66,22 @@ void establishContact() { } } - -/* - Processing code to run with this example: +/* Processing code to run with this example: // This example code is in the public domain. import processing.serial.*; // import the Processing serial library Serial myPort; // The serial port - float bgcolor; // Background color - float fgcolor; // Fill color - float xpos, ypos; // Starting position of the ball + float bgcolor; // Background color + float fgcolor; // Fill color + float xpos, ypos; // Starting position of the ball void setup() { - size(640,480); + size(640, 480); // List all the available serial ports - // if using Processing 2.1 or later, use Serial.printArray() + // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); // I know that the first port in the serial list on my Mac is always my @@ -114,25 +112,25 @@ void establishContact() { // read the serial buffer: String myString = myPort.readStringUntil('\n'); // if you got any bytes other than the linefeed: - myString = trim(myString); - - // split the string at the commas and convert the sections into integers: - int sensors[] = int(split(myString, ',')); - - // print out the values you got: - for (int sensorNum = 0; sensorNum < sensors.length; sensorNum++) { - print("Sensor " + sensorNum + ": " + sensors[sensorNum] + "\t"); - } - // add a linefeed after all the sensor values are printed: - println(); - if (sensors.length > 1) { - xpos = map(sensors[0], 0,1023,0,width); - ypos = map(sensors[1], 0,1023,0,height); - fgcolor = sensors[2]; - } - // send a byte to ask for more data: - myPort.write("A"); + myString = trim(myString); + + // split the string at the commas and convert the sections into integers: + int sensors[] = int(split(myString, ',')); + + // print out the values you got: + for (int sensorNum = 0; sensorNum < sensors.length; sensorNum++) { + print("Sensor " + sensorNum + ": " + sensors[sensorNum] + "\t"); + } + // add a linefeed after all the sensor values are printed: + println(); + if (sensors.length > 1) { + xpos = map(sensors[0], 0, 1023, 0, width); + ypos = map(sensors[1], 0, 1023, 0, height); + fgcolor = sensors[2]; } + // send a byte to ask for more data: + myPort.write("A"); + } */ diff --git a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino index cba36eda28d..085f75be35a 100644 --- a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino +++ b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino @@ -76,7 +76,7 @@ void loop() { float[] colors = float(split(inString, ",")); // if the array has at least three elements, you know you got the whole // thing. Put the numbers in the color variables: - if (colors.length >=3) { + if (colors.length >= 3) { // map them to the range 0-255: redValue = map(colors[0], 0, 1023, 0, 255); greenValue = map(colors[1], 0, 1023, 0, 255); diff --git a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino index 1b2e0c0dc96..e9279e2d61a 100644 --- a/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino +++ b/build/shared/examples/10.StarterKit_BasicKit/p14_TweakTheArduinoLogo/p14_TweakTheArduinoLogo.ino @@ -33,7 +33,9 @@ void loop() { } /* Processing code for this example + // Tweak the Arduino Logo + // by Scott Fitzgerald // This example code is in the public domain. @@ -95,4 +97,5 @@ void loop() { // draw the Arduino logo image(logo, 0, 0); } + */ From 2e1e1bd47794e34027a3ef42e374d59253e25303 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 14 Jul 2017 18:03:23 -0700 Subject: [PATCH 11/11] Use consistent format for Max/MSP patches included in the built-in example comments --- build/shared/examples/04.Communication/Dimmer/Dimmer.ino | 3 ++- build/shared/examples/04.Communication/Graph/Graph.ino | 3 ++- .../04.Communication/PhysicalPixel/PhysicalPixel.ino | 6 ++---- .../SerialCallResponse/SerialCallResponse.ino | 5 +---- .../SerialCallResponseASCII/SerialCallResponseASCII.ino | 3 +-- .../VirtualColorMixer/VirtualColorMixer.ino | 3 +-- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino index 969d3363a35..1388e0f109d 100644 --- a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino +++ b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino @@ -110,4 +110,5 @@ D6YmX6fMznaF7kdczmJXwm.XSOOrdoHhNA7GMiZYLZZR.+4lconMaJP6JOZ8 ftCs1YWHZI3o.sIXezX5ihMSuXzZtk3ai1mXRSczoCS32hAydeyXNEu5SHyS xqZqbd3ZLdera1iPqYxOm++v7SUSz -----------end_max5_patcher----------- - */ + +*/ diff --git a/build/shared/examples/04.Communication/Graph/Graph.ino b/build/shared/examples/04.Communication/Graph/Graph.ino index 1fba39cf3c4..20ad590b375 100644 --- a/build/shared/examples/04.Communication/Graph/Graph.ino +++ b/build/shared/examples/04.Communication/Graph/Graph.ino @@ -109,6 +109,7 @@ void loop() { */ /* Max/MSP v5 patch for this example + ----------begin_max5_patcher---------- 1591.3oc0YszbaaCD9r7uBL5RalQUAO3CvdyS5zVenWZxs5NcfHgjPCIfJIT RTxj+6AOHkoTDooroUs0AQPR73a+1cwtK3WtZxzEpOwqlB9YveAlL4KWMYh6 @@ -148,4 +149,4 @@ RnMj5vGl1Fs16drnk7Tf1XOLgv1n0d2iEsCxR.eQsNOZ4FGF7whofgfI3kES HJ5hhnng3h9HPj4lud02.1bxGw. -----------end_max5_patcher----------- - */ +*/ diff --git a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino index 645bc5dfd91..4831fd2282c 100644 --- a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino +++ b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino @@ -115,8 +115,7 @@ void loop() { */ -/* -Max/MSP version 5 patch to run with this example: +/* Max/MSP version 5 patch to run with this example: ----------begin_max5_patcher---------- 1672.3oc2ZszaaiCD9ryuBBebQVCQRYao8xhf1cQCPVfBzh8RRQ.sDsM2HSZ @@ -159,5 +158,4 @@ hN97JSnSfLUXGUoj6ujWXd6Pk1SAC+Pkogm.tZ.1lX1qL.pe6PE11DPeMMZ2 .P0K+3peBt3NskC -----------end_max5_patcher----------- - - */ +*/ diff --git a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino index 19ed9bbe494..880e899e5ae 100644 --- a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino +++ b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino @@ -142,8 +142,7 @@ void establishContact() { */ -/* -Max/MSP version 5 patch to run with this example: +/* Max/MSP version 5 patch to run with this example: ----------begin_max5_patcher---------- 3908.3oc6ckziiaiE9b0+J3XjCIXpp.WzZNMURv.jCInQ5fYNjNngrDssRKK @@ -235,6 +234,4 @@ UB9onw9mlFQ10fhpZBaDatcMTTEGcJpwzqg92qqiVtM6Cu0IRQ0ndEdfCAqV l0qYAUmPrctbxO4XCuPMa1asYzKDks1D52ZCne6Mednz9qW8+.vfqkDA -----------end_max5_patcher----------- - - */ diff --git a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino index bb5b87ad0a9..78edcb74024 100644 --- a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino +++ b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino @@ -134,9 +134,8 @@ void establishContact() { */ -/* +/* Max/MSP version 5 patch to run with this example: -Max/MSP version 5 patch to run with this example: ----------begin_max5_patcher---------- 3640.3oc6cs0jZajE94Y9UzKkeHoVloTeSHkm1II0VkeHIthSs6C1obIjZ.E KjHRhY7jT4+9d5KBj.jTCAXfoV6x.sj5VmyWet127ed6MCFm8EQw.z2f9.5l diff --git a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino index 085f75be35a..4124074ec76 100644 --- a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino +++ b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino @@ -126,5 +126,4 @@ ASi6Zyw8.RQi65J8ZsNx3ho93OhGWENtWpowepae4YhCFeLErOLENtXJrOSc iadi39rf4hwc8xdhHz3gn3dBI7iDRlFe8huAfIZhq -----------end_max5_patcher----------- - - */ +*/