Uploading code

Using the USB connector, a new code can be uploaded to Waspmote without opening Waspmote Plug & Sense!. Just connect one side of the USB cable to this connector, removing protection cap if necessary and connect the other side to a PC. Remember that Waspmote must be on to allow uploading a new code. Next steps describe this process in detail.
Step 1: Open the USB connector
Remove the protection cap of the USB connector.
Removing the USB cap
In the case you have a Plug & Sense! with a 4G module, insert your nano-SIM card in the External SIM/USB socket with care.
Inserting a SIM card with care in the External SIM/USB socket
Step 2: Connect the USB cable to Waspmote Plug & Sense!
Connect one end of the provided male-to-male USB cable to the USB connector. For models with 4G module, a micro-USB is supplied.
Connecting the USB cable to Waspmote Plug & Sense!
Step 3: Connect the USB cable to PC
Connect the other end of the USB cable to your PC.
Step 4: Turn on Waspmote Plug & Sense!
Be sure you have turned on the node by pressing on/off button.
Turning on Waspmote
Step 5: Open Waspmote IDE
Now run Waspmote IDE on your PC. If you do not have Waspmote IDE already installed in your PC, then go to the Development section of Libelium website to download the latest version; there is a dedicated guide to help in the process: "Waspmote IDE: User Guide".
If it is the first time you plug a Waspmote Plug & Sense! on your PC and you are unable to see the proper USB port, maybe you should install the latest FTDI drivers:
Moreover, if you have troubles installing FTDI drivers and your computer is unable to recognize Waspmote, please follow the installation guide for your operating system on your next link:
Step 6: Select the corresponding code
Go to the examples menu and open your desired example. Then modify it according to your application and save the sketch with the save button, for instance with the name "Waspmote_Plug_Sense_test_code", and check the IDE message "Done Saving".
Preparing code for Waspmote Plug & Sense!
Step 7: Select the corresponding API
Select the latest API version going to tools/board. There can be only one API in each installed IDE. Please read the "IDE: User Manual" for more details.
Selecting API
Please notice that Waspmote "OEM" and Plug & Sense! share the same API and IDE. The same software system is valid for both platforms.
Step 8: Select the USB port
Select the corresponding serial port by going to tools/serial port. If you are unable to see the proper USB port maybe you should install the latest FTDI drivers.
Selecting the USB port for Waspmote Plug & Sense!
The name of the USB ports depends on the OS and the particular PC you have. The best way to find the USB where Waspmote is connected is trial & error.
Step 9: Compile the code
Compile the code (the IDE has a button for that), and check there are no errors or warnings. The IDE should say "Done Compiling".
Compiling a code for Waspmote Plug & Sense!
Step 10: Upload the code
Now, press the upload button and see messages coming out from IDE. During a while you will see message "uploading to I/O board".
Uploading a code for Waspmote Plug & Sense!
Wait a few seconds until the process ends and check there are no error messages, just "Done uploading" message.
Step 11: Open the Serial Monitor
If uploading processes are successfully completed, open Serial Monitor to see the output of the uploaded code.
Opening Waspmote IDE serial monitor
When uploading processes are finished successfully, do not forget to screw the protection cap of USB connector to avoid its damage.
Never connect a USB which exceed maximum ratting of the USB standard. Waspmote can be damaged and warranty voided.