Micro:Bit Chicken Coop Alarm

0
Micro:Bit Chicken Coop Alarm

We have chickens. Three to be exact.

You would have learned this from my recent activity Coding a Game of 2 Truths & A Lie. Their names are Chicken Ball, Chicken Parmesian and Chicken Piccata. Don’t be fooled, they are egg layers, not meat birds. When we first got them we were told not to “name our food pets” in case we get attached. So we did the exact opposite and gave them food names. We also have two dogs – Sir Wellington is a grumpy 10 year old boxer and Stevie Nicks is our 2 year old boxer puppy. We also have a cat named Tom Putty.

Yes, music is a big part of our lives.

Recently a neighbour spotted a fox running nearby. We live relatively rural, near the lake with some fields close by so I wasn’t surprised to hear this as this isn’t the first time. And as luck would have it, I was recently playing with the bluetooth chips on my Micro:Bits. BOOM! I have an idea! The Micro:Bit can detect movement!




So, the dork in me sat down to write a little app that determines movement and pings another Micro:Bit of said movement in order to sound an alarm. Using bluetooth, one micro:bit detects a shake from the coop door and broadcasts to the second micro:bit connected to the speaker. If a shake message is sent, the second micro:bit sounds the alarm and displays to the LEDs. Hopefully we can keep the predators away!

Check out the video below!

 

For more lessons, activities and ideas, grab a copy of my book, Code Breaker, on Amazon here!

 

 

(Visited 732 times, 1 visits today)

Leave a Reply

Name
Name*
Email
Email *
Website
Website