APK
HCI

LED Game

Simple LED game controlled by capacitive touch sensors

Introduction: The provided code implements a simple LED game controlled by capacitive touch sensors. The game utilizes an 8x8 LED matrix to display the game state and four capacitive sensors as input devices. The objective of the game is to press the correct capacitive sensor corresponding to the LED tile at the bottom row.

Components:

  • LED Matrix: An 8x8 LED matrix is used to represent the game board. Each LED corresponds to a pixel in the game grid.
  • Capacitive Sensors: Four capacitive sensors are employed as input devices. These sensors detect touch inputs and trigger corresponding actions in the game.
  • Arduino Board: The code is designed to run on an Arduino board, which provides the necessary hardware interface for controlling the LED matrix and reading sensor inputs.

Initialization: The code begins with the initialization of necessary variables and pin configurations. Two arrays, row and col, store the pin numbers for rows and columns of the LED matrix, respectively. An array of CapacitiveSensor objects, buttonPins, is created to handle capacitive input from the sensors. Other variables like pixels, currentMillis, prevMillis, sensorMillis, lives, and score are initialized.

Main Loop: The loop() function contains the main game logic and is executed continuously. It updates the game state, handles input from capacitive sensors, and refreshes the LED matrix display. The game checks for button presses using capacitive sensors and updates the game state accordingly. Tiles are moved down one row, and a new tile is generated at the top row periodically.

Game Logic: The moveTilesDown() function moves existing tiles down one row, while the generateNewTile() function randomly generates a new tile at the top row. Button presses are detected using capacitive sensors. If the correct button is pressed, the score is incremented; otherwise, lives are decremented.

Screen Refresh: The refreshScreen() function updates the LED matrix display by iterating over rows and columns. It turns on LEDs where the row is HIGH and the column is LOW, representing the intersection of rows and columns. Pixels are turned off by setting the column pin to HIGH when the pixel state is LOW.

Plant Tamogachi

A device that treats a plant as a virtual pet

Introduction:

The provided code implements an interactive LCD controlled by photoresistors and capacitive sensors. The photoresistor detects if there is sunlight at least 4 hours a day and the capacitive sensor detects if it’s watered at least once per day. The state is updated at the end of each day.


Prototyping:

Our first idea was to create a variation of our previous project, the Piano Tiles game. We wanted a uniqur input device, and one idea was to use a conductive, squishy ball. How hard you squeezed would determine which piano tile you pressed. For example, a light squeeze would indicate the first key is pressed while a hard squeeze indicates the last key is pressed.

mp2_1

We eventually decided against the idea for three reason:
1. Difficulty to find effective candidates for conductive material that is squeezable.
2. The complex and extensive debounce development.
3. Idea seemed more frustrating than actually function.


We then decided to explore a new input material and we decided on dough. Our idea was to use four pieces of dough as the inputs for the Piano Tiles game.

mp2_1

Again, we abandoned the idea for three reasons:
1. Dough was a lot harder to make then anticipated.
2. The game was just too similar to our previous project.
3. Having to use the same dough for days on end with multiple people touching it just seemed nasty.


We ultimately decided against doing the Piano Tiles game. We couldn't find a way to improve it as it already was a really creative project with unique input. That's when we began brainstorming all over again. We looked back at some of the mini projects and recalled the photoresistor. We thought light itself as an input is so intriguing. Therefore, we came up with the idea of an interactive 8x8 screen. We could make a threshold where the screen would display a sad face if the photoresistor wasn't receiving sufficient lighting, a happy face if it receives a lot of lighting, and a content face for everything in between.

mp2_1

The big issue with this program was that it was too simple. It was creative, but not impressive. Also, the 8x8 LED matrix was just becoming boring as we have all programmed it multiple times. Again, we were stuck brainstorming until Akash made a remark, "Don't you guys think the photoresistor is basically like a plant, where it's happy to receive sunlight." That's when we came up with our project idea, a plant that could be treated like a virtual pet. We thought that we could use an LCD screen to determine whether the plant was happy, sad, or content based on how it's being treated, like how much sun or water it has received.


Components:

  • 3D Printed Pot
  • ESP-WROOM-32
  • TFT LCD Display Module GC9A01 Driver
  • Analog Soil Moisture Sensor
  • Photoresistor
  • Wires
  • Breadboard

Usage:

The device monitors two crucial aspects for the plant's well-being: soil moisture level and light exposure.


  • Soil Moisture Level: The analog soil moisture sensor measures the moisture level in the soil. When the soil becomes too dry, the device prompts the user to water the plant.
  • Light Exposure: The photoresistor measures the intensity of light. Plants require a certain amount of sunlight to thrive. The device keeps track of the duration of sunlight exposure. If the plant receives insufficient sunlight, its happiness level decreases.

The device simulates a day-night cycle, with each simulated day lasting approximately 24 hours. Throughout the day, the plant's happiness level is updated based on its care and the environmental conditions.


Functionality:

  • Plant Happiness: The device displays a digital representation of the plant's mood (either happy or sad) based on its care and environmental conditions.
  • User Interaction:Users can interact with the device by watering the plant when prompted and ensuring it receives adequate sunlight.

Video Demonstration:

IMU Drone Controller

An IMU controller alternative for (FPV)drones

Ideation/Brainstorming:

When brainstorming ideas for mini-project 4, we pondered the exciting possibilities of utilizing Inertial Measurement Units (IMUs). Our research into real-world applications revealed that drones employ IMUs to relay contextual information about the drone's relative position and movement back to the remote controller. This technology facilitates precise and responsive control, enhancing the user's experience. Since this is a Human-Computer Interaction (HCI) course, we were also keen on approaching this project from a unique angle that would redefine the way we interact with technology.
While exploring YouTube, I came across a video featuring the Xbox team at Microsoft discussing the development of the adaptive controller. This innovative controller was specifically designed to accommodate individuals with disabilities, with the goal of providing a more inclusive gaming experience.

One particularly insightful statement from a team member responsible for creating the adaptive controller caught my attention. They asserted that "a disability is defined as a mismatch in human interaction." This perspective challenges the conventional understanding of disabilities, suggesting that many are not inherent flaws or limitations of the individual but rather arise from a lack of support and accommodation in their environment.
In essence, this viewpoint shifts the focus from the individual's impairment to the societal and environmental barriers that prevent them from fully participating in various activities, including gaming. By embracing this perspective, the Xbox team emphasized the importance of creating inclusive products and environments that empower individuals with disabilities to engage more fully in the activities they enjoy.
This approach to understanding and addressing disabilities highlights the need for more inclusive design practices across various industries, not just gaming. It showcases the potential for technology to break down barriers and create opportunities for people of all abilities to participate equally in society.
A compelling question arises: why is it important to make such accommodations in something as seemingly trivial as video games? Beyond the simple premise that everyone deserves the chance to experience these enjoyable activities, there is a deeper significance. The genesis of the Adaptive Controller can be traced back to veterans who utilized video games as a form of prescribed therapy. Veterans account for a disproportionate number of suicides, and a psychological study demonstrated that veterans prescribed video games exhibited better signs of recovery from severe depression.

Finalized Idea #1:

So we're going to make an IMU controller for an fpv drone. Why an fpv drone?

Finalized Idea #2:

The first challenge we anticipated was formalizing the IMU data to be read as valid input. It's difficult to determine the exact input format required, but what if we built a drone ourselves? Drones are expensive, and FPV drones are even more so. How about we build our own drone?
Building our own drone presents several advantages. We were inclined to use the ESP32, as it features a dual-core processor and can create a WiFi access point. By utilizing the ESP32, we can use it to act as the drone's controller and provide a point of connection for the Arduino with the built-in IMU to connect wirelessly.
Additionally, the extra layer of complexity beyond just getting imu readings also made this a more interesting project.

How to build a drone:

To build the drone we have to address a few important aspects.

  • - What electrical parts do we need
  • - We also need to implement some signal based communication channel between the remote controller and the drones onboard controller.
  • - We need some sort of housing for the drones electronic components.

Addressing Electronics Parts

So drones have 7 important parts, the remote controller, the drone's onboard controller, the motor, the propellor, an Electronic Speed Controller, a power source, and a frame. We have two parts covered, the two controllers. We find a project from another individual who is working towards building an esp32 drone and he lists a few parts for us an 8.5x20mm Motor 3-5V brushed motor and propellor combo, a CAD file for the frame, and a P-channel MOSFET transistor for making his own ESC.

Addressing communication channel

As I said earlier we wanted to use Wifi. The esp32, has a way to creat a wifi access point, this lets up basically create this private network where connected devices can communicate with each other. Since the Arduino and ESP32 can both use the WiFi.h library this implementation is fairly simple.

Addressing Housing

While the online resource provided a CAD file, the built in housing meant to fit the motor didn't fit, so we had to design our own frame.

mp2_1
mp2_1

What went wrong?

In Short, the SMD Transistor was not an apt alternative for an actual Electronic Speed Controller. There is also a reason the motor was cheap. The transistor ended up being too small to actually try and write an electronic speed controller with, even though the GPIO pins on the esp32 actually have a way of sending varying voltages, which would've allowed us to manipulate the current to the motor. Because the transistor was too small, it was just almost impossible for unexperienced to work with using just tweezers and a soldering iron.

mp2_1
mp2_1

What did we learn?

Our journey in building an IMU drone controller provided us with valuable learning experiences and insights. Firstly, we gained a deeper understanding of the intricate components and technologies involved in drone construction, including the role of IMUs in flight stabilization and control.
Additionally, we learned the importance of thorough planning and research in project development. Identifying suitable electronic parts, establishing communication channels between controllers, and designing a suitable housing demanded meticulous attention to detail and problem-solving skills.
Furthermore, our project underscored the significance of experimentation and iteration in the prototyping process. Despite encountering challenges such as incompatible components and design limitations, each setback served as an opportunity for learning and refinement.
Importantly, our experience highlighted the value of interdisciplinary collaboration and knowledge-sharing. By drawing upon resources and insights from diverse sources, including online communities and existing projects, we were able to navigate challenges more effectively and enrich our understanding.
Ultimately, our venture into building an IMU drone controller not only expanded our technical competencies but also cultivated essential skills in teamwork, problem-solving, and adaptability. These lessons will undoubtedly inform and enhance our future endeavors in the realm of technology and innovation.