admin

Survival guide for AirQ ShielD buyers

You just received your new AirQ ShielD. And you want to start developing your application right now. But before you can start coding there are a couple of things you may know. We know: you don’t like to read tens of pages on our technical wiki. You’re only interested in write down code.  That’s the reason why we wrote this survival guide. One. Two. Three. Let’s go :-)

There are essentially two main things you have to know: pairing and ARS.

Pairing

Each AirQ Networks end device (eg. AirQ 310 control board or AirQ 101 wireless sensor) can be associated to only one transceiver. And an AirQ ShielD is a transceiver. This procedure is called pairing. To pair a device to an AirQ ShielD you need to follow this procedure:

  1. Turn off the device you need to pair to the shield (eg. AirQ 310 control board).
  2. Turn on Arduino with the shield correctly mounted (see next).
  3. Press the PAIR button on AirQ ShielD leaving it pressed for 2 seconds.
    1. You’ll notice that the STATUS led starts blinking repeatedly. The shield will remain in pairing mode for 30 seconds.
  4. Turn on the device you want to pair.
  5. After two or three seconds the STATUS led of the device will blink more quickly to signal that it has been paired. The STATUS led stops blinking.
  6. Pairing is completed. To stop pairing mode immediately, press PAIR button for 1 second.

We did a video that shows this procedure.

 

However, for all of you that are buying in this period an AirQ ShielD with another AirQ Networks device, we are providing them already paired. But it’s important to know that pairing could be needed if you buy other devices in the future.

Remember that if you bought only AirQ ShielDs you don’t need pairing.

Read more

Posted on by admin in Arduino, Hardware 1 Comment

How to use AirQ ShielD to build custom wireless solutions

A lot of you asked us if AirQ ShielD could be used to build customs hardware solutions without using other AirQ Networks devices. And the answer is definitively yes. AirQ ShielD is nothing more than a transceiver and it is designed to accept commands that send bytes to another AirQ ShielD. To develop a wireless solution using AirQ ShielD you need:

  • At least two AirQ ShielDs (but you can use how many you need).
  • Two Arduino Uno boards.
  • The sNET library for Arduino

AirQ ShielD allows sending data messages to another AirQ ShielD. The maximum number of bytes that can be sent is 10. To a send a message to another shield the sNET::sendToDevice() method can be used. Let’s do an example. Suppose that you received two AirQ ShielDs: one with sNET address equal to 191.0.0.11 and the other one with the address 191.0.0.12. And suppose that you want to send the “HELLO” string from 191.0.0.11 board to 191.0.0.12. The following Arduino code is all you need.

The code is self-explanatory: the first 4 parameters are the address of the remote shield that will receive the message; the fifth parameter (0x1) says sNET library to send a data message; the remaining part is the data we want to send and its size. If you want to send a message to all AirQ ShielD on the same sNET network, you can use the sNET::sendBroadcast() method:

 

Posted on by admin in Arduino Leave a comment

New release of sNET library for Arduino

We worked really hard to resolve several issues affecting the sNET library for Arduino. But, first of all, we would like to say thank you to Rob Jann who gave us precious info to address them.

The new 0.2 version is now on our public github account (http://github.com/airqnetworks) and can be easily downloaded using git. We suggest downloading always versions that have reached a stable code point. Every time we are sure that the library is usable at all we release a new tag. The list of tags can be reached at https://github.com/airqnetworks/snet-arduino/tags.

This new release introduces a really important feature: library can now check if the status of relays is effectively changed when requested. Since sNET Protocol is a best effort protocol, it does nothing to ensure that a message is received by a device and version 0.1 of the library does nothing to address this. With this new release we introduced status check, and it can easily used passing an additional parameter to setRELAYx() method of an AIRQ310 or AIRQ300 object. Let’s see an example.

Although we have done the best to reduce the size of the whole library, status check requires additional code that increases the total size of library of at least 500 bytes. If your application doesn’t need this feature, you can comment the macro SNET_ENABLE_CONFIRM in the sNET.h header file:

However, to have a better experience using our control boards we suggest to leave that macro uncommented and use status check feature.

 

Posted on by admin in Arduino Leave a comment

sNET library for Arduino now on github

After a week of testing and tuning up, we are finally ready to push the Arduino sNET library on our github account at http://github.com/airqnetworks :-) The library repository is named snet-arduino, and it can be easily downloaded using git:

Those who aren’t confident with git version system can download the library zip file using this link https://github.com/airqnetworks/snet-arduino/archive/master.zip.

Library implementation is still partial. Only AirQ 300 and 310 control boards are supported at the moment. However, the underlying structure is almost complete, so we will spend less time to support all other AirQ Networks devices. There is a lack of documentation too. We’ll add documentation to our technical wiki soon. In the github repository there is a REAME file that explains the main concepts of the library. Library is really simple to use. Let’s suppose that we want to turn-on the RELAY1 of an AirQ 310 control board with a sNET address equal to 4.0.1.2. This can be simply achieved with the following Arduino code:

Let’s give some explanations. At line 10 we create a new sNET object. This object is responsible to collect all messages coming from the sensor networks and captured by the AirQ ShielD. Every time we create a new sNET object we must specify how many devices the shield will interact with (in this case we assume only one AirQ 310 board). Usually, an Arduino sketch uses only one sNET object.

Next on the line 19 we ask to sNET library to process all messages coming from sensor network using sNET::processMessages() method. This a cyclical task and programmer have to call this method every time they can in order to avoid that messages are lost (for more info, see attached doc in the library). sNET library will create a device object for us when a new message coming from the AirQ 310 is detected. A device object is an abstraction that allows us to interact with a wireless device without knowing underlying details of sNET protocol. Line 26 checks if the library has created the device object for us and if so we turn ON the RELAY1.

We’ll publish further details in the next days. Stay tuned 😉

Posted on by admin in Arduino 1 Comment

AirQ ShielD development status

We are currently working hard to release as soon as possible the Arduino library that will allow to interface our devices. We have written down already a lot of code and we are doing testing and tuning up.

The following video shows a really simple and funny application (but a little bit useless :-)). The sketch running on Arduino is a simple loop that cycles between the 5 relays of an AirQ 310 boards.

Ok. It’s useless, but great 😀

Posted on by admin in Arduino 2 Comments