The preferred mode for posting Arduino code is to use a SyntaxHighlighter Code block type, setting the “Code Language” to “C / C++” in the properties (on the right). That way the code can be cut and pasted, has line numbers, and colored keywords for legibility.
SyntaxHighlighter Code Block
1 2 3 4 5 6 7 8 | void setup( void ) { Serial.begin(9600); } void loop( void ) { Serial.println( "Hello, world." ); } |
Plain “Code” Block Sample
The default “Code” block style isn’t very readable with this site template, see below. Please avoid this style.
void setup(void)
{
Serial.begin(9600);
}
void loop(void)
{
Serial.println("Hello, world.");
}
Leave a Reply
You must be logged in to post a comment.