Skip to content

Commit 83da177

Browse files
committed
Merge branch 'new-extension' of github.com:arduino/Arduino into new-extension
2 parents 85bf425 + 108df37 commit 83da177

File tree

171 files changed

+605
-4517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+605
-4517
lines changed

app/src/processing/app/Base.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,6 +1722,10 @@ static public File selectFolder(String prompt, File folder, Frame frame) {
17221722
* Give this Frame a Processing icon.
17231723
*/
17241724
static public void setIcon(Frame frame) {
1725+
// don't use the low-res icon on Mac OS X; the window should
1726+
// already have the right icon from the .app file.
1727+
if (Base.isMacOS()) return;
1728+
17251729
Image image = Toolkit.getDefaultToolkit().createImage(PApplet.ICON_IMAGE);
17261730
frame.setIconImage(image);
17271731
}

app/src/processing/app/syntax/JEditTextArea.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import javax.swing.text.*;
1818
import javax.swing.undo.*;
1919
import javax.swing.*;
20+
2021
import java.awt.datatransfer.*;
2122
import java.awt.event.*;
2223
import java.awt.*;
@@ -2025,7 +2026,19 @@ public void mouseDragged(MouseEvent evt)
20252026
select(getMarkPosition(),xyToOffset(evt.getX(),evt.getY()));
20262027
}
20272028

2028-
public void mouseMoved(MouseEvent evt) {}
2029+
final Cursor normalCursor = new Cursor(Cursor.DEFAULT_CURSOR);
2030+
final Cursor handCursor = new Cursor(Cursor.HAND_CURSOR);
2031+
2032+
public void mouseMoved(MouseEvent evt) {
2033+
int line = yToLine(evt.getY());
2034+
int offset = xToOffset(line, evt.getX());
2035+
boolean wantHandCursor = checkClickedURL(getLineText(line), offset) != null;
2036+
JComponent src = (JComponent) evt.getSource();
2037+
if (wantHandCursor)
2038+
src.setCursor(handCursor);
2039+
else
2040+
src.setCursor(normalCursor);
2041+
}
20292042
}
20302043

20312044
class FocusHandler implements FocusListener

build/build.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,7 @@
228228
</exec>
229229

230230
<copy todir="macosx/working_dir">
231-
<fileset dir="macosx/work">
232-
<exclude name="**/ArduinoTestSuite/**" />
233-
</fileset>
231+
<fileset dir="macosx/work" />
234232
</copy>
235233

236234
<!-- The ant copy command does not preserve permissions. -->

