The structure of the code itself is also quite easy to figure out, as Arduino Software (IDE) comes with example code saved into the workshop itself. In its most basic form, however, the structure is really just setup and a main function. Setup is usually written before any other functions, but the order of code doesn't really matter. It is denoted:
void setup( ) {
/*Any code can be written here, this line is commented out with slash marks
*/
}
The main function is usually a loop written as:
void loop( ) {
/*Also, Arduino Software (IDE) will automatically indent lines in functions
*/
}
Other functions can be written by following the format "void name() { }" where name can be replaced by any function name which can be called later simply using "name();". The closed parentheses after the name of the function allow for any input required for that function. From there, the examples and references can be used to create a huge variety of programs for arduinos, controlling everything from clocks to robots to recorders.