Post a new topicPost a reply Page 6 of 6   [ 56 posts ]
Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
 Post subject: Re: Sensor HC-sr04
PostPosted: Fri May 25, 2012 11:22 am 

Joined: Mon Nov 28, 2011 6:12 pm
Posts: 18
Hey!

when I started using waspmote I did not understood very well how sleep modes and rtc function works, But if you read the guides and spend some time testing, it is quite easy to use.

Try different codes and see with your eyes how it works.

I recommend you to sleep all day and program the wake up at one certain hour every day. You can use sleep, deep sleep or hibernate modes.

Bye


Top
 Profile  
 
 Post subject: Re: Sensor HC-sr04
PostPosted: Fri May 25, 2012 11:45 am 

Joined: Sun Feb 12, 2012 3:10 pm
Posts: 127
Sisko wrote:
Hey!

when I started using waspmote I did not understood very well how sleep modes and rtc function works, But if you read the guides and spend some time testing, it is quite easy to use.

Try different codes and see with your eyes how it works.

I recommend you to sleep all day and program the wake up at one certain hour every day. You can use sleep, deep sleep or hibernate modes.

Bye


Sisko thanks but I DID read the rtc guide and unfortunately in mu opinion on this topic is not crystal clear.

The "trying" factor I know, and I did a little, but nothing happened (i.e. it did not wake up at the exact time I want), that Is why i wanted libelium-dev to tell me what i did wrong or tell me an example code to do what I requested.

And yes of course I will sleep most of the time and only wake up a few times with hibernate (hibernate allow me to go much longer on batteries than deepSleepMode).

So please libeliu-dev, I would like your feedback on what is wrong with that code or just provide me an example on how ot wake up from hibernate everyday at 23:00 for example.


Top
 Profile  
 
 Post subject: Re: Sensor HC-sr04
PostPosted: Fri May 25, 2012 9:32 pm 

Joined: Sun Feb 12, 2012 3:10 pm
Posts: 127
Dear Libelium-dev,

Please help me figure this out!
I even tried to run the rtc complete example and it doesn't work on my waspmote! (even though it is not with hibernate this example here..)

The output is this:

USB port started...
Init RTC
Time: Friday, 12/05/25 - 21:27.47
Alarm1: 25, 12:05:00 - 21:28:30ý

There is the strange character 'ý' and it remain stuck there, nothing goes on..
Looking forward to hear from you.


Top
 Profile  
 
 Post subject: Re: Sensor HC-sr04
PostPosted: Sat May 26, 2012 3:30 pm 

Joined: Sun Feb 12, 2012 3:10 pm
Posts: 127
Update:

I tried this code: PWR.hibernate("26:14:47:00", RTC_ABSOLUTE, RTC_ALM1_MODE2); and it works if i specify the date, except that when it wakes up it runs the program from the setup() function:

void setup(){
USB.begin();
RTC.ON();
USB.println(RTC.getTime());
// Checks if we come from a normal reset or an hibernate reset
PWR.ifHibernate();
USB.println("Powering...");
}

But it prints the date and does nothing else (does not print powering anymore), remains stuck there.
I tried to do: PWR.hibernate("00:14:47:00", RTC_ABSOLUTE, RTC_ALM1_MODE2);
But with 00 does not work!!

I tried: PWR.hibernate("14:47:00", RTC_ABSOLUTE, RTC_ALM1_MODE3); But it DOES NOT WORK.

What it might happen is that I also do not catch the reset correctly.
Normally I do this: if( intFlag & HIB_INT ) doStuff();

But I saw in an example with the alarms that they use : if( intFlag & RTC_INT ) when working with alarms, so I am wondering if I don't catch it correctly since that in my 1st example (PWR.hibernate("26:14:47:00", RTC_ABSOLUTE, RTC_ALM1_MODE2);) it starts the setup and does nothing more!

Can you please have an extended conversation monday morning? Because it is going to take forever for me to solve this problem if you are answering only 1-2 times every morning. and in the afternoon there is never anyone in the forum.


Top
 Profile  
 
 Post subject: Re: Sensor HC-sr04
PostPosted: Sat May 26, 2012 7:09 pm 

Joined: Sun Feb 12, 2012 3:10 pm
Posts: 127
It's working now.

Even if I want to wake up everyday at 23:00:00, I still have to add the 00:23:00:00 even if i use MODE3. I thought the string had to change. Plus I deleted something that didn't make me catch the hibernate.

Now the only thing i am missing is the sensors, I have to find one i can use for my project. Do you guys know anyone (beside the one on cooking hacks?)

Thanks a lot for the moment, and this post is done.
We will talk more, i am sure! xD


Top
 Profile  
 
 Post subject: Re: Sensor HC-sr04
PostPosted: Mon May 28, 2012 8:23 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
maeishoj,

we are glad that your application is working now.

However, we can not recommend a different sensor that Libelium's sensor or cooking hack's sensor.

Best Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 6 of 6   [ 56 posts ]
Go to page Previous  1, 2, 3, 4, 5, 6


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use