Step 5: Programming - Arduino Side
First, a flowchart on how the program operates is shown in the first three pictures.
The program has been provided as well for download, just enter your own Pachube information and you are off to the races!
Libraries you may need:
Google for any you are missing, they are generally the first result if you include "Arduino" in your search