Arduino Code Printer
Pieter P
This is a simple tool for printing Arduino code with line numbers and syntax highlighting.
By default, lines of code that only contain comments with lines (
- Select the code in the Arduino IDE
- Right click the selection, and choose "Copy as HTML"
- Paste the code here
- Emphasize some lines if you want to (see below)
- Click "Print", or copy the generated HTML
Emphasize code
You can use this tool to emphasize certain lines. Other lines will be grayed out.- Add three asterisks (***) before the lines you want to emphasize
- Check the box below
Add page breaks
You can add a page break after a line by adding three dashes (---) at the end of the line.By default, lines of code that only contain comments with lines (
//---
or //===
or
//___
) will be replaced by page breaks as well.
Settings
Title: | |
Author: |
Raw HTML code
Formatted HTML code
Result
Control Surface Example
PieterP#include <Control_Surface.h> // Include the Control Surface library
// Instantiate a MIDI over USB interface.
USBMIDI_Interface midi;
// Instantiate a CCPotentiometer object
CCPotentiometer potentiometer = {
A0, // Analog pin connected to potentiometer
{MIDI_CC::Channel_Volume, CHANNEL_1}, // Channel volume of channel 1
};
void setup() {
Control_Surface.begin(); // Initialize Control Surface
}
void loop() {
Control_Surface.loop(); // Update the Control Surface
}