-->
Page 2 of 3

Re: ESPnow peer to peer data implementation?

PostPosted: Wed Dec 26, 2018 6:13 pm
by Zim
Hi Torn, thanks for the reply. Can you help me with the bare basics of ESPnow? I am making a "driveway alarm which uses a solar/battery powered master. A PIR wakes up the outdoor master from deep sleep and transmits the battery voltage to the indoor slave. The received transmission invokes an alarm buzzer and LED. The transmission is displayed on a OLED on the slave and indicates the master battery condition(voltage). The OLED also indicates the number of triggers that have occured. I have this working fine with the ESP WiFi but there is a 3 - 4 sec. delay from WiFi overhead. ESPnow is much faster....
I don't actually need any text transmitted only the int eg. 14.2 Do I still need the below declaration?

struct __attribute__((packed)) DataStruct {
char text[32]; <<< DO I NEED THIS?
int battvolts;
};


Thanks Again
Zim

Re: ESPnow peer to peer data implementation?

PostPosted: Thu Dec 27, 2018 3:56 am
by torntrousers
Zim wrote:...I don't actually need any text transmitted only the int eg. 14.2 Do I still need the below declaration?

struct __attribute__((packed)) DataStruct {
char text[32]; <<< DO I NEED THIS?
int battvolts;
};


No, its fine to remove the line and it should still work fine.

Re: ESPnow peer to peer data implementation?

PostPosted: Fri Dec 28, 2018 12:04 pm
by Zim
Thanks Torn, I shall give it a try

Re: ESPnow peer to peer data implementation?

PostPosted: Fri Dec 28, 2018 4:02 pm
by Zim
Torn
I have gotten the senor side working. Its the slave side that puzzles me. Do you have a slave script to compliment your "ESPnow-sensor-minimal" available? Its the slave I'm having grief with now...

Thanks