mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-30 19:52:13 +01:00
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.
This commit is contained in:
parent
827a933eed
commit
499c424d59
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
- 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
|
||||
- Note: because most Arduinos have a built-in LED attached
|
||||
to pin 13 on the board, the LED is optional.
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 <dam@mellis.org>
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user