Quickstart Plug and Sense Guide

28
Waspmote Plug & Sense! Quickstart Guide

description

as

Transcript of Quickstart Plug and Sense Guide

Page 1: Quickstart Plug and Sense Guide

Waspmote Plug & Sense!Quickstart Guide

Page 2: Quickstart Plug and Sense Guide

-2- v4.3

Index

Document version: v4.3 - 11/2013

© Libelium Comunicaciones Distribuidas S.L.

INDEX

1. Introduction ......................................................................................................................................... 3

2. Waspmote Plug & Sense!’s Donnots ................................................................................................... 4

3. Waspmote Plug & Sense!’s Hardware Setup ...................................................................................... 53.1. ON/OFF Button ............................................................................................................................................................................53.2. External led.....................................................................................................................................................................................63.3. Resetting Waspmote Plug & Sense! with an external magnet ....................................................................................63.4. USB ....................................................................................................................................................................................................8

3.4.1. External SIM socket ....................................................................................................................................................103.5. Antenna ........................................................................................................................................................................................12

4. Waspmote Plug & Sense! IDE: Download and Installation ............................................................. 144.1. Linux ..............................................................................................................................................................................................144.2. Windows .......................................................................................................................................................................................154.3. Mac .................................................................................................................................................................................................15

5. Receiving Frames from Waspmote Plug & Sense! ........................................................................... 175.1. In the Waspmote Gateway .....................................................................................................................................................175.2. In Meshlium ................................................................................................................................................................................18

6. Compiling a New Program ................................................................................................................ 19

7. Uploading a New Program to Waspmote Plug & Sense! ................................................................. 21

8. Next Steps: using the Developers Guides ....................................................................................... 27

9. Documentation Changelog .............................................................................................................. 28

Page 3: Quickstart Plug and Sense Guide

-3- v4.3

Waspmote Plug & Sense! - Quickstart Guide

1. IntroductionThe aim of this Guide is to introduce the user to Waspmote Plug & Sense! in a practical way.

Waspmote Plug & Sense! is a complex device and a learning process must be completed. Libelium offers many Guides and examples which will help the developer.

The present Guide was created in the hope of helping the developer in the very first steps with Waspmote Plug & Sense!. We advice to follow this Guide when the user wants to start the learning process. The last chapter will try to plan a learning process, proposing further steps.

Page 4: Quickstart Plug and Sense Guide

-4- v4.3

Waspmote Plug & Sense! - Quickstart Guide

2. Waspmote Plug & Sense!’s DonnotsSoftware:

• Upload code only using Waspmote Plug & Sense! IDE. If a different IDE is used, Waspmote can be damaged and can become unresponsive. This use is not covered under warranty.

• Do not unplug any connector while uploading code. Waspmote can become unresponsive. This use is not covered under warranty.

• Do not connect or disconnect any connector while Waspmote is ON. Waspmote can become unstable or unresponsive, and internal parts can be damaged. This fact is not covered under warranty.

Hardware:

• Do not handle black stickers seals on both sides of the enclosure (Warranty stickers). Their integrity is the proof that Waspmote Plug & Sense! has not been opened. If they have been handled, damaged or broken, the warranty is void.

• Do not open Waspmote Plug & Sense! in any case. This will automatically make the warranty void. • Do not handle the four metallic screws of Waspmote Plug & Sense!. They ensures waterproof seal. • Do not submerge Waspmote Plug & Sense! in liquids. • Do not place nodes on places or equipment where it could be exposed to shocks and/or big vibrations. • Do not expose Waspmote Plug & Sense! to temperatures below -10ºC or above 50ºC. • Do not power Waspmote with other power sources than the original provided by Libelium. Voltage and current maximum

ratings can be exceeded, stopping Waspmote working and voiding warranty. • Do not try to extract, screw, break or move Waspmote Plug & Sense! connectors far from necessary usage, waterproof

sealing can be damaged and warranty will be voided. For more information: http://www.libelium.com • Do not connect any sensor on the solar panel connector and also do not connect the solar panel to any of sensor

