All Projects → jimbobbennett → smart-garden-ornaments

jimbobbennett / smart-garden-ornaments

Licence: MIT License
The smart garden ornaments project! 🦩🌱🤖

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to smart-garden-ornaments

pigpio-client
A nodejs client for pigpio socket interface.
Stars: ✭ 24 (+20%)
Mutual labels:  raspberrypi
rpi-docker-letsencrypt-nginx-proxy-companion
RPI-compatible LetsEncrypt companion container for nginx-proxy
Stars: ✭ 42 (+110%)
Mutual labels:  raspberrypi
jlcross
Dockerfiles for arm devices e.g. Raspberry Pi Series
Stars: ✭ 25 (+25%)
Mutual labels:  raspberrypi
raspiApWlanScripts
Wifi station/AP mode scripts
Stars: ✭ 24 (+20%)
Mutual labels:  raspberrypi
pi-asciicam
A live stream ASCII webcam server for Raspberry Pis using websockets, written in go.
Stars: ✭ 18 (-10%)
Mutual labels:  raspberrypi
cpuminer-arm
CPU Miner (minerd) for Raspberry Pi and other ARM based boards
Stars: ✭ 17 (-15%)
Mutual labels:  raspberrypi
pirrot
A radio repeater controller (supporting both simplex and duplex operation modes) for the RaspberryPi.
Stars: ✭ 25 (+25%)
Mutual labels:  raspberrypi
Electronic-Cheat-Sheet-and-Schematics-MegaCollection
A lot of Files of various Electronic Shit that I have collected over the years. Cheatsheet, Schematics, Pinouts, Pdf, and More... Enjoy it ;)
Stars: ✭ 43 (+115%)
Mutual labels:  microbit
MagPiDownloader
Downloads all the Mag Pi (Raspberry Pi Magazine) on your Windows, Mac OS or Linux or with Docker
Stars: ✭ 70 (+250%)
Mutual labels:  raspberrypi
root-ro
Read-only root filesystem for Raspbian Stretch (using overlay)
Stars: ✭ 75 (+275%)
Mutual labels:  raspberrypi
AdGuard-WireGuard-Unbound-Cloudflare
The Ultimate Network Security Guide 🔒 Protection | 🔎 Privacy | 🚀 Performance on home network 24/7 🕛 Accessible anywhere 🌏
Stars: ✭ 160 (+700%)
Mutual labels:  raspberrypi
DashGL-Library
Basic Matrix Manipulation Library For OpenGL Written in C
Stars: ✭ 20 (+0%)
Mutual labels:  raspberrypi
WoR-Translations
Language files for the Windows on Raspberry imager.
Stars: ✭ 34 (+70%)
Mutual labels:  raspberrypi
Raspberry-ssd1306
ssd1306 Command Line Tool for Raspberry Pi
Stars: ✭ 34 (+70%)
Mutual labels:  raspberrypi
RPiPlay
An open-source AirPlay mirroring server for the Raspberry Pi. Supports iOS 9 and up.
Stars: ✭ 4,113 (+20465%)
Mutual labels:  raspberrypi
MobileNetV2-PoseEstimation
Tensorflow based Fast Pose estimation. OpenVINO, Tensorflow Lite, NCS, NCS2 + Python.
Stars: ✭ 99 (+395%)
Mutual labels:  raspberrypi
wifi-connect
Easy WiFi setup for Linux devices from your mobile phone or laptop
Stars: ✭ 1,043 (+5115%)
Mutual labels:  raspberrypi
prettier-markdown
Parse code blocks in markdown files and run prettier on them
Stars: ✭ 37 (+85%)
Mutual labels:  blocks
pxt-bluetooth-gamepad
BLE HID Gamepad module for micro:bit
Stars: ✭ 20 (+0%)
Mutual labels:  microbit
hometop HT3
Pimp your heater.
Stars: ✭ 34 (+70%)
Mutual labels:  raspberrypi

