Hi guys..I have been sending wirlless data using RF modules..433MHz....iam getting the hang of it now...now what i wanna do is..use a power saving mode..so that my battery doesnt get eaten up too fast..during transmittion...i have used watchdog timer and jeelib here is my schematic code....but it says error like this
example11p1tx.ino: In function 'void __vector_6()':
example11p1tx:22: error: 'Sleepy' has not been declared
example11p1tx.ino: In function 'void loop()':
example11p1tx:38: error: 'Sleepy' has not been declared
here is the code...
#include <VirtualWire.h> #include <JeeLib.h>
#include <VirtualWire.h>
#undef int #undef abs #undef double #undef float #undef round
ISR(WDT_vect) { Sleepy::watchdogEvent(); }
void setup()
{
// Initialise the IO and ISR
vw_set_ptt_inverted(true); // Required for RF Link module
vw_setup(2400); // Bits per sec
vw_set_tx_pin(7);
int led = 13; // pin 1 is the TX pin on our Arduino Duemilanove
}
void loop()
{
const char *msg = "h"; // this is your message to send
vw_send((uint8_t *)msg, strlen(msg)); // send the data out to the world
vw_wait_tx(); // Wait for sending of message to finish.
Sleepy::loseSomeTime(5000);
}
Hi guys..I have been sending wireless data using RF modules..433MHz....iam getting the hang of it now...now what i wanna do is..use a power saving mode..so that my battery doesnt get eaten up too fast..during transmittion...i have used watchdog timer and jeelib here is my schematic code....but it says error like this
example11p1tx.ino: In function 'void __vector_6()':
example11p1tx:22: error: 'Sleepy' has not been declared
example11p1tx.ino: In function 'void loop()':
example11p1tx:38: error: 'Sleepy' has not been declared
here is the code...
#include <VirtualWire.h> #include <JeeLib.h>
#include <VirtualWire.h>
#undef int #undef abs #undef double #undef float #undef round
ISR(WDT_vect) { Sleepy::watchdogEvent(); }
void setup()
{
// Initialise the IO and ISR
vw_set_ptt_inverted(true); // Required for RF Link module
vw_setup(2400); // Bits per sec
vw_set_tx_pin(7);
int led = 13; // pin 1 is the TX pin on our Arduino Duemilanove
}
void loop()
{
const char *msg = "h"; // this is your message to send
vw_send((uint8_t *)msg, strlen(msg)); // send the data out to the world
vw_wait_tx(); // Wait for sending of message to finish.
Sleepy::loseSomeTime(5000);
}
sleepy is just a term really...of what ive searched online..#include <JeeLib.h> is the library for low pwer consumptions..and the interrupt service routine watch dog timer...ISR(WDT_vect) { Sleepy::watchdogEvent(); } mainly a setup for low power waiting. and then in in your actual loop..Sleepy::loseSomeTime(time) mainly replacing the delay function we generally use....i dont think there is more to it....kindly help if there is smething iam missing
riju:
Hi guys..I have been sending wirlless data using RF modules..433MHz....iam getting the hang of it now...now what i wanna do is..use a power saving mode..so that my battery doesnt get eaten up too fast..during transmittion...i have used watchdog timer and jeelib here is my schematic code....but it says error like this