connectors. Waspmote can be damaged and warranty void. • Do not connect any sensor not provided by Libelium. • Do not place Waspmote Plug & Sense! where water can reach internal parts of sensors.

Page 5: Quickstart Plug and Sense Guide

-5- v4.3

Waspmote Plug & Sense! - Quickstart Guide

3. Waspmote Plug & Sense!’s Hardware SetupFor the advanced hardware setup, please consult the Waspmote Plug & Sense! Technical Guide. Here we show the most basic points about the hardware configuration:

3.1. ON/OFF Button This button is used to turn ON or OFF Waspmote. It is a latch type button with two static positions as shown below. In ON position, the button remains a bit lower than led ring.

Figure 1: On / Off button at off position

Figure 2: Turning On Waspmote

Note: Remember that ON / OFF button must be in ON position to charge the battery. Otherwise the node will not be charged.

Page 6: Quickstart Plug and Sense Guide

-6- v4.3

Waspmote Plug & Sense! - Quickstart Guide

3.2. External ledON / OFF button includes a red ring led, which can be managed by software. This led can be used for instance to know that Waspmote is ON, or for debugging purposes at developing phase. By default, Waspmote Plug & Sense! comes with a code that blinks briefly (3 times in less than one second) this led when it is turned ON. The LED can be managed specifying ON time or just setting this state with specific API functions. The user should take into account that the usage of this led will increase power consumption due to external LED consumes 4.4 mA.

Figure 3: Waspmote turned On

3.3. Resetting Waspmote Plug & Sense! with an external magnetSince June 2013, Waspmote Plug & Sense! has a new feature: it can be reset with an external magnet, with no contact. If one node stops working or if a defective behavior is detected, it would be costly to uninstall the node to bring it back to laboratory. This new feature allows the network manager to reset the node in a quick and easy way.

The hardware consists of a reed switch connected to the Waspmote reset line. When the user gets the magnet close to the reed-switch, the reset is activated. When the user moves the magnet away, the reset line is released (the external led will blink) and Waspmote executes the bootloader first and then, the setup function. After the setup, it will continue with the loop function. Next pictures shows the right way to reset the node using an external magnet, first moving it closer, and then moving it away.

Figure 4: Moving the magnet closer to the node.

Page 7: Quickstart Plug and Sense Guide

-7- v4.3

Waspmote Plug & Sense! - Quickstart Guide

Figure 5: Moving the magnet away from the node.

The magnet is made of neodymium. It is a special, high-power magnet. We only advise to use the magnet Libelium provides.

It is not mandatory, but highly recommended to consider this feature when designing the project. The user should design the software in a way the node can be reset if things go wrong. Remember that laboratory tests are always needed to validate the feature before your final deployment.

When the node is already deployed in the field, and for instance it is installed in a traffic light, this feature can be used to reset the node easily, as it is shown in the diagram below, where a technician uses a pole with the magnet attached in one side.

Figure 6: Applying the magnet in a real deployment

Page 8: Quickstart Plug and Sense Guide

-8- v4.3

Waspmote Plug & Sense! - Quickstart Guide

3.4. USBThis connector is used to upload code into Waspmote with a male to male USB cable provided by Libelium. Just connect one side of the cable to this connector, removing protection cap and connect the other side to a PC to upload a code or to charge the battery in case your model has a rechargeable battery. Next picture shows an example.

Figure 7: USB connector and protective cap

Figure 8: Connecting the USB cable to Waspmote

When uploading processes are finished, do not forget to screw firmly the protection cap to avoid connector damage. Never connect a USB which exceed maximum ratings of USB standard.

Page 9: Quickstart Plug and Sense Guide

-9- v4.3

Waspmote Plug & Sense! - Quickstart Guide

Figure 9: Connecting USB charger

For indoor deployments the nodes can be recharged using the USB charger.

Important: Use the USB charger just with the models which includes rechargeable battery.

Figure 10: Charging the mote by USB

Page 10: Quickstart Plug and Sense Guide

-10- v4.3

Waspmote Plug & Sense! - Quickstart Guide

