I built a trip wire for the post box that I'm connecting. It's however based on a mercury tilt sensor so I'm really not sure whether I think it's a great idea putting it to use (at least not with a sturdy case...). However, I can share my code:
#define DIGITAL_INPUT_SENSOR 2 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!)
#define INTERRUPT DIGITAL_INPUT_SENSOR-2 // Usually the interrupt = pin -2 (on uno/nano anyway)
MyMessage msgTripped(CHILD_ID_TRIPPED, V_TRIPPED);
void setup()
{
gw.sendSketchInfo("Postal", "1.0");
gw.present(CHILD_ID_TRIPPED, S_MOTION);
pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input
}
void loop()
{
boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == LOW;
if(tripped) {
gw.send(msgTripped.set("1")); // Send tripped value to gw
}
gw.sleep(INTERRUPT,FALLING, SLEEP_TIME);
}
@xefil said:
Thanks @hek and @kalle
Sorry, but I'm not good to understand the debug of the scanners.
In the RF24/examples/scanner/ the range is between 0000->->->7777
Those are the high order nibble of the channel byte. The low order nibble is just below it.
The 125 channel numbers are printed "sideways" in hex.
I would expect a list of channels between 1 and 13.
You're thinking of wi-fi. This isn't wi-fi.
In the second scanner (wiFi scanner found on arduino forum) It's more accurate. It seems noisy between channel 3 and 9.
So, the questions are:
What does default channel 76 mean? 2476Mhz?
yes
Would mean above channel 13, on channel 14. In this case these channels are free, based on the results. I've seen I can use:
#define RF24_CHANNEL 76 //RF channel for the sensor net, 0-127
How to interpret the scanners result? Most of all the "RF24/examples/scanner/" which has an output I cannot identify in a channel.
The bigger the number below the channel, the more active it is.
I would like to understand the result and so choose the right channel, not only trying without knowing what I'm doing
Thanks a lot for the support!
Simon
@gohan said in Assistance on sensor project:
While you are at it, get some extra parts too, just in case you fry something since in the beginning it is not that hard.
And they're cheap.
@Zwer2k my expectations seem correct. I created a bug report that also includes a rudimentary workaround.
https://github.com/mysensors/MySensors/issues/1496#issue-968399284
@Nca78 said in Dimmable LED kitchen light (Arduino, APDS-9960, RGBWW led):
Do you use a relay to control the leds or still a MOSFET ?
i'm using mosfets.
@yury said in Wall Socket Insertable Node:
Looks cool! Do you have experience with capacities switches? I did not play much with them. afraid to use close to AC interference though...
You need to use a capacitive IC with active shielding, basically you have an extra electrode around your touch electrode and the touch IC will compare capacitive change of the touch electrode with capacitive change from the shield electrode. If the change is due to electrical interference then both electrodes will be changed in a similar way and the IC will not trigger.