Week 9 & 10
I returned to concentrating on coding this week. In order to control motors, I went ahead and purchased a motor shield, which is an extra board that is put alongside the Arduino board. Despite the high cost of this motor shield, I considered it a worthwhile investment as it eliminated the need to search for loose parts in order to operate the motor.
After spending a lot of my time attempting to figure out how to get the motor to move, I noticed that because of the way the motor shield operates, I do not have enough pins on the boards for all of my components.
In order to connect all of my components into the pins, I had to purchase an extra Arduino board. I had to find out how to link both of my Arduino boards so they could interact with one another as I currently have two of them, one of which is attached to a motor shield. This was the first time using two Arduino boards together so it took me some time to figure out. With the help of online forums and tutorials on how to establish communication between both boards.
Fortunately, I was able to quickly learn how to establish communication between the two boards and turn on the motor using the motor shield thanks to forums and webpages. I2C connections are used to establish the connection, with one board acting as the master and the other as the slave. The primary controlling board that communicates with the slave functions as the master board.
Motor Shield lack of Pins for all the components
Wiring I2C Master & Slave connection
Master Board Controlling Tilt Sensor & Motor
Slave Board Controlling the game
After attaching each component to the necessary pins. I then went on to spend the entire week and a half trying to figure out how to get the code to function the way I wanted it to. I think I spent more time on it than I would have liked to, but it was unavoidable given that a single line in the code might ultimately have a significant impact on how the code functions. I also made the decision to resolder the components, so I went and bought a fresh board, set of components, and soldering iron.
When the programming was finished, I made the decision to remove every component from the Arduino board after buying additional boards. To prepare for week 12's open studio, I had to relocate the parts onto separate boards so that my audience could try my code by holding up the tilt sensor and buttons rather than glancing down at a breadboard, which would not make as much sense to them.
After that, I had to make my work more appealing and incorporate the narrative style of my brand into it. The object that would be attached to the motor to produce movement when the tilt sensor activates was undoubtedly the first thing I thought of to start with.