3.4.1. External SIM socket

On November 2013, Libelium released the new External SIM socket. The External SIM socket replace the USB socket in two devices:

• Waspmote Plug & Sense! devices with GPRS module or 3G module • Meshlium devices with 3G module

The External SIM socket is composed of 2 connectors:

• micro-SIM card • micro-USB (type B)

Figure 11: External SIM socket in a Plug & Sense! with GPRS or 3G module

The operation with the micro-USB socket is just the same than with the normal USB socket. Just remember to use a micro-USB cable.

Figure 12: Connecting the micro-USB cable to Plug & Sense!

Page 11: Quickstart Plug and Sense Guide

-11- v4.3

Waspmote Plug & Sense! - Quickstart Guide

The micro-SIM card connector allows now the user to connect the SIM card he likes from the outside. It is no longer necessary to send a SIM card to Libelium for proper installation. You can ask your telecommunication provider for a micro-SIM card. Alternatively you can take a normal SIM card and transform it into a micro-SIM card with a SIM card cutter.

Besides, the micro-SIM card connector has a push-pull mechanism, so it is really easy to remove the card with the aid of one nail.

Figure 13: Push-pull mechanism in the External SIM socket

It is highly important to turn off the Plug & Sense! device in a secure way before inserting a micro-SIM card, or removing an existing SIM-card. The user can damage the device if this operation is done “on-the-fly”.

Make sure you closed the External SIM socket with its protection cap before outdoors deployment.

Take into account that the External SIM socket has a limited resistance so please be gentle and do not push too hard with the USB or SIM card.

Figure 14: Inserting a SIM card with care in the External SIM socket

Page 12: Quickstart Plug and Sense Guide

-12- v4.3

Waspmote Plug & Sense! - Quickstart Guide

3.5. AntennaBy default Waspmote Plug & Sense! has one external antenna of 5dBm with a standard reverse polarized SMA connector. This connector allows to connect the RF antenna.

Figure 15: Antenna connector of the enclosure

To ensure good RF coverage, be sure antenna points to the sky and also be sure antenna is screwed completely to the connector. To connect the antenna, just align it with the connector and screw it carefully. Antenna must be connected in order to ensure RF communication.

Figure 16: Connecting antenna to the enclosure

Note: Once Waspmote Plug & Sense! is installed, it is recommended to fix it using a tape like the one shown in the picture below.

Page 13: Quickstart Plug and Sense Guide

-13- v4.3

Waspmote Plug & Sense! - Quickstart Guide

Figure 17: Recommended tape Figure 18: Ensure antenna remains in the right position

Do not try to connect other kind of antennas which do not match with SMA RP standard connector and also other antennas not provided by Libelium.

Page 14: Quickstart Plug and Sense Guide

-14- v4.3

Waspmote Plug & Sense! - Quickstart Guide

4. Waspmote Plug & Sense! IDE: Download and InstallationThe first step is to install the Waspmote Plug & Sense! IDE (Integrated Development Environment) used to program Waspmote Plug & Sense!. This IDE can be found on: http://www.libelium.com/development/plug_&_sense/sdk_and_applications

Note: There are two Waspmote IDE available on the Libelium website. One is for Waspmote (Red one) and the other one is for Waspmote Plug & Sense! (Green one). Be sure you download the corresponding for Waspmote Plug & Sense!. Otherwise it will not work correctly.

Figure 19: Differences between Waspmote IDE and Waspmote Plug & Sense! IDE

The Waspmote Plug & Sense! IDE is based on the open source Arduino platform compiler, following the same style of libraries and operation. It is important to use the version found on Libelium website and no other version of Arduino IDE. This is because the version available on the Libelium website has been properly tested and for which we can assure optimum operation.

To be able to run the compilation from a code successfully a series of applications must be installed on the computer. The applications to install vary according to the O.S. used.

4.1. LinuxWaspmote Plug & Sense! can be programmed using any of the many available Linux distributions. Libelium ensures stability of the Waspmote Plug & Sense! IDE using the Debian and Ubuntu distributions, as they have been used during development. The process for Ubuntu 9.04 is explained below.

