New Module: Syntax highlighting
Submitted by sysadmin on Sun, 01/29/2012 - 17:33
In an effort to make source code included in projects more readable we've added Syntax Highlighting.
Syntax highlight code surrounded by the <pre class="brush: lang">...</pre> tags, where lang is one of the following language brushes: diff, jscript, java, perl, php, python, ruby. See the site for additional help.
For example:
// This code turns a led on/off through a debounced switch #include#define SWITCH 5 #define LED 13 // Instantiate a Debounce object with a 20 millisecond debounce time Debounce debouncer = Debounce( 20 , SWITCH ); void setup() { pinMode(SWITCH,INPUT); pinMode(LED,OUTPUT); } void loop() { // Update the debouncer debouncer.update ( ); // Get the update value digitalWrite(LED, debouncer.read() ); }
This was created with
<pre class="brush: java">
code
</pre>
Now that I can create schematics and display code in a visually pleasing way, check out what I've done to the Telemetry Demo project page.
- Log in to post comments