Let's Make Robots!

how do i post code

hello all,

i have been coding this bot for a month now. i have progressed, and now i want to show to code to others for peer review.

 

how do i post code? i could not attach it as a file. (ino file)

 

best.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Go here- http://letsmakerobots.com/node/33446. All you'll need to know how to post code.

(Nils's solution had more to do with copying formatted code snippets from the Arduino environs into a forum post for debugging or for demonstrating a method.  It probably wouldn't be as useful for a full program with several subroutines and other IDEs don't have the option he's talking about.  Also it doesn't always work-my Mac is notoriously resistant to doing this.  However, it really is a cool thing to put into your post!)

  1. Disable rich text
  2. Copy the whole code to the clipboard
  3. Use HTML tags "<code> and </code>" to make the browser understand that its preformatted code.
  4. Copy your whole code back in between those tags.

However, as Nils points out, the formatting is one thing that's cumbersome and the color coding may go. Doing it the way he suggests is better. As for the code supported, I don't know if it supports basic, but it supports most of the kind of codes so I thought I'll post this link (yes its cool!!).

Attachment settings are different for the forums and Robot projects. If you post a project chances are you'll be able to attach the code as a .pde or a .c file.

I would almost say create a github account and post your code there, then post a link to it here. This way you could maintain the code in a more formalized manner and have a history of all of your changes...

 

 

You could copy it to a .txt file and upload that. 

I don't know how to put it in a post either but one way to share it would be to upload it to pastebin.com (public paste of course) and then put a link in your post