To be able to correctly compile and use Waspmote it is necessary to install some packets related with the version of the compiler for Atmel microcontrollers and Java environment.

1. Installing JavaThe next step is to install the necessary version of the avr-gcc compiler to be able to program the Waspmote Plug & Sense! microcontroller. We can use the Synaptic package manager or a terminal. Using Synaptic we must look for the “gcc-avr” package and install it. Using the terminal we must use the apt-get command in the following way:

$ sudo apt-get install sun-java6-jre

Page 15: Quickstart Plug and Sense Guide

-15- v4.3

Waspmote Plug & Sense! - Quickstart Guide

2. Installing AVR-GCC CompilerThe next step is to install the necessary version of the avr-gcc compiler to be able to program the Waspmote Plug & Sense! microcontroller. We can use the Synaptic package manager or a terminal.

Using Synaptic we must look for the “gcc-avr” package and install it. Using the terminal we must use the apt-get command in the following way:

$ sudo apt-get install gcc-avr

3. Installing lib-avc LibraryThe next step is to install the necessary version of the lib-avc library. We can use the Synaptic package manager or a terminal.

Using Synaptic we must look for the “lib-avc” package and install it. Using the terminal we must use the apt-get command in the following way:

$ sudo apt-get install avr-libc

4.- Installing Waspmote Plug & Sense! IDEWaspmote Plug & Sense! IDE installation entails unzipping the file downloaded in the previous step to the chosen folder. Once the downloaded file has been unzipped, the file called Waspmote must be run to launch the IDE.

4.2. WindowsThe process for installing Waspmote Plug & Sense! IDE on a computer with Window XP SP3 is explained below.

1. Downloading Waspmote Plug & Sense! IDEThe first step is to download the file that contains the environment and the libraries (the IDE).

This file can be found at http://www.libelium.com/development/plug_&_sense/sdk_and_applications

2. Installing Waspmote Plug & Sense! IDEThe next step is to unzip the downloaded file to the chosen folder. This folder includes the drivers needed in the next step to install the USB and FTDI converter.

3. Connecting Waspmote Plug & Sense! When connecting a Waspmote Plug & Sense! using the USB connector, the message “New device found” will appear. A window will open for the installation of this device.

Select the option “Not right now” and press the ‘Next’ button.

Next select the path where the drivers for the FTDI converter are. These drivers are in the folder where Waspmote was unzipped.

Then proceed to the installation of the FTDI converter drivers, which shows the following message when finished.

Once installation is finished, the message ‘New device found’ will appear, referring to the USB. The same process carried out for the FTDI converter must now be followed, choosing the same options in all the windows. The path for the drivers is the same as that previously specified.

Once this installation is finished, a message will appear indicating the correct installation of the USB.

Once both devices are correctly installed, the port on which the Waspmote board has been installed will appear in the “Device manager”.

4.3. MacWaspmote Plug & Sense! can be programmed using the Mac OS X operating system. The process of install Waspmote Plug & Sense! IDE on a computer with a version later than 10.3.9 is explained below.

Page 16: Quickstart Plug and Sense Guide

-16- v4.3

Waspmote Plug & Sense! - Quickstart Guide

1. Downloading Waspmote Plug & Sense! IDE

The first step is to download the file that contains the environment and libraries (the IDE).

This file can be found on our web page http://www.libelium.com/development/plug_&_sense/sdk_and_applications

2. Installing Waspmote Plug & Sense! IDEThe next step is to unzip the downloaded file to the chosen folder. The drivers needed in the next step to install the FTDI converter are found in this folder.

3. Installing FTDI converter driversWaspmote requires the installation of the FTDI converter drivers. These drivers are found in the downloaded file.

Once the drivers are installed for the FTDI converter, the Waspmote board can be connected and the system will recognize it correctly.

Page 17: Quickstart Plug and Sense Guide

-17- v4.3

Waspmote Plug & Sense! - Quickstart Guide

