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

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.");
}