## Inspiration

Being our first hackathon, we wanted to make something simple but impactful. Being University students who enjoy music we got the idea of revamping our experiences in our dorm rooms. So we came up with LIT, that visualizes audio with great detail.

## What it does

LIT as the name suggest is a music visualizer that syncs in real time. The system is connected to a music emitting device that records the frequency and visualizes it via LED lights on the circuit.

## How we built it

LIT was created using Arduino and Electric circuitry. Utilizing LED lights, breadboard, resistors and arduino Uno the system visualizes any audio that is sent through the auxiliary cable.

## Challenges we ran into

A major challenge was finding the right pieces for the circuit. Due to unavailability of some parts such as a potentiometer, we had to adapt. In addition finding an ideal sensitivity range for the LED lights to react to the frequency was a little difficult without some key parts but using trial testing we were able to find the a suitable frequency range.

## Accomplishments that we're proud of

This was the first hackathon for three of the four members on this team. All being in their first year of their undergraduate careers. We are proud that we were able to accomplish a finished project that not only executes but is super COOL!
## Inspiration

As part of UC Berkeley's bollywood fusion dance team, we have performed on countless stages across the United States. However, no matter if we were in San Diego, Los Angeles, or Chicago, we always wanted to incorporate a wide variety of light up props. Our biggest limitation was time, money, and transportability. We need to be able to put a device in bag or small suitcase, and we don't want to spend loads of money on it, and we want it to endlessly customizable and synchronizable across stage. Being able to control your performance's lighting at your finger tips is what we wanted to do to step up in the dance circuit.

## What it does

An iOS mobile app which lets you import music and create lighting cues which can be instantly synched to a series of arduino devices. Upon a start queue, all the lights will go off in an elaborate display of effects. The best thing is, all you need is your phone!

## How we built it

Used the swift programming language to make our iOS app. We also built a temporary android mobile app to connect to our arduino devices, as iOS doesn't support connection to arduino modules. The android app sets up a bluetooth connection with a selected device to upload its unique lighting cue encoding. After parsing this request, the arduino lights up accordingly.

## Challenges we ran into

Bluetooth was being very finicky when we tried to connect to it, and actually writing data at such a low level lead to some byte data loss issues. Also programming in C took longer than expected, after facing several sleep deprivation induced segmentation faults.

## Accomplishments that we're proud of

Divided work effectively, and thought through several algorithmic efficiencies through data management.

## What we learned

We learned a great deal about hardware hacking. It was the first time any of us worked on a hardware hack, and we realized that it was actually an amazing feeling to have a physical product which you can go back home and use everyday, versus an app that you may or may not see the light of day.

## What's next for RobinsLight

RobinsLight isn't only applicable to dance teams, but can be used in everyday homes and events. You don't need to have to go buy an Amazon Alexa, or a Google Home to have an aesthetic and simple light setup. Since all of our parts are very low level, we save our consumers a lot of money and stay away from any privacy issues.
## Inspiration

With COVID-19, the world has been forced to stay safe inside their homes and avoid social contact, a measure which has taken a noticeable toll on everyone’s mental well being. With All of the Lights, individuals can connect in new and fun ways with products that they likely already own - RGB light strips.

## What it does

All of the Lights is a web-enabled LED strip control system. It allows friends to synchronize their lights and remotely participate in each other's lives.

**Note:** The devices made for this project use only a short LED strip as proof of concept. In real use, the device would be mounted with the user's LED strip that typically runs around the perimeter of their ceiling, controlling the lights for an entire room.

Users access our web app to choose a different light pattern depending on whether they want to study together, party, or just chill. Each All of the Lights device is updated with the new pattern, immediately changing everyone's lights.

All of the Lights has several different modes or patterns, including:

* White Light (On or Off)
* Slow colour fading for vibing
* Fast colour jumping for parties
* Custom colour patterns (such as Blue-Orange fading)
* Pomodoro Study Mode
With the Pomodoro Study Mode, users can use their LED lights as a way to boost their productivity by changing colour when they should take a break from studying, then returning to the original colour to notify the user to resume studying.