5. Receiving Frames from Waspmote Plug & Sense!

5.1. In the Waspmote GatewayWaspmote Plug & Sense! comes preconfigured from factory with a program which lets you check the right operation of the device. This program sends standard frames to the Gateway. It is called wasp_pro_start_program_XXX.pde and depends on the used XBee protocol. It is also available inside the IDE.

Steps:

1. Install the drivers and the serial monitor software on the computer.

2. Connect the antennas and the rest of the desired components to Waspmote Plug & Sense! and Waspmote Gateway.

3. Connect Waspmote Gateway to the USB port on the computer.

4. Launch the IDE’s serial monitor application and set the USB port baudrate at 115200bps

5. Switch Waspmote Plug & Sense! to the ON position.

When the program starts, it executes sequentially these actions:

• State 1 – External LED ON for 0.5 seconds

• State 2 – External LED blinking for 0.5 seconds

• State 3 – Sending messages (blink External LED shortly with each frame)

State 1 and 2 are only executed once (when program starts) whereas state 3 will loop indefinitely every second (if we reset Waspmote, the program starts again).

Every packet contains a message with sensor data formatted as Waspmote Data Frame. The sensor fields added to the frame are: Accelerometer values, RTC internal temperature value, and battery level. In the case the XBee is not using DigiMesh protocol, then the MAC address is added (because of length constraints). For further information, please check the Waspmote Data Frame Guide in:

http://www.libelium.com/development/plug-sense/documentation/?cat=programming

Example:

~\0x00I\0x90\0x00}3\0xa2\0x00@z\0xcb\0x92\0xd8\0xd3\0x02<=>\0x80\0x03#35689722##7#ACC:80;10;987#IN_TEMP:22.50#BAT:93#\0xb4

Initially there are some hexadecimal characters, which belong to the XBee API frame, followed by the message. In the above example the message is:

<=>\0x80\0x03#35689722##7#ACC:80;10;987#IN_TEMP:22.50#BAT:93#

Page 18: Quickstart Plug and Sense Guide

-18- v4.3

Waspmote Plug & Sense! - Quickstart Guide

5.2. In MeshliumWhen you buy a kit containing Meshlium and Waspmote, your Waspmtes already come configured to send frames to the Gateway. Later, once the user has developed the code for transmitting to Gateway, he can swich to Meshlium.

Before send frames to Meshlium, We recommend you read and study networking guides for your module:

• Waspmote 802.15.4 Networking Guide • Waspmote 868MHz Networking Guide • Waspmote 900MHz Networking Guide • Waspmote Digimesh Networking Guide • Waspmote ZigBee Networking Guide

Meshlium will receive the sensor data sent by Waspmote using the XBee radio and it will store the frames in the Local Database. That can be done in an automatic way now thanks to the new Sensor Parser.

The Sensor Parser is a new feature for Meshlium (version 3.0.5 or older). It is a new software system which is able to do the following tasks in an easy and transparent way:

• receive frames from XBee (with the Data Frame format) • parse these frames • store the data in local Database • synchronize the local Database with an external Database

Besides, the user can add his own sensors.

Figure 20: Meshlium Manager System’s Sensor Parser

Page 19: Quickstart Plug and Sense Guide

-19- v4.3

Waspmote Plug & Sense! - Quickstart Guide

6. Compiling a New ProgramTo use the Waspmote Plug & Sense! IDE compiler we must run the executable script called ‘Waspmote’, which is in the folder where the compiler has been installed.

Waspmote Plug & Sense! IDE is divided into 4 main parts which can be seen in the following figure.

IDE options

Buttons: opening and uploading codes

Main Code

Output messages

Figure 21: IDE – Waspmote parts

• The first part is the menu which allows configuration of general parameters such as the selected serial port. • The second part is a button menu which allows compilation, opening, saving or loading the selected code on the board. • The third part contains the main code which will load in Waspmote and the fourth part shows us the possible compilation

and load errors, as well as the success messages if the process is carried out satisfactorily.

