| Overview Toolbar Menus Sketchbook Uploading

| ### Overview We've designed a simple and usable editor for writing and running programs. The Wiring Environment (Integrated Development Environment or IDE) has a text editor and compiler for writing programs for the Wiring I/O Board. When the "run" button is clicked, the program compiles. The toolbar provides functionality for compiling programs, creating a new sketch, opening, saving, and exporting to the I/O Board. Additional commands are available through the menus. The message area gives feedback while saving and exporting and also shows the locations of errors when programs are compiled. The text area presents messages and can be written from the I/O Board using with the print() programming function. |

| ### Toolbar The toolbar provides access to the six basic functions of Processing: Run, New, Open, Save, Export, Serial monitor.
|  | Run: Copiles the code
|  | Stop: Terminates any activity on the editor
|  | New: Creates a new sketch. In Wiring, projects are called sketches.
|  | Open: Select and load a pre-existing sketch. A menu opens and you may choose from your own sketchbook, examples, or you can open a sketch from anywhere on your computer or network.
|  | Save: Saves the current sketch into the Processing sketches folder. If you want to give the sketch a name other than the current date, you can choose save As from the File menu.
|  | Upload to I/O Board: Exports the current sketch into the sketchbook and uploads it to the Wiring I/O Board. The directory containing the files is opened. There is more information about uploading below.
|  | Serial monitor: Opens a serial port connection to monitor the data comming from the Wiring I/O Board, this is very useful for debugging and verification.

| ### Menus Additional commands are found within the five menus: File, Edit, Sketch, Tools, Help. The menus are context sensitive which means only those items relevant to the work currently being carried out are available. File New (Ctrl+N) Creates a new sketch, named as the current date is the format "sketch_YYMMDDa". Open (Ctrl+O) Gives the option to open a sketch from anywhere on the local computer or network, the sketchbook, or to open an example. Save (Ctrl+O) Saves the open sketch in it's current state. Save as... (Ctrl+Shift+O) Saves the currently open sketch, with the option of giving it a different name. Does not replace the previous version of the sketch. Upload to I/O Board (Ctrl+U) Be default, exports the program to the Wiring I/O Board. After the files are exported, the directory containing the exported files is opened. There is more information about uploading below. Preferences Allows you to change some of the ways Wiring works. Quit (Ctrl+Q) Exits the Wiring Environment and closes all Wiring windows. Edit The Edit menu provides a series of commands for editing the Wiring files. Undo (Ctrl+Z) Reverses the last command or the last entry typed. Cancel the Undo command by choosing Edit » Redo. Redo (Ctrl+Y) Reverses the action of the last Undo command. This option is only available, if there has already been an Undo action. Cut (Ctrl+X) Removes and copies selected text to the clipboard (an off-screen text buffer) Copy (Ctrl+C) C opies selected text to the clipboard. Paste (Ctrl+V) Inserts the contents of the clipboard at the location of the cursor, and replaces any selected text. Select All (Ctrl+A) Selects all of the text in the file which is currently open in the text editor. Find (Ctrl+F) Finds an occurance of a text string within the file open in the text editor and gives the option to replace it with a different text. Find Next (Ctrl+G) Finds the next occurance of a text string within the file open in the text editor. Sketch Verify/Compile (Ctrl+R) Verify the code (compiles the code) Stop Stops current activity. Add File Opens a file navigator. Select a code files to add it to the sketches "data" directory. Show Sketch Folder Opens the directory for the current sketch. Tools Auto Format Attempts to format the code into a more human-readable layout. Auto Format was previously called Beautify. Serial Port Allows to select which serial port to use as default for uploading code to the Wiring I/O Board or monitor data comming from it. The data coming from the Wiring I/O Board is printed in character format in the text area region of the console. Help Reference Opens the reference in the default Web browser. Includes reference for the language, programming environment, libraries, and a language comparison. Find in Reference (Ctrl+Shift+F) Select a word in your program and select "Find in Reference" to open that reference HTML page. Visit Wiring (Ctrl+5) Opens default Web browser to the Wiring homepage. About Wiring Opens a concise information panel about the software. |

| ### Sketchbook All Wiring projects are called sketches. Each sketch has it's own directory (folder) and inside there is the main program file which has the same name as the sketch. For example, if the name of the sketch is "Sketch_123", the directory for the sketch will be called "Sketch_123" and the main file will be called "Sketch_123.pde". Sketches need other directories inside to contain additional media files and code libraries. Additional code libraries must be placed within a directory entitled "code". When a sketch is exported, all files from the "code" directories are exported into into a single .hex file with the same name as the sketch. For example, if the sketch is named "Sketch_123", the exported file will be called "Sketch_123.hex" Sketches are all kept in the Wiring directory, which will be in different places on your computer or network, depending if you use PC, Mac, or Linux and how you have your preferences set. To locate this directory, select the "Preferences" option in the "File" menu. It is possible to have multiple program divisions in one sketch. Each of these divisions is visible as a tab in the area below the menu. When a program is compiled these divisions are made into one file and compile as a single program. Divisions can also be separate C files (the extension .c) which are compiled together with the Wiring files. To add a new division, click on the arrow to the right of the tabs. You can write functions and classes in new divisions and you can write any C code in files with the .c extension. |

| ### Uploading Uploading creates a version of the sketch that can run within the Wiring I/O Board. When code is exported from Wiring it is changed into C code and then compiled. When a project is uploaded, a series of files are written to an "applet" directory which is created within the primary sketch directory. If the sketch is called "Sketch_123", the applet directory contains for following: Sketch_123.hex HEX file containing all necessary code for the sketch to run on the Wiring I/O Board. Includes the Wiring code as well as those custom to the sketch. Sketch_123.cpp The C++ file generated by the pre-processor from the PDE file. This is the actual file which is compiled into the HEX file by gcc, the C Compiler used in Wiring. Sketch_123.pde The original program file. Every time a sketch is exported, all of the above files are re-written. When a sketch is uploaded, all files (including those in the "code" directoriy) are packed into a single HEX file. Libraries not needed for the application should be deleted before exporting to keep the files size small. |