Quickstart Guide
Quickstart Guide
Quickstart Guide
Index
Document version: v4.2 - 08/2013
Libelium Comunicaciones Distribuidas S.L.
INDEX
1. Introduction.......................................................................................................................................... 3
2. General and safety information.......................................................................................................... 4
3. Waspmotes Hardware Setup............................................................................................................... 5
3.1. Batteries............................................................................................................................................................................................5
3.2. Antennas..........................................................................................................................................................................................6
3.3. Modules............................................................................................................................................................................................6
3.4. Sensor Boards.................................................................................................................................................................................7
3.5. SD card..............................................................................................................................................................................................7
-2-
v4.2
Introduction
1. Introduction
The aim of this Guide is to introduce the user to Waspmote in a practical way.
Waspmote 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. 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.
-3-
v4.2
Upload code only using Waspmote 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 TRY TO RECHARGE THE NON-RECHARGEABLE BATTERY. IT MAY EXPLODE AND CAUSE INJURIES AND
DESTROY THE EQUIPMENT. DEVICES WITH NON-RECHARGEABLE BATTERIES MUST BE PROGRAMMED THROUGH
THE USB CABLE WITHOUT THE BATTERIES CONNECTED. PLEASE DOUBLE CHECK THIS CONDITION BEFORE
CONNECTING THE USB. DO NOT CONNECT EITHER UNDER ANY CIRCUMSTANCE THE SOLAR PANEL TO A DEVICE
WITH A NON-RECHARGEABLE BATTERY AS IT MAY EXPLODE AND CAUSE INJURIES AND DESTROY THE EQUIPMENT.
-4-
v4.2
3.1. Batteries
Connect the battery to Waspmote. Remember you have to charge the batteries at least for 24h before start using Waspmote.
DO NOT TRY TO RECHARGE THE NON-RECHARGEABLE BATTERY. IT MAY EXPLODE AND CAUSE INJURIES AND
DESTROY THE EQUIPMENT. DEVICES WITH NON-RECHARGEABLE BATTERIES MUST BE PROGRAMMED THROUGH
THE USB CABLE WITHOUT THE BATTERIES CONNECTED. PLEASE DOUBLE CHECK THIS CONDITION BEFORE
CONNECTING THE USB. DO NOT CONNECT EITHER UNDER ANY CIRCUMSTANCE THE SOLAR PANEL TO A DEVICE
WITH A NON-RECHARGEABLE BATTERY AS IT MAY EXPLODE AND CAUSE INJURIES AND DESTROY THE EQUIPMENT.
-5-
v4.2
3.2. Antennas
Plug the antennas to the modules they need to.
3.3. Modules
Place the module to be used in the corresponding socket in Waspmote.
-6-
v4.2
3.5. SD card
Insert the SD card into Waspmote.
-7-
v4.2
4.1. Linux
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.
a) Installing Java
The first step is to install the necessary version of the Java environment. We can use the Synaptic package manager or a terminal.
Using the Synaptic package manager, we must look for the sun-java6-jre 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
-8-
v4.2
4.2. Windows
a) Installing Waspmote
The 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.
b) Connecting a Waspmote board
When connecting a Waspmote board using the mini-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
Administrator.
4.3. Mac
a) Installing Waspmote
The 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.
b) Installing FTDI converter drivers
Waspmote 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.
-9-
v4.2
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/waspmote/documentation/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#
-10-
v4.2
5.2. In Meshlium
When 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:
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:
-11-
v4.2
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 verification, opening, saving or loading the selected code on the board.
The third part contains the main code which will be loaded to Waspmote.
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.
-12-
v4.2
In the Tools/Serial Port tab, the USB to which Waspmote has been connected to the computer must be selected.
-13-
v4.2
-14-
v4.2
Step 2: Connect Waspmote to your PC through the USB cable. Open the Waspmotes IDE and select the proper Board and Serial
Port with in the Tools menu.
-15-
v4.2
Step 3: Prepare your code for Waspmote. In our case, go to the template of the hello_world or copy and paste the text in the
sketch.
Step 4: Save the sketch (the IDE has a button for that), for example with the name hello_world, and check the IDE states Done
Saving.
-16-
v4.2
-17-
v4.2
-18-
v4.2