Clear all

Sticky post for editing?  


Honorable Member
Joined: 1 year ago
Posts: 504
2019-10-20 8:43 pm  

I noticed that a lot of beginners do not know how to insert source code or even images.  It seems to me an easy to see on first entering the forum would be a sticky read me first post for beginners (or those like me who forget) on editing posts instead of these explanations being buried somewhere like,


This topic was modified 1 year ago by robotBuilder

Robo Pi
Robotics Engineer Moderator
Joined: 1 year ago
Posts: 1794
2019-10-20 9:01 pm  
Posted by: @casey

how to insert source code

Different people appear to be using different methods for posting source code.

My personal preferred method of posing Arduino source code is the following:

1. Select the code to be posted in the Arduino IDE.

2. Right-click on  the selected code and choose "Copy as HTML" from the pop-up menu.

3. Then in the forum editor window  choose the source code icon {:} at the top of the editor.

4. Paste the  HTML code into the pop-up window and select ok.

5. You can then select "Preview" at the bottom of the post editor to see exactly how the code will appear when posted.

This method preserves both the alignment and the color formatting of the Arduino code.

Here's a code snippet example:

void setup()
  pinMode(strb, OUTPUT);
  pinMode(clk, OUTPUT);
  pinMode(data, OUTPUT);
  sendCommand(0x88);  // activate and set brightness to low (change to 0x8f for full brightness)


Of course, this isn't going to work for someone who isn't using the Arduino IDE.  It also may not work for other computer languages such as Python, etc.

As I say, there are many ways this can be done.  Some prettier than others.

But yeah, I agree there should be a single sticky thread that we can just point to anytime anyone asks how to post code or an image.   Maybe multiple methods of posting code and images could be described.   If the image is already on the web you can just point to it by URL.  Otherwise you need to use the attach file feature to upload it.

That thread should also include how to post YouTube videos.  That's actually quite easy.  Just copy and past the URL to the  YouTube video into the post text editor and it will post the video automatically.

DroneBot Workshop Robotics Engineer

M4krD4d liked
Honorable Member
Joined: 1 year ago
Posts: 500
2019-10-21 3:55 am  


Nice one!