Skip to content

Commit 448222e

Browse files
committed
added toInt() function to WString
1 parent 901319b commit 448222e

File tree

4,031 files changed

+965764
-0
lines changed

Some content is hidden

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

4,031 files changed

+965764
-0
lines changed

SD examples/datalogger/datalogger.pde

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
SD card datalogger
3+
4+
This example shows how to log data from three analog sensors
5+
to an SD card using the SD library.
6+
7+
The circuit:
8+
* analog sensors on analog ins 0, 1, and 2
9+
* SD card attached to SPI bus as follows:
10+
** MOSI - pin 11
11+
** MISO - pin 12
12+
** CLK - pin 13
13+
** CS - pin 4
14+
15+
created 24 Nov 2010
16+
by Tom Igoe
17+
18+
This example code is in the public domain.
19+
20+
*/
21+
22+
#include <SD.h>
23+
24+
// On the Ethernet Shield, CS is pin 4. Note that even if it's not
25+
// used as the CS pin, the hardware CS pin (10 on most Arduino boards,
26+
// 53 on the Mega) must be left as an output or the SD library
27+
// functions will not work.
28+
const int chipSelect = 4;
29+
30+
void setup()
31+
{
32+
Serial.begin(9600);
33+
Serial.print("Initializing SD card...");
34+
35+
// see if the card is present and can be initialized:
36+
if (!SD.begin(chipSelect)) {
37+
Serial.println("Card failed, or not present");
38+
// don't do anything more:
39+
return;
40+
}
41+
Serial.println("card initialized.");
42+
}
43+
44+
void loop()
45+
{
46+
// make a string for assembling the data to log:
47+
String dataString = "";
48+
49+
// read three sensors and append to the string:
50+
for (int analogPin = 0; analogPin < 3; analogPin++) {
51+
int sensor = analogRead(analogPin);
52+
dataString += String(sensor);
53+
if (analogPin < 2) {
54+
dataString += ",";
55+
}
56+
}
57+
58+
// open the file:
59+
File dataFile = SD.open("datalog.txt", true, true);
60+
61+
// if the file is available, write to it:
62+
if (dataFile) {
63+
dataFile.println(dataString);
64+
dataFile.close();
65+
// print to the serial port too:
66+
Serial.println(dataString);
67+
}
68+
// if the file isn't open, pop up an error:
69+
else {
70+
Serial.println("error opening datalog.txt");
71+
}
72+
}
73+
74+
75+
76+
77+
78+
79+
80+
81+

app/bin/processing/app/Base$1.class

803 Bytes
Binary file not shown.

app/bin/processing/app/Base$10.class

1.5 KB
Binary file not shown.

app/bin/processing/app/Base$11.class

747 Bytes
Binary file not shown.

app/bin/processing/app/Base$2.class

778 Bytes
Binary file not shown.

app/bin/processing/app/Base$3.class

723 Bytes
Binary file not shown.

app/bin/processing/app/Base$4.class

971 Bytes
Binary file not shown.

app/bin/processing/app/Base$5.class

1.02 KB
Binary file not shown.

app/bin/processing/app/Base$6.class

1.39 KB
Binary file not shown.

app/bin/processing/app/Base$7.class

944 Bytes
Binary file not shown.

app/bin/processing/app/Base$8.class

1001 Bytes
Binary file not shown.

app/bin/processing/app/Base$9.class

925 Bytes
Binary file not shown.

app/bin/processing/app/Base.class

37.1 KB
Binary file not shown.
Binary file not shown.

app/bin/processing/app/Editor$1.class

807 Bytes
Binary file not shown.
730 Bytes
Binary file not shown.
726 Bytes
Binary file not shown.
795 Bytes
Binary file not shown.
801 Bytes
Binary file not shown.
734 Bytes
Binary file not shown.
727 Bytes
Binary file not shown.
891 Bytes
Binary file not shown.
805 Bytes
Binary file not shown.
728 Bytes
Binary file not shown.
900 Bytes
Binary file not shown.

app/bin/processing/app/Editor$2.class

1.41 KB
Binary file not shown.
841 Bytes
Binary file not shown.
878 Bytes
Binary file not shown.
885 Bytes
Binary file not shown.
902 Bytes
Binary file not shown.
754 Bytes
Binary file not shown.
751 Bytes
Binary file not shown.
755 Bytes
Binary file not shown.
749 Bytes
Binary file not shown.
889 Bytes
Binary file not shown.
743 Bytes
Binary file not shown.

app/bin/processing/app/Editor$3.class

903 Bytes
Binary file not shown.
793 Bytes
Binary file not shown.
795 Bytes
Binary file not shown.
724 Bytes
Binary file not shown.
824 Bytes
Binary file not shown.
809 Bytes
Binary file not shown.
809 Bytes
Binary file not shown.
943 Bytes
Binary file not shown.
829 Bytes
Binary file not shown.
737 Bytes
Binary file not shown.
742 Bytes
Binary file not shown.