## How we built it

All of the Lights is primarily a hardware hack. We began with a rough device circuit diagram to determine the necessary components and used CAD to design a enclosure to be 3D printed. While waiting for the prints, we split up to work on the two major components: creating a circuit to control high-power LEDs and interfacing between Raspberry Pi's to synchronize the devices.

The control circuit uses an ATtiny84 microcontroller to drive 3 MOSFET transistors which adjust the brightness of each 12V RGB channel. This utilizes Pulse Width Modulation (PWM) to access the entire range of colour values. To control the light patterns, the Raspberry Pi sends a 32 bit serial packet to the ATtiny. This packet contains the red, green, and blue values, as well as information about whether the colours should fade or not and the duration of the current pattern element. Using a system inspired by floating point integers, an accurate duration between 10 milliseconds and 3 hours can be specified using just 9 bits.

All of the Lights supports several nodes in the local network using Python threading and sockets combined with Flask to submit GET requests from the localhost. One Raspberry Pi is used as the server node, which retrieves a string from the Flask server containing information about desired light pattern. The server Pi supports multiple client Pi’s to join its network and updates each with the pattern data upon a new POST to the server. The clients and the server all send a serial message to the ATTiny on the LED driver board to change the light colours.

## Challenges we ran into

With the tight time constraints of this Hackathon, waiting for 3D prints to finish could be the difference between complete a product and not. To avoid this, we had to design our 3D printed case before having a concrete list of parts that would be enclosed. This required making intelligent design decisions to estimate how parts would eventually fit together in the case, without being too tight or oversized.

The serial communication between the Raspberry Pi web client and ATtiny LED driver board was made difficult by the different logic levels of the two devices. A voltage step-up circuit was needed to convert the 3.3V serial output from the Pi to a 5V serial input for the ATtiny. This required several prototype circuits that tried using diodes or MOSFETs, but the finally solution uses a double bipolar transistor inverter to accomplish the step up.

With the current system, one of the All of the Lights devices acts as both a client to the web app and a server to the other devices. This means that it must simultaneously fetch data from the web app, relay this information to each client, and control its own LEDs via serial. Organizing all of these concurrent tasks required lots of integration testing to get right.

## Accomplishments that we're proud of

We focused heavily on modularizing both the hardware and software components of this project to facilitate future development. This was a rewarding endeavour as we got to see all of the modules, such as the LED driver board, power circuit and LED strip being seamlessly integrated.

As a project that required many interactions between hardware and software, there were many challenges and bugs during the Hackathon. However, after finally fixing all of the issues, it was a great accomplishment to see a physical, real world device behaving exactly as we had designed, even if that meant pulling an all-nighter to see it work at 7:30am! We are especially excited about this device since we intend on further developing All of the Lights for us and friends to use.

## What we learned

One of the main features of this project is the various device interactions. We learned how to use sockets to interface between Raspberry Pi's, how to collect information from a web server with Flask, and how to communicate over serial between devices with different logic levels.

We also improved our engineering soft skills, primarily teamwork and communication. Throughout the competition, our team members frequently discussed the objective of each component of the project, allowing us to work in parallel and design hardware or code that would be relatively easy to integrate later on.

## What's next for All of the Lights

With all of the technical groundwork complete, All of the Lights possessed the necessary hardware and software requirements to expand out and create more intricate and useful LED patterns. The localhost server is a crucial aspect to the build, and currently allows people of the same household to connect to and control the lights from any browser. The server will eventually be deployed to the web, allowing people to connect their lights from anywhere in the world. Additionally, All of the Lights will allow users to use the Spotify API to synchronize music on a device with their LED lights. Finally, more productivity features will be implemented to allow users to structure their day. All of the Lights will launch a custom alarm setting, and let users be naturally woken with lights simulating the sunrise. Thanks to its modular design, launching custom settings on a device has never been easier!