build/shared/examples/1.Basics/AnalogReadSerial/AnalogReadSerial.pde renamed to build/shared/examples/1.Basics/AnalogReadSerial/AnalogReadSerial.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ void setup() {
1111

1212
void loop() {
1313
int sensorValue = analogRead(A0);
14-
Serial.println(sensorValue, DEC);
14+
Serial.println(sensorValue);
1515
}

build/shared/examples/1.Basics/DigitalReadSerial/DigitalReadSerial.pde renamed to build/shared/examples/1.Basics/DigitalReadSerial/DigitalReadSerial.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void setup() {
1212

1313
void loop() {
1414
int sensorValue = digitalRead(2);
15-
Serial.println(sensorValue, DEC);
15+
Serial.println(sensorValue);
1616
}
1717

1818

build/shared/examples/2.Digital/Button/Button.pde renamed to build/shared/examples/2.Digital/Button/Button.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
1717
created 2005
1818
by DojoDave <http://www.0j0.org>
19-
modified 28 Oct 2010
19+
modified 30 Aug 2011
2020
by Tom Igoe
2121
2222
This example code is in the public domain.

build/shared/examples/2.Digital/Debounce/Debounce.pde renamed to build/shared/examples/2.Digital/Debounce/Debounce.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
created 21 November 2006
1919
by David A. Mellis
20-
modified 3 Jul 2009
20+
modified 30 Aug 2011
2121
by Limor Fried
2222
2323
This example code is in the public domain.

build/shared/examples/2.Digital/StateChangeDetection/StateChangeDetection.pde renamed to build/shared/examples/2.Digital/StateChangeDetection/StateChangeDetection.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
most Arduino boards)
1717
1818
created 27 Sep 2005
19-
modified 14 Oct 2010
19+
modified 30 Aug 2011
2020
by Tom Igoe
2121
2222
This example code is in the public domain.
@@ -57,7 +57,7 @@ void loop() {
5757
buttonPushCounter++;
5858
Serial.println("on");
5959
Serial.print("number of button pushes: ");
60-
Serial.println(buttonPushCounter, DEC);
60+
Serial.println(buttonPushCounter);
6161
}
6262
else {
6363
// if the current state is LOW then the button

build/shared/examples/2.Digital/toneKeyboard/toneKeyboard.pde renamed to build/shared/examples/2.Digital/toneKeyboard/toneKeyboard.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* 8-ohm speaker on digital pin 8
1010
1111
created 21 Jan 2010
12-
Modified 4 Sep 2010
12+
modified 30 Aug 2011
1313
by Tom Igoe
1414
1515
This example code is in the public domain.

build/shared/examples/2.Digital/toneMelody/toneMelody.pde renamed to build/shared/examples/2.Digital/toneMelody/toneMelody.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* 8-ohm speaker on digital pin 8
88
99
created 21 Jan 2010
10-
modified 14 Oct 2010
10+
modified 30 Aug 2011
1111
by Tom Igoe
1212
1313
This example code is in the public domain.

build/shared/examples/2.Digital/tonePitchFollower/tonePitchFollower.pde renamed to build/shared/examples/2.Digital/tonePitchFollower/tonePitchFollower.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* 4.7K resistor on analog 0 to ground
1010
1111
created 21 Jan 2010
12-
Modified 4 Sep 2010
12+
modified 30 Aug 2011
1313
by Tom Igoe
1414
1515
This example code is in the public domain.

build/shared/examples/3.Analog/AnalogInOutSerial/AnalogInOutSerial.pde renamed to build/shared/examples/3.Analog/AnalogInOutSerial/AnalogInOutSerial.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* LED connected from digital pin 9 to ground
1313
1414
created 29 Dec. 2008
15-
Modified 4 Sep 2010
15+
modified 30 Aug 2011
1616
by Tom Igoe
1717
1818
This example code is in the public domain.

build/shared/examples/3.Analog/AnalogInput/AnalogInput.pde renamed to build/shared/examples/3.Analog/AnalogInput/AnalogInput.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
2020
Created by David Cuartielles
21-
Modified 4 Sep 2010
21+
modified 30 Aug 2011
2222
By Tom Igoe
2323
2424
This example code is in the public domain.

build/shared/examples/3.Analog/Calibration/Calibration.pde renamed to build/shared/examples/3.Analog/Calibration/Calibration.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
created 29 Oct 2008
1919
By David A Mellis
20-
Modified 4 Sep 2010
20+
modified 30 Aug 2011
2121
By Tom Igoe
2222
2323
http://arduino.cc/en/Tutorial/Calibration

build/shared/examples/3.Analog/Fading/Fading.pde renamed to build/shared/examples/3.Analog/Fading/Fading.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
Created 1 Nov 2008
1010
By David A. Mellis
11-
Modified 17 June 2009
11+
modified 30 Aug 2011
1212
By Tom Igoe
1313
1414
http://arduino.cc/en/Tutorial/Fading

build/shared/examples/3.Analog/Smoothing/Smoothing.pde renamed to build/shared/examples/3.Analog/Smoothing/Smoothing.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* Analog sensor (potentiometer will do) attached to analog input 0
1111
1212
Created 22 April 2007
13+
modified 30 Aug 2011
1314
By David A. Mellis <dam@mellis.org>
1415
1516
http://www.arduino.cc/en/Tutorial/Smoothing
@@ -59,8 +60,8 @@ void loop() {
5960

6061
// calculate the average:
6162
average = total / numReadings;
62-
// send it to the computer (as ASCII digits)
63-
Serial.println(average, DEC);
63+
// send it to the computer as ASCII digits
64+
Serial.println(average);
6465
}
6566

6667

build/shared/examples/4.Communication/ASCIITable/ASCIITable.pde renamed to build/shared/examples/4.Communication/ASCIITable/ASCIITable.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
created 2006
1313
by Nicholas Zambetti
14-
modified 18 Jan 2009
14+
modified 30 Aug 2011
1515
by Tom Igoe
1616
1717
This example code is in the public domain.

build/shared/examples/4.Communication/Dimmer/Dimmer.pde renamed to build/shared/examples/4.Communication/Dimmer/Dimmer.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
created 2006
1414
by David A. Mellis
15-
modified 14 Apr 2009
15+
modified 30 Aug 2011
1616
by Tom Igoe and Scott Fitzgerald
1717
1818
This example code is in the public domain.

build/shared/examples/4.Communication/Graph/Graph.pde renamed to build/shared/examples/4.Communication/Graph/Graph.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
created 2006
2020
by David A. Mellis
21-
modified 14 Apr 2009
21+
modified 30 Aug 2011
2222
by Tom Igoe and Scott Fitzgerald
2323
2424
This example code is in the public domain.

build/shared/examples/4.Communication/MIDI/Midi.pde renamed to build/shared/examples/4.Communication/MIDI/Midi.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Attach a MIDI cable to the jack, then to a MIDI synth, and play music.
1414
1515
created 13 Jun 2006
16-
modified 2 Jul 2009
16+
modified 30 Aug 2011
1717
by Tom Igoe
1818
1919
This example code is in the public domain.

build/shared/examples/4.Communication/PhysicalPixel/PhysicalPixel.pde renamed to build/shared/examples/4.Communication/PhysicalPixel/PhysicalPixel.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
created 2006
1717
by David A. Mellis
18-
modified 14 Apr 2009
18+
modified 30 Aug 2011
1919
by Tom Igoe and Scott Fitzgerald
2020
2121
This example code is in the public domain.
@@ -59,7 +59,7 @@ void loop() {
5959
6060
// created 2003-4
6161
// based on examples by Casey Reas and Hernando Barragan
62-
// modified 18 Jan 2009
62+
// modified 30 Aug 2011
6363
// by Tom Igoe
6464
// This example code is in the public domain.
6565

build/shared/examples/4.Communication/SerialCallResponse/SerialCallResponse.pde renamed to build/shared/examples/4.Communication/SerialCallResponse/SerialCallResponse.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
Created 26 Sept. 2005
1717
by Tom Igoe
18-
Modified 4 Sep 2010
18+
modified 30 Aug 2011
1919
by Tom Igoe and Scott Fitzgerald
2020
2121
This example code is in the public domain.

build/shared/examples/4.Communication/SerialCallResponseASCII/SerialCallResponseASCII.pde renamed to build/shared/examples/4.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
Created 26 Sept. 2005
2121
by Tom Igoe
22-
Modified 4 Sep 2010
22+
modified 30 Aug 2011
2323
by Tom Igoe and Scott Fitzgerald
2424
2525
This example code is in the public domain.
@@ -52,15 +52,15 @@ void loop()
5252
// delay 10ms to let the ADC recover:
5353
delay(10);
5454
// read second analog input, divide by 4 to make the range 0-255:
55-
secondSensor = analogRead(1)/4;
55+
secondSensor = analogRead(A1)/4;
5656
// read switch, map it to 0 or 255L
5757
thirdSensor = map(digitalRead(2), 0, 1, 0, 255);
5858
// send sensor values:
59-
Serial.print(firstSensor, DEC);
59+
Serial.print(firstSensor);
6060
Serial.print(",");
61-
Serial.print(secondSensor, DEC);
61+
Serial.print(secondSensor);
6262
Serial.print(",");
63-
Serial.println(thirdSensor, DEC);
63+
Serial.println(thirdSensor);
6464
}
6565
}
6666

build/shared/examples/4.Communication/SerialEvent/SerialEvent.ino

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,23 @@ void loop() {
3838
}
3939

4040
/*
41-
SerialEvent occurs whenever a new byte comes in the
42-
hardware serial RX. Don't do complex things here, as the
43-
processor halts the regular program to run this routine:
41+
SerialEvent occurs whenever a new data comes in the
42+
hardware serial RX. This routine is run between each
43+
time loop() runs, so using delay inside loop can delay
44+
response. Multiple bytes of data may be available.
4445
*/
4546
void serialEvent() {
46-
// get the new byte:
47-
char inChar = (char)Serial.read();
48-
// add it to the inputString:
49-
inputString += inChar;
50-
// if the incoming character is a newline, set a flag
51-
// so the main loop can do something about it:
52-
if (inChar == '\n') {
53-
stringComplete = true;
54-
}
47+
while (Serial.available()) {
48+
// get the new byte:
49+
char inChar = (char)Serial.read();
50+
// add it to the inputString:
51+
inputString += inChar;
52+
// if the incoming character is a newline, set a flag
53+
// so the main loop can do something about it:
54+
if (inChar == '\n') {
55+
stringComplete = true;
56+
}
57+
}
5558
}
5659

5760

build/shared/examples/4.Communication/VirtualColorMixer/VirtualColorMixer.pde renamed to build/shared/examples/4.Communication/VirtualColorMixer/VirtualColorMixer.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
created 2 Dec 2006
1212
by David A. Mellis
13-
modified 4 Sep 2010
13+
modified 30 Aug 2011
1414
by Tom Igoe and Scott Fitzgerald
1515
1616
This example code is in the public domain.

build/shared/examples/5.Control/Arrays/Arrays.pde renamed to build/shared/examples/5.Control/Arrays/Arrays.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
created 2006
1515
by David A. Mellis
16-
modified 5 Jul 2009
16+
modified 30 Aug 2011
1717
by Tom Igoe
1818
1919
This example code is in the public domain.

build/shared/examples/5.Control/ForLoopIteration/ForLoopIteration.pde renamed to build/shared/examples/5.Control/ForLoopIteration/ForLoopIteration.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
created 2006
1111
by David A. Mellis
12-
modified 5 Jul 2009
12+
modified 30 Aug 2011
1313
by Tom Igoe
1414
1515
This example code is in the public domain.

build/shared/examples/5.Control/IfStatementConditional/IfStatementConditional.pde renamed to build/shared/examples/5.Control/IfStatementConditional/IfStatementConditional.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
connected to pin 13, so you don't need any extra components for this example.
1717
1818
created 17 Jan 2009
19-
modified 4 Sep 2010
19+
modified 30 Aug 2011
2020
by Tom Igoe
2121
2222
This example code is in the public domain.
@@ -50,7 +50,7 @@ void loop() {
5050
}
5151

5252
// print the analog value:
53-
Serial.println(analogValue, DEC);
53+
Serial.println(analogValue);
5454

5555
}
5656