app/bin/processing/app/Editor$4.class

791 Bytes
Binary file not shown.
742 Bytes
Binary file not shown.
862 Bytes
Binary file not shown.
817 Bytes
Binary file not shown.
1.42 KB
Binary file not shown.
604 Bytes
Binary file not shown.
1.39 KB
Binary file not shown.

app/bin/processing/app/Editor$5.class

798 Bytes
Binary file not shown.

app/bin/processing/app/Editor$6.class

827 Bytes
Binary file not shown.

app/bin/processing/app/Editor$7.class

732 Bytes
Binary file not shown.

app/bin/processing/app/Editor$8.class

732 Bytes
Binary file not shown.

app/bin/processing/app/Editor$9.class

733 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.54 KB
Binary file not shown.
Binary file not shown.
939 Bytes
Binary file not shown.
Binary file not shown.
940 Bytes
Binary file not shown.
949 Bytes
Binary file not shown.
944 Bytes
Binary file not shown.
941 Bytes
Binary file not shown.
945 Bytes
Binary file not shown.
952 Bytes
Binary file not shown.
957 Bytes
Binary file not shown.
957 Bytes
Binary file not shown.
Binary file not shown.
1.69 KB
Binary file not shown.

app/bin/processing/app/Editor.class

37.4 KB
Binary file not shown.
839 Bytes
Binary file not shown.
Binary file not shown.
5.02 KB
Binary file not shown.
1.07 KB
Binary file not shown.
661 Bytes
Binary file not shown.
664 Bytes
Binary file not shown.
664 Bytes
Binary file not shown.
774 Bytes
Binary file not shown.
6.14 KB
Binary file not shown.
2.36 KB
Binary file not shown.
4.38 KB
Binary file not shown.
525 Bytes
Binary file not shown.
864 Bytes
Binary file not shown.
1.54 KB
Binary file not shown.
4.71 KB
Binary file not shown.
5.89 KB
Binary file not shown.
632 Bytes
Binary file not shown.
488 Bytes
Binary file not shown.
515 Bytes
Binary file not shown.
618 Bytes
Binary file not shown.
4.54 KB
Binary file not shown.
1.46 KB
Binary file not shown.
604 Bytes
Binary file not shown.

app/bin/processing/app/Platform.class

2.06 KB
Binary file not shown.
929 Bytes
Binary file not shown.
885 Bytes
Binary file not shown.
512 Bytes
Binary file not shown.
482 Bytes
Binary file not shown.
455 Bytes
Binary file not shown.
482 Bytes
Binary file not shown.
772 Bytes
Binary file not shown.
10.5 KB
Binary file not shown.
582 Bytes
Binary file not shown.
1.41 KB
Binary file not shown.

app/bin/processing/app/Serial.class

8.66 KB
Binary file not shown.
371 Bytes
Binary file not shown.
495 Bytes
Binary file not shown.
533 Bytes
Binary file not shown.
769 Bytes
Binary file not shown.
769 Bytes
Binary file not shown.
749 Bytes
Binary file not shown.
1.25 KB
Binary file not shown.
977 Bytes
Binary file not shown.
6.73 KB
Binary file not shown.
Binary file not shown.

app/bin/processing/app/Sketch.class

26.2 KB
Binary file not shown.
3.6 KB
Binary file not shown.

app/bin/processing/app/Theme.class

3.76 KB
Binary file not shown.
2.57 KB
Binary file not shown.
1.12 KB
Binary file not shown.
1.55 KB
Binary file not shown.
6.44 KB
Binary file not shown.
Binary file not shown.
753 Bytes
Binary file not shown.
13.4 KB
Binary file not shown.
130 Bytes
Binary file not shown.
1.34 KB
Binary file not shown.
1002 Bytes
Binary file not shown.
Binary file not shown.
191 Bytes
Binary file not shown.
2.17 KB
Binary file not shown.
2.4 KB
Binary file not shown.
5.03 KB
Binary file not shown.
1.43 KB
Binary file not shown.
2.46 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
3.09 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8.12 KB
Binary file not shown.
819 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.5 KB
Binary file not shown.
2.17 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.95 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.02 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3.52 KB
Binary file not shown.
8.66 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
892 Bytes
Binary file not shown.
Binary file not shown.
721 Bytes
Binary file not shown.
602 Bytes
Binary file not shown.
629 Bytes
Binary file not shown.
748 Bytes
Binary file not shown.
835 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6.97 KB
Binary file not shown.
900 Bytes
Binary file not shown.
636 Bytes
Binary file not shown.
681 Bytes
Binary file not shown.
664 Bytes
Binary file not shown.
549 Bytes
Binary file not shown.
536 Bytes
Binary file not shown.
549 Bytes
Binary file not shown.
7.27 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
2.08 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
213 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3.77 KB
Binary file not shown.
631 Bytes
Binary file not shown.
364 Bytes
Binary file not shown.
Binary file not shown.
4.65 KB
Binary file not shown.
Binary file not shown.
5.74 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
255 Bytes
Binary file not shown.
250 Bytes
Binary file not shown.
1.56 KB
Binary file not shown.
259 Bytes
Binary file not shown.

