## 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!
## Inspiration

One issue that we all seem to face is interpreting large sensor-based datasets. Whether it be financial or environmental data, we saw an opportunity to use LLMs to allow for better understanding of big data. As a proof of concept, taking care of a house plant or gardens was interesting because we could collect data and take actions based on physical metrics like soil moisture and sunlight. We were then inspired to take managing plants to the next level by being able to talk to the data you just collected in a fun way, like asking how each of your plants are doing. This is how RoBotany came to be.

## What it does

Through our web app, you can ask RoBotany about how your plants are doing - whether they need more water, have been overwatered, need to be in the shade, and many more questions. Each of your plants has a name, and you can ask specifically how your plant Jerry is faring for example. When you ask for a status update on your plants, our web app fetches data stored in our database, which gets a constant feed of information from the light and soil moisture sensors. If your plants are in need of water, you can even ask RoBotany to water your plants autonomously!

## How we built it

**Hardware**
The hardware portion uses an Arduino, a photoresistor, and a soil moisture sensor to measure the quintessential environmental conditions of any indoor or outdoor plants. We even 3D-printed a flower pot specially made to hold a small plant and the Arduino system!

**Frontend**
Our frontend was built with React and uses the Chat UI Kit from chatscope.

**Backend**
Our project requires the use of two CockroachDBs. One of the databases is continuously read and updated for the soil moisture and light level, while the other database is updated less frequently to toggle the plant sprinkler system. Our simple yet practical endpoints allow us to seamlessly send information back and forth between our arduino and AWS EC2 instance, using technologies such as pm2 and nginx to keep the API up and running.

**NLP**
To process user requests via our chatbot, we used a combination of a classification model on *BentoML* to categorize requests, as well as Cohere Generation for entity extraction and responding to more generic requests.

The process goes as follows:

1. The user enters a prompt.
2. The prompt gets sent to be categorized via BentoML.
3. The input and category get sent to Cohere Generation, along with some training datasets, to extract entities.
4. The category and entity get sent to a small class that processes and queries our CockroachDB via a Flask mini api.
5. The response gets forwarded back to the user that sent the initial prompt.

## Challenges we ran into

One of the main challenges that we struggled with was working with LLMs, something none of our team was very familiar with. Despite being extremely challenging, we were glad we dove into the subject as deep as we did because it was equally rewarding to finally get it working.

In addition, given that our electronic system was handling water, we wanted to make sure that our packaging protected our ESP32 and sensor boards. We started by designing a 3D printed compartment that would house everything from the electronics, to the Motor, to the plant itself. We quickly discovered a compartment that size would take well over 12 hours (we are at T-10 hours at that point). We modified our design to make it more compact, and were able to get a beautiful packaging done in time!

Finally, from CockroachDB to Cohere, our group was managing a couple different authentication systems. Between refreshing tokens, as well as group members constantly hopping on and off different components, we ran into an issue quickly in terms of how to share the tokens. The solution - was to use Syro’s secret management software.

## Accomplishments that we're proud of

Our project had over a dozen unique technologies as our team looked to develop new skills and use new tech stacks during this hackathon.

## What we learned

* Large Language Models (LLMs)
* How to connect multiple distinct technologies together in a single project
* Using a strongly-consistent database in CockroachDB for the first time
* Using object-relational mapping

## What's next for RoBotany

Some possible next steps include diversifying our plant sensor data, as well as making it more scalable, allowing users to potentially talk to an entire crop field!

In addition, our system was designed with modularity in mind. Expanding to new, very different avenues of monitoring, shouldn’t be complex tasks. RoBotany lays the groundwork for a smart platform to talk to variable sensor data.
## Inspiration

As college freshmen, we noticed that our team and many of our classmates often don't drink enough water throughout the day, and mostly because we forget to stay hydrated. Since most students own a water bottle, we thought of creating a water bottle modification that could detect how much water one drinks and both display it on the bottle and on an app in order to help people drink more water. Furthermore, the app would store the history of water consumption and give more analytics.

## What it does

An ultrasonic sensor is mounted to the lid of the water bottle and measures the distance from the lid to the current water level. Therefore, based on the diameter of the water bottle, the change in water level associated with drinking water can be converted to a volume of water consumed. The ultrasonic sensor then communicates with an Arduino Nano, which then interfaces with the user through push buttons and an LCD screen. Furthermore, a bluetooth module relays data to a phone app, which computes more advanced statistics about water consumption and health based off user height and weight.

## How we built it

We started by designing high-level goals for the project: it should measure water level, communicate with the phone, and display statistics. After that we began designing mounts and enclosures for the electronics and sensors, which were then modeled in Solidworks and 3D-printed. Additionally, we designed our necessary circuits in Fritzing, using and Arduino Nano, a HC-06 bluetooth module, a HC-SR04 ultrasonic sensor, a 9V battery, and a 16x2 LCD screen. The app was created in Android Studio, where we made three separate activities: a main screen, a settings menu, and a history screen. We coded firmware for the Arduino using the Arduino IDE to process values from the ultrasonic sensor, relay data to the phone, and to display data on the LCD.

## Challenges we ran into

We had to make a ergonomic and compact design since we were constrained to mounting everything on a water bottle. That proved to be difficult when designing our circuits since we had to fit a large amount of sensors and functionality into small compartments. Furthermore, we had to figure out algorithms to differentiate between different user activities such as opening the water bottle, drinking, re-capping the bottle, or even filling the bottle up.

## Accomplishments that we're proud of

We were able to produce a system that detected the amount of water consumed, and relay that information to a phone. Furthermore, it occupies a relatively small space and doesn't interfere with regular usage of the bottle.

## What we learned

We learned that it is very important to consider space constraints when designing circuits. Furthermore, sensors can have inherent variability that we must account for. Lastly, we learned that CalHacks 6.0 was a lot of fun ;))

## What's next for HydroHelper

We want to be able to compact our electronics more and perhaps use PCBs in order to reduce space taken up by breadboards. Furthermore, we could improve our mounts for our LCD and create sheaths for our wires.