build/shared/examples/5.Control/WhileStatementConditional/WhileStatementConditional.pde renamed to build/shared/examples/5.Control/WhileStatementConditional/WhileStatementConditional.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* 10K resistor attached from pin 2 to ground
1818
1919
created 17 Jan 2009
20-
modified 4 Sep 2010
20+
modified 30 Aug 2011
2121
by Tom Igoe
2222
2323
This example code is in the public domain.

build/shared/examples/5.Control/switchCase/switchCase.pde renamed to build/shared/examples/5.Control/switchCase/switchCase.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* 10K resistor from analog in 0 to ground
1515
1616
created 1 Jul 2009
17-
modified 4 Sep 2010
17+
modified 30 Aug 2011
1818
by Tom Igoe
1919
2020
This example code is in the public domain.

build/shared/examples/6.Sensors/ADXL3xx/ADXL3xx.pde renamed to build/shared/examples/6.Sensors/ADXL3xx/ADXL3xx.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
created 2 Jul 2008
2121
by David A. Mellis
22-
modified 4 Sep 2010
22+
modified 30 Aug 2011
2323
by Tom Igoe
2424
2525
This example code is in the public domain.

build/shared/examples/6.Sensors/Knock/Knock.pde renamed to build/shared/examples/6.Sensors/Knock/Knock.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
created 25 Mar 2007
1616
by David Cuartielles <http://www.0j0.org>
17-
modified 4 Sep 2010
17+
modified 30 Aug 2011
1818
by Tom Igoe
1919
2020
This example code is in the public domain.

0 commit comments

Comments
 (0)