Smart Garden Ornaments

License: MIT Twitter: jimbobbennett

Ever wanted to track things happening in your garden, neighborhood or school using smart garden ornaments? Now you can using BBC micro:bits and a cloud-based IoT service.

A bird box in a tree with a micro bit visible inside

This is a fun week long project for those who want to take their first steps into the world of the Internet of Things (IoT) using devices that are popular with kids, and tools that make programming accessible to young developers. You'll use a Raspberry Pi along with some BBC micro:bits and any garden ornaments you have to hand to build a smart neighborhood, gathering data such as temperature and noise levels and displaying it in the cloud using Azure IoT Central.

This is great for families, groups of friends, or even in the classroom - gathering data around your school.

How it works

Each smart garden ornament is based around a BBC micro:bit, programmed using Microsoft MakeCode. These micro:bits sit inside whatever ornament you have, such as a bird box or garden gnome, and gather data about the outside world - also know as telemetry. This data can come from the built-in temperature sensor, or external sensors such as microphones, proximity senors or soil moisture sensors. These micro:bits will then send this data to other micro:bits via the built-in radio. Each micro:bit will forward on the message just like passing notes in class until it reaches a 'hub' micro:bit connected to a Raspberry Pi. This will then send the message on to the cloud to plot on a chart.

The hub

This project is not limited to one household - if you have neighbors they can also have smart garden ornaments as long as they are positioned close enough for the micro:bits to talk to each other. If you want to share data between households that are further apart, you can do this by using multiple hubs all connected to the same cloud service. It's also perfect to set up in a school, tracking data in classrooms or the playground.

What you'll need

Coding skills

Although this guide tries to be as easy to use as possible, you will still need some technology skills. The Pi-based hub should be built by someone confident setting up a Raspberry Pi and have a basic understanding of coding with Python. The micro:bits should be programmed by someone confident programming with block-based coding.

The following icons are used to indicate if a section covers the Azure IoT Central, using the Raspberry Pi or the micro:bit:

Icon Description
IoT Central logo Azure IoT Central - will need someone with an Azure account
Raspberry Pi Logo Raspberry Pi - will need someone confident setting up and programming a Raspberry Pi
The micro:bit logo micro:bit - will need someone confident using block based programming on a BBC micro:bit

If you have never set up a Pi before, you can find some great guides on the Raspberry Pi Help site.

To learn mode about coding a micro:bit with Microsoft MakeCode, check out all the tutorials at makecode.microbit.org.

The Hub

For the 'hub' that allows your micro:bits to connect to the cloud, you'll need the following:

  • A Raspberry Pi running Raspberry Pi OS or Raspberry Pi OS Lite. Any Pi will do that has internet connectivity, even the Pi Zero W (but not the base Pi Zero without WiFi).

  • An SD card for the Pi, at least 8GB in size

  • A BBC micro:bit

  • An appropriate USB cable to connect the micro:bit to the Pi. For example if you are using a Pi 3 or 4 you'll need a USB to micro USB cable, if you are using a Pi Zero you'll need a micro USB to micro USB cable or an adapter.

  • A USB power supply for the Pi. For the Pi 4 this needs to be USB-C, for other Pis this needs to be micro USB.

  • An Azure subscription. Instructions will be provided on how to set this up in the first days project, and you'll either need to be a student over the age of 18 in higher education to sign up for a student account, or have access to a credit card to sign up for a free account.

    If you sign up for a free account, your credit card will NOT be charged, it is just needed for verification.

The hub components

Smart garden ornaments

