Hi Guys,
Looking to be in the space this evening for an electronics session - anyone coming down tonight as well ?
Courty
Hi Guys,
Looking to be in the space this evening for an electronics session - anyone coming down tonight as well ?
Courty
I’m planning to be there.
Will drop buy later
Have been playing about with our PIR detectors today at home, was thinking of exploring using a protocol called MQTT to report back movement information to indicate if people are in the space.
Initially just experimenting with end of line resistors…
#define NO_MOTION 0
#define MOTION 1
#define TAMPER 2
int prev_state;
void setup() {
Serial.begin( 9600 );
}
void loop() {
int state;
int value = analogRead( A0 );
if ( value >= 1000 || value <= 100 ) {
state = TAMPER;
} else if ( value >= 600 && value <= 650 ) {
state = MOTION;
} else {
state = NO_MOTION;
}
if ( state != prev_state ) {
Serial.println( state );
}
prev_state = state;
}
Yeah, not much, main issue is I don’t have a laptop with my stuff on it.
I was thinking of making a page you can view the status of each active device, MQTT is a publish/subscribe model so the website could show this information.
But we could easily say that if the alarm is armed and any of the sensors are activated then an alarm could be sounded, and a phone number dialed.
Web interface for members to view, could also show who did a think in some cases, like Laser cutter in use by Joe Blogs, or Alarm disarmed by Mary Berry.
I’ll be down ! I’ll be fiddling with stepper motors
Electronics Night was good tonight. We ran out of bench space due to the number of people working on projects… A really good mix of experience and novices as well. Great evening…
Thanks everyone who came, starting to feel like a real community at our little Thursday club !
Courty
Reminds me of the good old days.