Chat freely about anything...

User avatar
By Zim
#79728 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
User avatar
By torntrousers
#79735
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.
User avatar
By Zim
#79756 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