[Issue] Using Plug & Sense! Smart Cities model

Post Reply
libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

[Issue] Using Plug & Sense! Smart Cities model

Post by libelium-dev » Thu Feb 14, 2013 12:52 pm

Dear all readers,

If you are using the Plug & Sense! Smart Cities model, these lines will be required at the beginning of the code to allow a right operation.
#include <WaspSensorCities.h>

(...)

void setup()
{
   // Turn on the sensor board
  SensorCities.ON();
  
  // Turn on the RTC
  RTC.ON();
    
  (...)
  
}
Best regards.

jamessun
Posts: 18
Joined: Wed Mar 13, 2013 12:04 pm

Re: Using Plug & Sense! Smart Cities model

Post by jamessun » Wed Mar 13, 2013 7:10 pm

I believe that code downloaded from the Code Generator (http://www.libelium.com/development/was ... _generator#) calls these two methods in the loop() function and not the setup() function as you suggested. Should I move this code per your suggestion?

Thanks,
James

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Using Plug & Sense! Smart Cities model

Post by libelium-dev » Fri May 17, 2013 11:47 am

jamessun,

sorry, this post was missed.

The answer is yes. Place these lines in the setup loop. We will update the code generator soon.

Regards

Feri_Ch
Posts: 10
Joined: Fri Apr 11, 2014 2:01 am

Re: Using Plug & Sense! Smart Cities model

Post by Feri_Ch » Fri Apr 11, 2014 2:35 am

Dear All..

I'm Newbie with this tools..

How to Connect Waspmote Gateway Wih Plug and Sense Smart Cities, its same xbee pro 802.15.4 Pro..?

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Using Plug & Sense! Smart Cities model

Post by libelium-dev » Fri Apr 11, 2014 11:08 am

Feri_Ch,

you should start form the beginning.

There are some example codes of all modules deeple explained here:

http://www.libelium.com/development/waspmote/examples/

Also you can read the related documentation for your product and the specific modules here:

http://www.libelium.com/development/was ... mentation/

let us know your progress.

Best

Aaron
Posts: 65
Joined: Wed Dec 31, 2014 10:58 am

Re: [Issue] Using Plug & Sense! Smart Cities model

Post by Aaron » Mon May 18, 2015 4:03 pm

Hi,

What is the difference of placing the

Code: Select all

SensorCities.ON()
function in the setup or in the loop?

What if I want to turn off the sensors board to save energy in the loop while I'm not measuring anything? Then I set the SensorCities.ON() again in the loop.... I mean, i don't get the point.

Regards

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: [Issue] Using Plug & Sense! Smart Cities model

Post by libelium-dev » Mon May 18, 2015 4:16 pm

Hello,

the setup runs once and the loop's code is repeating all time.

If you set SensorCities.ON() at the beginning (setup) you will turn on the board but this code is going to run one time only, so if you turn off the board in the loop you will have to turn it on again.

Regards.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest