Dark Magician's Staff Smart Home Controller
FOLKS, THIS IS STILL A WORK IN PROGRESSThe AssignmentEveryone in my class was tasked with creating a system to control different smart devices in the classroom. The project had to be stylized in a way the student liked.
The Yu-Gi-Oh! franchise was something I grew up with. As a high schooler, I was hooked on the idea of a protagonist controlling evil and horror-themed monsters to defeat his opponents. As I grew older, I began to appreciate the technical part of the game, which was masked its fantastical and fictional angles.
I was explaining the midterm to my nephew and he replied "Don't you like Yu-Gi-Oh? What's your favorite card?". So, the Dark Magician's Staff Smart Home Controller was born. I am looking forward to my cease-and-desist notice from Konami.
The GoalMy goal was to use a Particle Photon 2 with several manual control components to manipulate some smart lightbulbs in the classroom. I also wanted to control a couple of the Wemo smart outlets. The Particle and the small attachments had to be implemented in the shape of a magic wand or staff. Our teacher had us categorize our expectations for the finished product into minimum, desired and stretch goals.
Desired goals: a rotary encoder on the staff will control the hue lights. A photoresistor or BME will sense if the staff is being held. One of the Wemo outlets will be attached to a tornado lamp that cycles through 7 colors. There are 4 other Wemo outlets, each attached to a theme-related lamp.
Stretch goal: the hue lights will be controlled with motion gestures instead of just the encoder. Every hue light will have a different color to create one of 5 different themes. For example, a forest theme would make some lights green, and others yellow. Lastly, a servo motor attached the the tornado lamp will hit the lamps cyclecolor button.
The ProcessThere were 3 angles of making the staff, from idea to working product.
- Adding and scraping ideas over the course of the project.
- Implementing or removing things on the bread board.
- Testing components before transplanting them into the "staff".
There were three strategies that helped me move along from sketching to testing ideas to making the devices:
- Start wiring up the product right away: Start early and make mistakes and face challenges early. Diving into production early will help you come up with more idea and to have a better understanding of which concepts you want to try. It is better to go through 10 different projects than to be stuck in "analysis paralysis". Starting production early makes debugging and rewriting your code more manageable. It also gives you more time to experiment with unfamiliar components that were not introduced in the class yet.
- Think big, work in increments: Whether it is with wiring or coding, take one step at a time and test after each step. This helps you see exactly the challenge points that you need to address before the code and construction becomes too clustered. Also, when a coding task involves several things, reduce it down to the basic areas instead of trying to run everything in one file. For example, if a button is supposed to switch traffic lights, make sure you successfully run a single LED before going into something more complicated.
- Switch gears when you get discouraged: If the coding is daunting, move onto creating your repository or sketches. If you are hesitant on using certain parts, begin with the parts that you are comfortable with. Think of a puzzle; it's a better start when you have a few of the easy pieces assembled than to have a random mess. Better yet, organize the pieces by area. In the case of this project, break the project down into parts.
The assignment called for minimal goals, regular goals, and stretch goals. I learned a lot of about managing project flow. For example, I learned that certain resources like printers and machines are in high demand at certain hours of the day. I also learned that a lot of example code is available from out teacher and from Particle themselves. I also learned to be systemic in trying to fix obstacles and following up with the instructors as soon as possible. It is better to address roadblocks as they come along than letting them pile on.
Having learned all of this came at a cost of not getting to my stretch goals. I did reach my desired goals, although having changed
Comments