## Inspiration

We saw multiple different problems with pre-existing commercial smart home monitoring devices, they required separate devices and also rely on your existing Wi-Fi network to function.

## What it does

We-cu (mind the Carleton University pun) monitors your home using a multitude of different sensors ranging from temperatures sensors all the way to a gas detector that is used for detecting smoke which allow you to remotely monitor the status of your house and also receive notifications via text message, push notifications or even have it post on your facebook wall if anything happens in your house.

## How we built it

We used a Particle Electron which is a IoT board that has support for 3G connectivity, directly connected to a range of sensors and also connected to our firebase database as well as tied into many of our connectors that provide a notification service as well as a monitoring service. We used C++ to code the particle electron and react-native for the mobile web app that allows you to monitor your house. In addition we used twilio API to send sms messages to alert you of changes in your home even if you do not have data.

## Challenges we ran into

This was the first hardware hack that any of us have done before, we had to learn how to connect all of the different sensors to the particle electron and also properly handle the data that's coming in from all the sensors and also redirect them to the proper connectors that we have made.

## Accomplishments that we're proud of

We are proud to be able to present we-cu which is a fully functional independent home monitoring solution in 24 hours without any prior experience with using any hardware before (and also it not blowing up or catching on fire).

## What we learned

We got to play around with a lot of different modules and the Particle Electron, learned the basics of building a simple circuit and also handling data from all of the different modules.

## What's next for we-cu

Next, we would make a better enclosure for our system (maybe something 3d printed?).
# seedHacks

Drone-mounted tree planter with a splash of ML magic!

## Description

**Our planet's in dire straits.**

Over the past several decades, as residential, commercial, and industrial demands have skyrocketed across several industries around the globe, deforestation has become a major problem facing humanity. Though we depend on trees and forests for so much, they seem to be one of our fastest depleting natural resources. As our primary provider for oxygen and one of our biggest global carbon sinks, this is very dangerous news.

**seedHacks is a tool to help save the world.**

Through the use of cloud-based image classification, live video feed, geospatial optimization, and robotic flight optimization, we've made seedHacks to facilitate reforestation at a rate and efficiency that people might not be able to offer. Using our tech, a drone collecting simple birds-eye images of a forest can compute the optimal positions for seeds to be planted, aiming to approach a desired forest density collected from the user. Once it has this map, planting them's just a robotics problem! Easy, right?

## How did we build?

We broke the project up into three main parts: video feed and image collection, image tagging and seed location optimization, and user interface/display.

To tackle image/video, we landed on using pygame to set up a constant feed and collect images from that feed upon user request.

We then send those captured images to a Microsoft could computing server, where we trained an object detection model using Azure's custom-vision platform which returns a tagged image with locations of the trees in the overhead image.

Finally, we send to an optimization algorithm that utilizes all the free space possible as well as some distance constraints to fill the available space with as many trees as possible. All this was wrapped up in an elegant and easy-to-interpret UI that allows us to work together with the expertise of users to make the best end-result possible!

## Technical Notes

* Azure custom vision was used to train an object detection model that could label tree and trees. We used about 33 images found online to train this machine learning model, resulting in a precision of 82.5%
* We used the custom vision API to send our aerial view images of forests to the prediction endpoint which returned predictions consisting of confidence level, label, and a bounding box.
* We then parsed the output of the object detection by creating a 2D numpy array in Python representing the original image. We filled indices of the array with 1’s where pixels were labeled as “tree” or “trees” with at least a 50% confidence. At the same time, we extracted the max width and height of the canopy of the trees to automate the process for users. The users are allowed to input a buffer, as a percentage, which increases the bounding box for tree growth based on the current density/present species; this is especially important if the roots of the tree need space to grow or the tree species is competitive.
* After the 2D array was filled with pre-existing trees, we iterated through the array to find places where new trees could be planted such that there was enough space for the tree to mature to its full canopy size. We labeled these indices with 2 to differentiate between existing trees and potential new trees.

## What did we learn?

First off, that selecting and training good object detector can be complicated and mysterious, but definitely worth putting some time into. Though our initial models had promise, we needed to optimize for overhead forest views, which is not something that's used to train too many.

Second, that keeping it simple is sometimes better for realizing ideas well. We were very excited to get our hands on a Jetson Nano and trick it out with AlwaysAI's amazing technologies, but we realized some time in that because we didn't actually end up using the hardware and software to the fullest of their abilities, they might not be the best approach to our particular problems.

So, we simplified! Finally, that the applicability of cutting-edge environmental robotics carries a lot of promise going forward. With not too much time, we managed to develop a somewhat sophisticated system that could potentially have a huge impact - and we hope to be able to contribute more to the field in the future!

## What's next for seedHacks?

Next steps for our project would include:

* Further optimization on seed location (more technical approach using botantical/silvological expertise, etc)
* Training object detector better and better to pick out individual and clusters of trees from an
overhead view
* More training on burnt trees and forests
* Robotic pathfinding systems to automatically execute paths through a forest space
* Actuators on drones to make seed planting possible
* Generalizing to aquatic and other ecosystems
## Inspiration

We wanted to create a proof-of-concept for a potentially useful device that could be used commercially and at a large scale. We ultimately designed to focus on the agricultural industry as we feel that there's a lot of innovation possible in this space.

## What it does

The PowerPlant uses sensors to detect whether a plant is receiving enough water. If it's not, then it sends a signal to water the plant. While our proof of concept doesn't actually receive the signal to pour water (we quite like having working laptops), it would be extremely easy to enable this feature.

All data detected by the sensor is sent to a webserver, where users can view the current and historical data from the sensors. The user is also told whether the plant is currently being automatically watered.

## How I built it

The hardware is built on an Arduino 101, with dampness detectors being used to detect the state of the soil. We run custom scripts on the Arduino to display basic info on an LCD screen. Data is sent to the websever via a program called Gobetwino, and our JavaScript frontend reads this data and displays it to the user.

## Challenges I ran into

After choosing our hardware, we discovered that MLH didn't have an adapter to connect it to a network. This meant we had to work around this issue by writing text files directly to the server using Gobetwino. This was an imperfect solution that caused some other problems, but it worked well enough to make a demoable product.

We also had quite a lot of problems with Chart.js. There's some undocumented quirks to it that we had to deal with - for example, data isn't plotted on the chart unless a label for it is set.

## Accomplishments that I'm proud of

For most of us, this was the first time we'd ever created a hardware hack (and competed in a hackathon in general), so managing to create something demoable is amazing. One of our team members even managed to learn the basics of web development from scratch.

## What I learned

As a team we learned a lot this weekend - everything from how to make hardware communicate with software, the basics of developing with Arduino and how to use the Charts.js library. Two of our team member's first language isn't English, so managing to achieve this is incredible.

## What's next for PowerPlant

We think that the technology used in this prototype could have great real world applications. It's almost certainly possible to build a more stable self-contained unit that could be used commercially.