Note: I’ve had issues with this week’s labs, tried troubleshooting and reaching out for help, but currently still wasn’t able to figure out what was causing the issues I’m having with my sensors not detecting or responding. However, I’ve still tried my best to work on them and documented my process in this blog post.
Lab: I2C Communication With a Color, Gesture, and Proximity sensor
Preparing my breadboard: Connected my Arduino Nano to power and ground, added a APDS-9960 color and gesture sensor to my breadboard, and soldered my sensor to the pins
Program the Microcontroller: After soldering the pin holes and installing the external sensor libraries, I programmed my microcontroller with the provided code but the sensor didn’t seem to be working after running the program and checking my serial monitor
Troubleshooting: I checked my wiring multiple times, and don’t seem to see any problems with it. While trying to troubleshoot my issue in the physical computing help session this past week, I tested each pin with my multimeter and made sure that none of them are accidentally touching due to my soldering, but don’t seem to find an issue there as well. With the help of the residents, I also tried another example code for this SparkFun APDS-9960 sensor (which I’m using) from the Arduino library but still wasn’t able to get my sensor to work.
Since I’m having issues with the SPI communication lab as well, I was suggested to try using an Arduino Uno instead to see if this would make a difference, but my results remain the same.
Despite working with the residents to try troubleshooting, I still wasn’t able to figure out the reason causing my issue nor to get my sensor to work.
Lab: Data Logging With an SD Card Reader using SPI Communication
Preparing my breadboard: Connected my Arduino Nano to power and ground, and added a SD card reader to my breadboard
Testing the SD Card’s Reading and Writing: After checking my SD’s card formatting, I imported the SD card library for Arduino, and tried to test my SD card reader with the Arduino card info sketch. However, with the provided test code, my SD card reader didn’t seem to be working after running the program and checking my serial monitor.
Troubleshooting: Since I didn’t need to solder the pins of my SD card reader, I was able to eliminate this issue factor. But despite that, I still struggled to figure what issue I was having. During the troubleshooting process, I was able to identify one or two miss placed wires, but the SD card reader still didn’t work after me adjusting my wires. I had one wire on the back side of the card reader breakout board since it was easier for me to connect that pin to pin 13, and tried moving it to the other side after guidance from the residents in case there isn’t connection on that side, but didn’t seem to make a difference as well.
I was advised to move my CS wire to connect to pin 4 instead due to the specific SD card reader model which I happen to buy, following the image bellow.
Similar to my I2C lab, I was suggested to try using an Arduino Uno instead to see if this would make a difference, but my results remain the same.
The SD card reader didn’t seem to be working with my Arduino Uno as well, and I wasn’t able to successfully troubleshoot despite working together with the residents in this week’s help session. My SD card, SD card reader, and Arduino Uno are all completely new, and thus I think the possibility of any of these being broken is fairly low. As I couldn’t get my card reader to detect and connect despite trying for over an hour troubleshooting, I wasn’t able to move through the rest of this lab to test out the data logging sketch, recording, and visualizing data.
Project 2 Update and Progress
After rethinking through the interaction of my idea, I decided to present my game in the form of a falling object catching game instead of a musical rhythm game as I feel that my slider idea works better with this (instead of having a tapping motion which feels more related to the typical musical rhythm game commonly played on phones).
Despite adjusting the game concept a little, the original idea with the interaction and LED outputs remain the same. In this past week, I worked on the programming the code for both p5js and Arduino, drew the background image and the assets for my game, and planned out my breadboard both digitally in Fritzing and physically.
Digital Circuit Planning:
Physical Breadboard Setup:
Game Setup on Screen:
Game Testing with LEDs: The movement of the bunny is currently controlled by the right and left arrow keys on my computer, and the LEDs of the corresponding color to the fruits lights up if the bunny catches the fruit. As the user reaches a score of 60, the LEDS lights up and flashes all together to indicate the end of the game.
I am still planning on creating and adding in a “you win” screen for the end of the experience with the flashing LEDs, and also working on some of the sound effects, such as to indicate the stage change, or the ending of the game.
Since I wasn’t able to get my APDS-9960 RGB and gesture sensor to work this week, I wasn’t able to try to implement my physical slider idea (for controlling the bunny moving). I may either stick to the left and right arrow keys and continue to work on some of the details and housing for my project, or try to implement two force sensing resistors as the controller instead.