Use consistent formatting style for Processing code included in built-in example comments

This commit is contained in:
per1234 2017-07-14 17:54:32 -07:00 committed by Cristian Maglie
parent 18b5327da0
commit abc9a8917d
7 changed files with 95 additions and 97 deletions

View File

@ -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.
@ -78,6 +80,7 @@ void loop() {
// a single byte
port.write(mouseX);
}
*/
/* Max/MSP v5 patch for this example

View File

@ -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');

View File

@ -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;
@ -87,11 +85,9 @@ void loop() {
// 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()
{
void draw() {
background(0);
// Test if the cursor is over the box
@ -117,7 +113,6 @@ void loop() {
rect(boxX, boxY, boxSize, boxSize);
}
*/
/*

View File

@ -64,8 +64,7 @@ void establishContact() {
}
}
/*
Processing sketch to run with this example:
/* Processing sketch to run with this example:
// This example code is in the public domain.
@ -140,6 +139,7 @@ void establishContact() {
}
}
}
*/
/*

View File

@ -66,9 +66,7 @@ void establishContact() {
}
}
/*
Processing code to run with this example:
/* Processing code to run with this example:
// This example code is in the public domain.

View File

@ -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);
}
*/