Arduino cheat sheet v02c - Structure void setup() void...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Arduino Cheat Sheet V.02c Mostly taken from the extended reference: http://arduino.cc/en/Reference/Extended Gavin Smith – Robots and Dinosaurs, The Sydney Hackspace Structure void setup () void loop () Further Syntax // (single line comment) /* (multi-line comment) */ # define DOZEN 12 //Not baker’s! # include <avr/pgmspace.h> General Operators = (assignment operator) + (addition) - (subtraction) * (multiplication) / (division) % (modulo) == (equal to) != (not equal to) < (less than) > (greater than) <= (less than or equal to) >= (greater than or equal to) && (and) || (or) ! (not) Pointer Access & reference operator * dereference operator Bitwise Operators & (bitwise and) | (bitwise or) ^ (bitwise xor) ~ (bitwise not) << (bitshift left) >> (bitshift right) Compound Operators ++ (increment) -- (decrement) += (compound addition) -= (compound subtraction) *= (compound multiplication) /= (compound division) |= (compound bitwise or) Control Structures if (x<5){ } else { } switch (myvar) { case 1: break ; case 2: break ; default : } for (int i=0; i <= 255; i++){ } while (x<5){ } do { } while (x<5); continue ; //Go to next in do/for/while loop return x; // Or ‘return;’ for voids. goto
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/27/2011 for the course ENGR 1029 taught by Professor Professor during the Spring '10 term at The School of the Art Institute of Chicago.

Ask a homework question - tutors are online