For each smart garden ornament you'll need the following:

  • A BBC micro:bit

  • A battery pack for the micro:bit, along with batteries. To keep the micro:bits running as long as possible, use a 2xAA battery pack, with AA alkaline batteries. Rechargeable batteries are not recommended as they provide a lower voltage. You can read more recommendations on powering the micro:bit in the micro:bit support docs.

    Although you can use AAA batteries, they don't last anywhere near as long, so to gather data over longer periods to time use AA batteries. You should be able to gather data for about a week on one pair of AA batteries

  • A garden ornament that can house the micro:bit and keep it dry in the event of rain. This could be a bird box, a garden gnome, fairy house, anything that is outdoor safe and has space to put the micro:bit and battery pack inside.

  • Blank stickers to put labels on the micro:bits

  • A USB cable that can connect to your computer to program the micro:bit

The hub components

The micro:bits have a temperature sensor built in, so if you are just tracking temperature this is all you'll need. If you want to track other things then you'll need different sensors. Some need to be purchased as a sensor (such as a microphone to track noise levels or a proximity sensor), others such as a soil moisture sensor can be made yourself. This project will cover the following sensors:

  • Temperature sensor
  • Light sensor
  • Home made soil moisture sensor

If you want to use other sensors, check out the great kits from places like SparkFun and Kitronik.

Cost

The main cost to this project is the hardware. The project uses hardware that combines relatively low cost with ease of use - cheaper parts could be used with an added complexity.

The cloud service used may come with a small cost. It is free for the first 2 devices used, so if you want to use more smart ornaments then your Azure account will be billed. If you have signed up for a student or free account this can come from the credit you are given on sign up leading to no actual cost. The cost at the time of writing is US$0.70 per additional device per month. You can read more details on pricing on the Azure IoT Central pricing page.

How the project works

If you just want to get everything up and running, you can skip this part and dive into the setup.

The flow of messages in the project

The basic architecture is:

  • A micro:bit in a smart garden ornament reads a value such as temperature
  • This value, along with an ID, is sent as a message in coded form over the radio to any device that is listening
  • If a device picks up a message from another device, it re-sends it over the radio (with checks to make sure it only re-sends a message once)
  • The hub micro:bit connected to the Pi listens for messages from any device, and when detected sends them over the serial port to the Pi
  • The Pi listens on the serial port for messages. When it gets one it sends it to IoT Central, pretending to be the micro:bit by having multiple connections to IoT Central as using different device IDs.

If you want to understand more about the architecture and how the code works, check out the following:

How this guide is structured

This guide is broken down into a number of days. For each day the project should take no more than about an hour and adds another part to the finished project. Each day will contain multiple parts, labelled as either beginner or advanced. The advanced parts should be done by someone with some experience, the beginner parts are ideal for those just getting started with block based programming. Older kids with some programming experience may be able to complete the entire project, but will require an adult to set up the Azure resources as these may require a credit card and require a sign up from someone over the age of 18.

Follow the links below to access the steps for each day:

All the code you need for the Pi is in the pi-hub folder. The code for the micro:bit portions is in separate GitHub repos that can be imported into MakeCode. The code for the micro:bit Hub is at github.com/jimbobbennett/smart-garden-ornaments-microbit-hub, and the device code is available at github.com/jimbobbennett/smart-garden-ornaments-microbit-device.

As new concepts are covered (such as setting up IoT Central, or using new blocks in MakeCode), full descriptions are given with detailed pictures. The next time the same concept is covered, there will be less pictures and description.

Contributing to this project

We'd LOVE you to contribute to this project! If you find mistakes in this guide please raise an issue or a PR. If you have additional ideas for ways to extend this project, or want to add instructions for more sensors or different ornaments please fork this repo and add them to the Additional ideas section in a PR. We'd also love it if you want to share your stories - how did you set this up, what ornaments did you use, what data did you gather. Please fork the repo raise a PR to add these to the Stories section. All contributions must follow our code of conduct.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Learn more, get certified

If you want to learn more about Azure IoT Services, then check out the following:

Once you have upskilled as an IoT developer, why not get certified with our upcoming AZ-220 Azure IoT Developer certification. Check out the details on our certification page

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].