app/pde.jar

309 KB
Binary file not shown.

build/macosx/work/.DS_Store

6 KB
Binary file not shown.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
3+
<plist version="0.9">
4+
<dict>
5+
<key>CFBundleName</key>
6+
<string>Arduino</string>
7+
8+
<!-- all these need to change for new releases -->
9+
<key>CFBundleGetInfoString</key>
10+
<string>0022</string>
11+
<key>CFBundleVersion</key>
12+
<string>0022</string>
13+
<key>CFBundleShortVersionString</key>
14+
<string>0022</string>
15+
<!-- now stop changing things and get outta here -->
16+
17+
<key>CFBundleAllowMixedLocalizations</key>
18+
<string>true</string>
19+
<key>CFBundleExecutable</key>
20+
<string>JavaApplicationStub</string>
21+
<key>CFBundleDevelopmentRegion</key>
22+
<string>English</string>
23+
<key>CFBundlePackageType</key>
24+
<string>APPL</string>
25+
<key>CFBundleSignature</key>
26+
<string>Pde1</string>
27+
<key>CFBundleInfoDictionaryVersion</key>
28+
<string>6.0</string>
29+
<key>CFBundleIconFile</key>
30+
<string>processing.icns</string>
31+
<key>CFBundleIdentifier</key>
32+
<string>cc.arduino.Arduino</string>
33+
<key>CFBundleDocumentTypes</key>
34+
<array>
35+
<dict>
36+
<key>CFBundleTypeExtensions</key>
37+
<array>
38+
<string>pde</string>
39+
<string>java</string>
40+
</array>
41+
<key>CFBundleTypeIconFile</key>
42+
<string>pde.icns</string>
43+
<key>CFBundleTypeName</key>
44+
<string>Processing Source File</string>
45+
<key>CFBundleTypeMIMETypes</key>
46+
<array>
47+
<string>text/plain</string>
48+
</array>
49+
<key>CFBundleTypeOSTypes</key>
50+
<array>
51+
<string>TEXT</string>
52+
</array>
53+
<key>CFBundleTypeRole</key>
54+
<string>Editor</string>
55+
</dict>
56+
</array>
57+
<key>Java</key>
58+
<dict>
59+
<key>VMOptions</key>
60+
<array>
61+
<string>-Xms128M</string>
62+
<string>-Xmx256M</string>
63+
</array>
64+
65+
<key>MainClass</key>
66+
<string>processing.app.Base</string>
67+
68+
<key>JVMVersion</key>
69+
<string>1.5*</string>
70+
71+
<key>ClassPath</key>
72+
<!-- In 0149, removed /System/Library/Java from the CLASSPATH because
73+
it can cause problems if users have installed weird files there.
74+
http://dev.processing.org/bugs/show_bug.cgi?id=1045 -->
75+
<string>$JAVAROOT/pde.jar:$JAVAROOT/core.jar:$JAVAROOT/antlr.jar:$JAVAROOT/ecj.jar:$JAVAROOT/registry.jar:$JAVAROOT/quaqua.jar:$JAVAROOT/RXTXcomm.jar</string>
76+
77+
<key>JVMArchs</key>
78+
<array>
79+
<!--<string>x86_64</string>--> <!-- currently no 64 bit support -->
80+
<string>i386</string>
81+
<string>ppc</string>
82+
</array>
83+
84+
<!-- More properties can be found in http://developer.apple.com/releasenotes/Java/java141/system_properties/chapter_4_section_1.html#//apple_ref/doc/uid/TP30000285 -->
85+
<key>Properties</key>
86+
<dict>
87+
<!-- Pass the full path of Contents/Resources/Java to the PDE -->
88+
<key>javaroot</key>
89+
<string>$JAVAROOT</string>
90+
91+
<!-- as of 1.0.8, it's safe to use this option again -->
92+
<key>apple.laf.useScreenMenuBar</key>
93+
<string>true</string>
94+
95+
<key>apple.awt.showGrowBox</key>
96+
<string>false</string>
97+
<key>com.apple.smallTabs</key>
98+
<string>true</string>
99+
<key>apple.awt.Antialiasing</key>
100+
<string>false</string>
101+
<key>apple.awt.TextAntialiasing</key>
102+
<string>true</string>
103+
<key>com.apple.hwaccel</key>
104+
<string>true</string>
105+
<key>apple.awt.use-file-dialog-packages</key>
106+
<string>false</string>
107+
<key>apple.awt.graphics.UseQuartz</key>
108+
<string>true</string>
109+
</dict>
110+
</dict>
111+
</dict>
112+
</plist>
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
APPLPde1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
AnalogReadSerial
3+
Reads an analog input on pin 0, prints the result to the serial monitor
4+
5+
This example code is in the public domain.
6+
*/
7+
8+
void setup() {
9+
Serial.begin(9600);
10+
}
11+
12+
void loop() {
13+
int sensorValue = analogRead(A0);
14+
Serial.println(sensorValue, DEC);
15+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
void setup() {
2+
// put your setup code here, to run once:
3+
4+
}
5+
6+
void loop() {
7+
// put your main code here, to run repeatedly:
8+
9+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
Blink
3+
Turns on an LED on for one second, then off for one second, repeatedly.
4+
5+
This example code is in the public domain.
6+
*/
7+
8+
void setup() {
9+
// initialize the digital pin as an output.
10+
// Pin 13 has an LED connected on most Arduino boards:
11+
pinMode(13, OUTPUT);
12+
}
13+
14+
void loop() {
15+
digitalWrite(13, HIGH); // set the LED on
16+
delay(1000); // wait for a second
17+
digitalWrite(13, LOW); // set the LED off
18+
delay(1000); // wait for a second
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
DigitalReadSerial
3+
Reads a digital input on pin 2, prints the result to the serial monitor
4+
5+
This example code is in the public domain.
6+
*/
7+
8+
void setup() {
9+
Serial.begin(9600);
10+
pinMode(2, INPUT);
11+
}
12+
13+
void loop() {
14+
int sensorValue = digitalRead(2);
15+
Serial.println(sensorValue, DEC);
16+
}
17+
18+
19+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
Fade
3+
4+
This example shows how to fade an LED on pin 9
5+
using the analogWrite() function.
6+
7+
This example code is in the public domain.
8+
9+
*/
10+
int brightness = 0; // how bright the LED is
11+
int fadeAmount = 5; // how many points to fade the LED by
12+
13+
void setup() {
14+
// declare pin 9 to be an output:
15+
pinMode(9, OUTPUT);
16+
}
17+
18+
void loop() {
19+
// set the brightness of pin 9:
20+
analogWrite(9, brightness);
21+
22+
// change the brightness for next time through the loop:
23+
brightness = brightness + fadeAmount;
24+
25+
// reverse the direction of the fading at the ends of the fade:
26+
if (brightness == 0 || brightness == 255) {
27+
fadeAmount = -fadeAmount ;
28+
}
29+
// wait for 30 milliseconds to see the dimming effect
30+
delay(30);
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/* Blink without Delay
2+
3+
Turns on and off a light emitting diode(LED) connected to a digital
4+
pin, without using the delay() function. This means that other code
5+
can run at the same time without being interrupted by the LED code.
6+
7+
The circuit:
8+
* LED attached from pin 13 to ground.
9+
* Note: on most Arduinos, there is already an LED on the board
10+
that's attached to pin 13, so no hardware is needed for this example.
11+
12+
13+
created 2005
14+
by David A. Mellis
15+
modified 8 Feb 2010
16+
by Paul Stoffregen
17+
18+
This example code is in the public domain.
19+
20+
21+
http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
22+
*/
23+
24+
// constants won't change. Used here to
25+
// set pin numbers:
26+
const int ledPin = 13; // the number of the LED pin
27+
28+
// Variables will change:
29+
int ledState = LOW; // ledState used to set the LED
30+
long previousMillis = 0; // will store last time LED was updated
31+
32+
// the follow variables is a long because the time, measured in miliseconds,
33+
// will quickly become a bigger number than can be stored in an int.
34+
long interval = 1000; // interval at which to blink (milliseconds)
35+
36+
void setup() {
37+
// set the digital pin as output:
38+
pinMode(ledPin, OUTPUT);
39+
}
40+
41+
void loop()
42+
{
43+
// here is where you'd put code that needs to be running all the time.
44+
45+
// check to see if it's time to blink the LED; that is, if the
46+
// difference between the current time and last time you blinked
47+
// the LED is bigger than the interval at which you want to
48+
// blink the LED.
49+
unsigned long currentMillis = millis();
50+
51+
if(currentMillis - previousMillis > interval) {
52+
// save the last time you blinked the LED
53+
previousMillis = currentMillis;
54+
55+
// if the LED is off turn it on and vice-versa:
56+
if (ledState == LOW)
57+
ledState = HIGH;
58+
else
59+
ledState = LOW;
60+
61+
// set the LED with the ledState of the variable:
62+
digitalWrite(ledPin, ledState);
63+
}
64+
}
65+

0 commit comments

Comments
 (0)