void setup(){
Serial.begin(9600);
}
void loop(){
if (Serial.available()){
delay(500);
Serial.print(Serial.read());
}
}
Huh - either can be highlighted & copied into the Arduino IDE - the color and bold tags seem to be ignored. Not sure what other editors/IDEs might do.
void setup (){
Serial .begin(9600);
}
void loop (){
if (Serial .available()){
delay(500);
Serial .print(Serial .read());
}
}
Not this mess tho - not sure what'd it be useful for.
void setup (){
Serial .begin (9600);
}
void loop (){
if (Serial .available ()){
delay (500);
Serial .print (Serial .read ());
}
}
you can do this
void setup(){
Serial.begin(9600);
}
void loop(){
if (Serial.available()){
delay(500);
Serial.print(Serial.read());
}
}
[ code=Arduino]
or
[ code=Processing]
void setup(){
Serial.begin(9600);
}
void loop(){
if (Serial.available()){
delay(500);
Serial.print(Serial.read());
}
}
but no syntax HL yet
a variation ...
void setup()
{
Serial.begin(9600);
}
...
cmiyc
July 26, 2013, 3:05pm
4
CrossRoads:
Not this mess tho - not sure what'd it be useful for.
Makes it easy to paste into HTML:
http://www.baldengineer.com/projects/arduino-copypaste-test/
Thanks for the comments. Can do interesting things with the code tags.
I tried pasting HTML into Nvu, which is a web page editor, and did't see that it did anything useful when I previewed the page.
cmiyc
July 26, 2013, 3:13pm
6
Make sure it knows you're pasting HTML and not text.
With paste special, or similar? I'll try that. Thanks.
e.g. if you use [ php] you can get (PHP) syntax highlighting ! - as PHP and C++ are close enough it is almost useful.
drawback - it does not create the scrollbar
void setup()
{
Serial.begin(9600); // adjust baudrate as needed
}
cmiyc
July 27, 2013, 5:18pm
9
CrossRoads:
With paste special, or similar? I'll try that. Thanks.
I don't know how Nvu works.
In my wordpress example I pasted the code into the text editor and then in the html editor.