Putting Code into your Post. [sourcecode] tag
To embed code into your post, just wrap your code in sourcecode tags:
Ref Link:
http://en.support.wordpress.com/code/posting-source-code/
It will look like this:
long randNumber; void setup(){ Serial.begin(9600); // randomSeed(analogRead(0)); } void loop(){ randNumber = random(10); Serial.println(randNumber); delay(50); }
andywallace 5:45 am on February 10, 2011 Permalink |
This is great for little bits of code, but I still think it’s way cleaner to just link to your whole code. Otherwise everybody has to scroll past your entire program.
makingtoys 8:45 pm on February 11, 2011 Permalink |
If we all put the code into the “read more” page break, it will fix what you are describing. We want to actually host the code on this blog, and have it search-able by engines and readers.