How to Post Code in the Forum

Please please please please PLEASE!!! When posting code in the forum do not just copy and paste it into your post. Above the box you type into when making a new post or a reply is a whole series of buttons. If you hover your mouse over the 11th button from the left in the top row (The Hash # symbol) you will see it says “Insert Code”. Click on this and then inbetween the two sets of brackets paste your code.

This way your code is captured inside a small box with scrollbars making it easy to read and keeping the size of the whole thread to a minimum. If you don’t do this, the thread turns into pages and pages of code, with lots and lots of mouse wheel scrolling to be done to read it, making it hard work to read and losing its clarity.

Thanks.

Agreed!

//NOT THIS!
void setup(){
Serial.begin(9600);
}

//EITHER THIS
void setup(){
  Serial.begin(9600);
}

//OR THIS
void setup(){
Serial.begin(9600);
}

If the code is very long you can link to a copy paste from http://arduino.pastebin.com/
Like this: http://arduino.pastebin.com/f7cd60d79

:slight_smile:

Alpha how do you get the code coloured like that please?

Arduino IDE → Tools → Copy for forum

Then paste the contents of your clipboard in the forum post editor, and post :slight_smile:

Named ‘Copy for Discourse’ here: http://arduino.cc/en/Guide/Environment

Ahhh. I’ve seen that before but never used it. Thanks.

Isn’t the color allowed one of the differences between “quote” and “code”?

BBUUMMPP!!! >:(