The Waspmote-IDE buttons panel allows certain functions to be carried out such as opening a previously saved code, creating a new one or loading the code on the board. The following figure shows the panel and the functions of each button.

Figure 22: IDE – Waspmote panel of buttons

Compile

Stop compiling

New sketch Save Serial Monitor

Open Upload

Page 20: Quickstart Plug and Sense Guide

-20- v4.3

Waspmote Plug & Sense! - Quickstart Guide

The next step is to configure the folder where the created programs are going to be saved. In the Waspmote Plug & Sense! IDE, this folder is called ‘sketchbook’ and can be configured by accessing the ‘File/Preferences’ tab. Clicking on this tab will open a new window where the location of the sketchbook can be indicated. Once the sketchbook folder path is indicated, the downloaded test program must be saved in this folder.

Waspmote Plug & Sense! IDE must be closed so that the changes and the newly saved program in the sketchbook folder are reflected.

Note: The Gateway is just a UART-USB bridge. This means that the Gateway cannot be programmed and code cannot be uploaded.

Page 21: Quickstart Plug and Sense Guide

-21- v4.3

Waspmote Plug & Sense! - Quickstart Guide

7. Uploading a New Program to Waspmote Plug & Sense!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 connectorRemove the protection cap of the USB connector.

Figure 23: Removing the USB cap

* In the case you have a Plug & Sense! With GPRS or 3G module, insert your micro-SIM card in the External SIM socket with care.

Figure 24: Inserting a SIM card with care in the External SIM socket

Page 22: Quickstart Plug and Sense Guide

-22- v4.3

Waspmote Plug & Sense! - Quickstart Guide

Step 2: Connect the USB cable to Waspmote Plug & Sense!Connect one side of the provided male-to-male USB cable to the USB connector. For models with GPRS or 3G module, a micro-USB is supplied.

Figure 25: Connecting the USB cable to Waspmote Plug & Sense!

Page 23: Quickstart Plug and Sense Guide

-23- v4.3

Waspmote Plug & Sense! - Quickstart Guide

Step 3: Connect the USB cable to PCConnect the other side of the USB cable to your PC.

Figure 26: Connecting the node to a PC

Step 4: Turn On Waspmote Plug & Sense!Be sure you have turned ON the node by pressing ON/OFF button.

Figure 27: Turning ON Waspmote

Step 5: Open Waspmote Plug & Sense! IDENow open Waspmote Plug & Sense! IDE. If you do not have Waspmote Plug & Sense! IDE already installed in your PC, then go to the Development section of Libelium website to download the latest version.

Page 24: Quickstart Plug and Sense Guide

-24- v4.3

Waspmote Plug & Sense! - Quickstart Guide

