@mfalkvidd
Thanks alot. Now the wake-up detection works perfectly
Posts made by GeforceGamer
-
RE: Dectect wake up source
-
RE: Dectect wake up source
bool interruptReturn; void loop() { if (interruptReturn == true) // Woke up by changing pin { offen = 1; Serial.println("aufwachen durch Deckel"); } if (interruptReturn == false) // Woke up by Timer { offen = 0; Serial.println("aufwachen durch Timer"); }
-
RE: Dectect wake up source
@Yveaux
I use an reedswitch as interrupt source. It is use in a bin to measure the level. I use the CHANGE command to always wake up the node. No matter if the lid is opened or closed. -
RE: Dectect wake up source
unfortunately it does not work with me so. I don't know whats wrong. At the first start of the node it works. But the wakeup by time shows wake up by interrupt and the wake by interrupt shows "wake up by interrupt" too.
if (interruptReturn == true) // Woke up by changing pin { wakeup= 1; Serial.println("wake up interrupt"); } if (interruptReturn == false) // Woke up by Timer { wakeup= 0; Serial.println("wake up timer"); } interruptReturn = sleep(digitalPinToInterrupt(reedswitch), CHANGE, SLEEP_TIME);
-
RE: Dectect wake up source
@nagelc Thank you.
@sundberg84 Thanks for the great example. It really helped me a lot. I will try it out the days. -
Dectect wake up source
Hi,
is it possible to dectect how my node wakes up? If the wake up cames form the button or by timer?
this is my sleep code:
sleep(digitalPinToInterrupt(reedswitch), CHANGE, SLEEP_TIME);
I want to check something like this:
If (wakeUpByTime == 1) { Serial.println("Node wakes up by timer"); } else { Serial.println("Node wakes up by Button"); }
-
RE: Raspberry GW rfm95 wont work
Here the debug log:
pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw Feb 12 11:34:17 INFO Starting gateway... Feb 12 11:34:17 INFO Protocol version - 2.3.2-beta Feb 12 11:34:17 DEBUG Serial port /dev/ttyMySensorsGateway (115200 baud) created Feb 12 11:34:17 DEBUG MCO:BGN:INIT GW,CP=RLNGL---,REL=3,VER=2.3.2-beta Feb 12 11:34:17 DEBUG TSF:LRT:OK Feb 12 11:34:17 DEBUG TSM:INIT Feb 12 11:34:17 DEBUG TSF:WUR:MS=0 Feb 12 11:34:17 DEBUG !TSM:INIT:TSP FAIL Feb 12 11:34:17 DEBUG TSM:FAIL:CNT=1 Feb 12 11:34:17 DEBUG TSM:FAIL:DIS Feb 12 11:34:17 DEBUG TSF:TDI:TSL Feb 12 11:34:27 DEBUG TSM:FAIL:RE-INIT Feb 12 11:34:27 DEBUG TSM:INIT Feb 12 11:34:27 DEBUG !TSM:INIT:TSP FAIL Feb 12 11:34:27 DEBUG TSM:FAIL:CNT=2 Feb 12 11:34:27 DEBUG TSM:FAIL:DIS Feb 12 11:34:27 DEBUG TSF:TDI:TSL
Where can I find the pins in the config? I think there is something wrong.
-
Raspberry GW rfm95 wont work
Hi,
I use an The Dragino LoRa/GPS_HAT and an Adafruit rfm95 Modul. But I can't get any of them to work on my Raspberry. Are there any specific wiring or configuration for them?For the Adafruit I used this wiring:
5V -> 5V
GND -> GND
G0 -> 22
SCK -> 23
MISO -> 21
MOSI -> 19
CS -> 24
RST -> GND