## How the internet of things can build more healthy, livable, and walkable cities

**The dream of walkable cities and livable downtown areas.**

* Desire by cities to transform themselves into modern high density living environments.
* Long commutes, concerns about the environment, and changing cultural attitudes are spurring an interesting downtown living.
* Design of cities is changing to accommodate these cultural shifts. However, cities lack the data to inform the design.
* Lots of potential information which could better inform how the city is planned is currently being lost.

**The technology behind the system**

* Arduino Board
* Particle Electron Board
* Light and Photoresistor
* Humidity and Temperature Sensor
* Sound Sensor
* Gas Sensor
* Various data mining and file management software.

**Use case 1: improving walking traffic flow**

* Tracking the movement of walkers could provide many useful insights into traffic patterns.
* How do varying levels of noise impact walking? How about rain? Temperature?
* People avoid a certain dark area at night, it may seem sketchy and unsafe.
* This tracking system is anonymous. It doesn’t record who it is passing by.

**Use case 2: measuring noise and air pollution**

* Noise pollution can reduce the value of properties, can harm hearing, and can discourage walking. However, little noise pollution data is collected.
* Air pollution and bad smells can negatively impact the health of walkers. Carbon monoxide and methane are especially problematic and common compounds which would be hazardous.

**Use Case 3: Detailed city environment maps**

* The gas sensor detects several gases dangerous to human health such as methane and carbon monoxide.
* Could be correlated with everything from littering data to levels of heat/cold, which matters for environmental planning.
* Could be used for bridge lifespan analysis, giving the city detailed information about bridge usage and environmental conditions

**Conclusion**

While eager to take advantage of the new technology which the internet of things offers, cities have yet to embrace the technology on a massive scale. SmartSteps could introduce cities to the potential of sensor technology while providing them with the information they need to effectively transform their downtown areas into the highly livable and walkable areas.

Registered URL is smartsteps.tech
## Inspiration

Coming into this hackathon I wanted to create a project that I found interesting and one that I could see being used. Many of my projects I have done in the past were interesting, but there were factors that would always keep them from being widely used. Often this is a barrier to entry. They required extensive setup for the more minimal reward that they give. For Hack Western one of my goals was the create something that had a low barrier to entry. However a low barrier to entry means nothing if the use is not up to par. I wanted to create a project that many people could use. Based on these two concepts, ease of use and wide ranging use, I decided to create a chat bot that automates answering science questions.

## What it does

What my project does is very simple. On the messaging platform, discord, you message my bot a question. It will attempt to search for a relevant answer. If one is found then it will give you a bit of context and the answer that it found.

## How I built it

I built this project in three main sections. The first section is my sleuther. This searches the web for various science based questions as well as their answers. When a question is found, I use IBM's natural language processing api to determine tags that represent the topic of the question. All of this data is then stored on an Algolia database where it can be quickly accessed later.

The second section of my project is the server. To implement this server I used StdLib to easily create a web api. When this api is accessed it queries the Algolia database to retrieve any relevant questions and returns the best entry.

The third and final part of my project is the front end Discord bot. When you send the bot a message it will generate tags to determine the general topic of the question and using these it will query the Algolia index. It does this by calling the StdLib endpoint that was setup as the server.

Overall these three sections combine to create my final project.

## Challenges I ran into

The first challenge that I ran into was unfamiliar technology. I had never used StdLib before and getting it to work was a struggle at times. Thankfully the mentors from StdLib were very helpful and allowed me to get my service up an running with not too much stress.

The main challenge for this project though it trying to match questions. As a user's questions and my database questions will not be worded the exact same way a simple string match would not suffice. In order to match the questions the general meaning of the question would need to be found and then those could be roughly matched. To try and work around this I tried various methods before setting on a sort of tag based system.

## Accomplishments that I'm proud of

To be honest this project was not my initial hackathon project. When I first started the idea was very different. The same base theme of low barrier to entry and widely usable, but the actual subject was quite different. Unfortunately part way through that project there was an insurmountable issue that did not really allow that project to progress. This forced me to pivot and find a new idea. This pivot came many hours into the hackathon already which severely reduced the time for my current hack. Because of this, the accomplishment that I think I am most proud of is the fact that I am here able to submit this hack.

## What I learned

Because I was forced to pivot on my idea partway through the hackathon a fair amount of stress was created for me. This fact really taught me the value of planning - most particularly determining the scope of the project. If I had planned ahead and wrote out everything that my first hack would have entailed then many of the issues that were encountered in it would have been able to be avoided.

## What's next for Science-Bot

I want to continue to improve my question matching algorithm so that it more questions can be matched. But beyond simply improving current functionality, I would like to add new scope to the questions my bot handles. This could be either increasing in scope, or increasing the depth of the questions. An interesting new topic would be questions about a very specific scientific area. I would likely need to be much more selective in the questions I match and this is something I think would pose a difficult and interesting challenge.
## Inspiration

Britafull is inspired by the ubiquitous student experience of living with people who may drive us crazy. Some roommates never wash their dishes, some don't take out the trash, but most insidious and aggravating of all... not refilling the Brita!! It's the little things that motivate you to finally get your own place. According to our ***highly*** scientific research, 80% of students face the **SAME** problem!

## What it does

Britafull detects when the Brita's water levels get below a certain point using weight. The next person to grab the Brita and empties it to that point has seconds before the speaker *kindly* reminds them to be a good roommate and fill up that Brita. If that's not incentive enough, waiting even longer triggers a text message reminder. That's right, the whole group chat knows now.

Call it petty, but here at Britafull, we get results.

## How we built it

We used force sensing resistors to detect changes in force accounting for the presence or absence of the Brita. This information (analog) is passed to an Arduino which converts to a digital signal that is sent to our Raspberry Pi. We programmed primarily in Python and implemented functions to check when the Brita is empty based on the input data; if it is, we then trigger an alarm which prompts the user to refill. Lastly, if the Brita remains unfilled, we use Twilio to send a message to the entire roommate group chat that someone needs to get on their Brita game!

## Challenges we ran into

As with many hardware hacks, our challenges were related to finding the right parts to use, and connecting the Raspberry Pi, Arduino, and our personal computers! Once we gathered the resistors that were compatible with the sensors to take the measurements we needed, we ran into compatibility problems that came from running Twilio's API with the rest of our backend interface. Also, we needed a Brita (generously provided by a fellow hacker)!!

When working with Force-Sensing Resistors to obtain the weight of the Brita, we found that results often fluctuated as the water and sensor settled alike. To counter this, we found that gathering data across several seconds in 500ms intervals gave us a reliable set of data points, which we cleaned up with numpy for further accuracy.

## Accomplishments that we're proud of

This was many of our first hackathons and first experiences doing a Hardware Hack! We are proud of ourselves for championing through the in-person experience and coming up with such a funny yet overwhelmingly practical product.

## What we learned

For those of us without hardware experience, we learned how hardware-software system interfaces work! We also learned that the student housing experience is, indeed, universal.

## What's next for Britafull

Britafull will never stop finding ways to manage your household and roommate problems for you. One way we could advance our platform is by implementing a machine learning algorithm that identifies the roommate in violation of the first roommate commandment: thou shalt refill the Brita as SOON AS IT'S EMPTY.

In our pursuit of ensuring nonconfrontational hydration for all, we created a product mockup of Britafull should it ever hit the market. Featuring strong ABS plastic, inductive charging, force-sensing resistors, thin piezoelectric speakers, and ultrathin lithium batteries, we made sure that it would fit in with your daily routine and kitchen aesthetic without a hitch!