Step 6: Select the corresponding codeBuild your own code for your model using the online Code Generator (http://www.libelium.com/development/waspmote/code_generator) provided by Libelium at the Development section of Libelium website (see corresponding section for details about how to use the code generator). Download and open it in Waspmote Plug & Sense! IDE.

Save the sketch (Waspmote Plug & Sense! IDE has a button for that), for example with the name “Waspmote_Plug_Sense_test_code”, and check the IDE message “Done Saving”

Figure 28: Preparing code for Waspmote Plug & Sense!

Step 7: Select the corresponding APISelect the API version corresponding to Waspmote Plug & Sense! going to tools/board. If you do not have the API for Waspmote Plug & Sense!, please go to the Development section of Libelium website and download the latest version.

Figure 29: Selecting API for Waspmote Plug & Sense!

Please notice that the Waspmote Plug & Sense! API is different from the Waspmote API. It should be called “Waspmote_Plug_Sense_V001”. Check Libelium website for new API updates.

Page 25: Quickstart Plug and Sense Guide

-25- v4.3

Waspmote Plug & Sense! - Quickstart Guide

Step 8: Select the USB portSelect 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.

Figure 30: Selecting the USB port for Waspmote Plug & Sense!

Note: 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 codeCompile the code (the IDE has a button for that), and check there are no errors or warnings. The IDE should say “Done Compiling”.

Figure 31: Compiling a code for Waspmote Plug & Sense!

Page 26: Quickstart Plug and Sense Guide

-26- v4.3

Waspmote Plug & Sense! - Quickstart Guide

Step 10: Upload the codeNow, press the upload button and see messages coming out from IDE. During a while you will see message “uploading to I/O board”.

Figure 32: 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 MonitorIf uploading processes are successfully completed, open Serial Monitor to see the output of the uploaded code.

Figure 33: Opening Waspmote Plug & Sense! 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.

Page 27: Quickstart Plug and Sense Guide

-27- v4.3

Waspmote Plug & Sense! - Quickstart Guide

8. Next Steps: using the Developers GuidesCongratulations, if you arrived here, you completed the Quick Start Guide and now you know the basics about Waspmote Plug & Sense!.

Your next steps depends on what kind of project you want to develop. Normally, a program for Waspmote Plug & Sense! is composed of 4 main parts:

1. configuration (RTC, sensors, communications module)

2. read sensor(s)

3. communications (XBee, GPRS, ...)

4. enter sleep mode

As a first step, you should read the Waspmote Plug & Sense! Technical Guide. It is a good introduction to Waspmote Plug & Sense! because it talks about all the features, communication options and models. Make sure you read thoroughly the chapters about all the features you need to use.

The Code Generator is a great way to get to know Waspmote Plug & Sense! in the beginning. Just explore its functions, play; you can get familiar with the different features, communications or models Libelium offers. Try to add slight changes from code to code... you will see how your choices generates different codes; compare them. Just start learning by reading working codes.

Always keep in mind that the Code Generator is just a help for developers; final codes can be Code Generator based, but human supervision must be applied in any case. The Code Generator will help to have a quicker learning, but the developer will need to study the guides, write code, test codes, etc.

RTC management or power/sleep features should be present in almost any type of project, so it is a good idea to start with them. Besides, they are pretty easy to control. You should read the RTC Guide and the Power Guide carefully. For any feature, module or board, there is a good number of examples, make sure you execute them in your Waspmote Plug & Sense! while you read the related guide. We can say the same for the Code Generator: it is a good help. Examples and Code Generator will help to clear up things and you can learn concepts by doing and not just by reading. In any case, examples are arranged in increasing order of difficulty. This means you should start from the lower examples and then move to the advanced examples.

Reading sensors is also easy and it must be one of the first steps. The Waspmote Plug & Sense! Sensor Guide must be read and then you can execute the related examples or play with the Code Generator.

There are optional features or modules which should be studied now in the case you plan to use them: SD, accelerometer, EEPROM, etc.

We suggest to leave the communication part for the last steps, since it may be the most difficult part. Until that moment, it is a good idea to transmit your data via USB for the first steps of your development. Remember you can print as many messages as you want, so you can print helpful intermediate messages. Make sure you learn about the Frame, we advice to send frames in the official Frame format with your communication modules.

Once you arrived here, you can try to do your first complete program, combining RTC, power, sensors and communications. There are different combined examples which will show how to do it in a successful way. The Code Generator will be really helpful for this task too.

Do not forget to read the Programming Guide as you advance in the project development. This Guide contains atomic tips which are useful for real-life projects. Some of the ideas shown there will help you to build successful projects.

A Gateway is always recommended. We believe it is better to start receiving frames with a Gateway, and once you feel comfortable with it, you can switch to Meshlium (in the case you ordered one). Meshlium can be seen as an advanced Gateway. You can start by reading the Meshlium Quick Start Guide, and after that you can study the complete Meshlium Technical Guide.

Interruptions are one advanced feature so you can leave that for the last part of the learning process.

If you need OTA features, it is a complicated feature too and it could be a good moment now to start reading the OTA Guide and execute the examples.

Page 28: Quickstart Plug and Sense Guide

-28- v4.3

Waspmote Plug & Sense! - Quickstart Guide

9. Documentation ChangelogFrom v4.2 to v4.3:

• Added references to External SIM socket

From v4.1 to v4.2:

• Added references to magnetic reset • Added “Documentation Changelog” chapter