Inspiration
Based on the fun and whimsical theme, we decided through a round of brainstorming that a laser attached to a cat would not only fit the theme, but allow us to have fun creating something in 24 hours. As this was everyone’s first picklehacks, we wanted to have a project that created a both challenging and interesting hackathon experience.
What it does
Our project attaches to a cat's harness and moves a laser around, controlled by a browser user interface. The laser would be mounted to the cat’s chest with a harness, pointed downwards. The user would have three control options: on/off (stop/go), rotate left, rotate right (steering).
How I built it
The entire project is separated into 4 sub-objectives. The web app, server host/websocket/bluetooth interface, embedded software for the microcontroller, and the 3d printed mount. The web app was built using HTML, CSS, and JavaScript. The web app instance communicates with the websocket server written in python. The server app forwards the browser message to low level kernel calls via the POSIX API. Commands are forwarded to the microcontroller via bluetooth exposed as /dev/tty*. The microcontroller would then handle the nitty gritty details of turning on/off a laser and rotating it left/right. The last part involved 3d printing the housing for the components and attaching it a harness.
For the embedded software, we used arduino. The microcontroller we used was the SAMD21 microcontroller.
Challenges I ran into
Gabriella: I had difficulties implementing stylistic changes that shortly broke the functionality of the user interface.
Kevin: The biggest challenge was hitting a schedule of when we had to finish implementing and testing the subcomponents mentioned previously. By far the biggest time crunch was implementing the bluetooth communication channel. Having implemented the system before, I tunnel visioned to the server side code where I historically had trouble. But the real problem was hidden in the setup function. The rx pin was already assigned to the motor controller! We ended up losing 3-4 hours and the resulting time crunch made me make a very poor decision: attaching 5v to an GPIO pin of the microcontroller. POOF. Project DEAD. Had we been able to continue, I think the next major problem would have been the weight of the entire device and how that would affect the orientation of the laser.
Dibbya: The main problems I faced were finding good schematics of the Seeeduino XIAO and the SAM D21 microcontroller. Besides, I also had difficulties communicating with everyone because it was online. We also had to face very tight time constraints to finish the project. Because there were some difficulties in communication, it was hard to decide on the PORT pins used for each functionality.
Accomplishments that I'm proud of
We are proud of fixing the bug that broke the functionality of the User Interface, while still able to keep the design of the website that we initially wanted.
What I learned
We learnt better about how microcontrollers work in general. We learnt how to interface the microcontroller with a desktop OS over bluetooth and interfacing desktop OS with a web app We learned more about positioning in CSS and how to balance design with functionality.
What's next for laser cat
We can use it to entertain cats but we’d have to implement it successfully first. In addition, similar applications can be used in computer controlled underwater or space rovers. I think it’s very similar to laser guided missiles.
Log in or sign up for Devpost to join the conversation.