Week #8 - Journal 

Ideation 💡

Tell us about your assignment's idea for this week. Why do you care about this idea? What inspired you? (Please include images or links to sources of inspiration)

The 8th-week assignment of the Maker Diploma is about making things talk to things by communicating wirelessly via a Graphical User Interface (GUI) on a phone or PC. The required is building a simple smart circuit that contains at least 2 action components that can be controlled wirelessly and using either the Android GUI or PC GUI to control the action components.

I looked for ideas that met the assignment requirement to build the smart circuit. I found a video about controlling a servo motor and an RGB LED wirelessly via a GUI on a phone. Also, I found a tutorial on how to wire and control the RGB LED, so I decided to proceed with this idea. 

Tool Chain 🛠️

Which software/machines/materials did you use in the assignment? Why?

I used Tinkercad to design and simulate the smart circuit to make sure it was functional before being prototyped on an actual breadboard. After that, I used Arduino IDE to write and program Arduino C text code; then uploaded the code to the Arduino board. Finally, I used Arduino Bluetooth Control as a GUI on an Android phone to control the action components wirelessly.

To build the  smart circuit, I used the following components and materials:

Design/Preparation Process 👩‍💻

Explain the design and/or preparation process of your assignment. How did you use the tool or software to design and/or prepare your assignment before fabrication/implementation?

I started by designing and simulating the smart circuit using Tinkercad to control the servo motor and RGB LED wirelessly. My goal was to use a GUI on a phone to send data to Arduino to control the following action components:

Then, I started connecting my smart circuit and I used the following pins on the Arduino board:

After that, I connected the components to the breadboard. The RGB LED was connected with three 220Ω resistors to the Arduino and the common cathode to the GND row. The servo motor was connected to the GND and 5V rows. Finally, the HC-05 Bluetooth Module wasn't on Tinkercad, but I found it in Tinkercad's gallery here and used it. I connected HC-05 to the GND and 5V rows on the breadboard, TX to Arduino's RX pin, and RX to Arduino's TX pin.

HC-05 Bluetooth Module on Tinkercad

Development/Implementation Process ⚙️

Explain the development/implementation process of your assignment. How did you use the machine/tool to manufacture or implement the design of your assignment?

I started implementing and breadboarding the physical smart circuit with the Arduino board and components. I wired the components together following my Tinkercad design. I wired the Arduino 5V pin to the positive channel of the breadboard and the GND to the negative channel. Then, I wired the RGB LED to three 220Ω resistors, then to the Arduino (pin 3 green, pin 5 blue, pin 6 red), and the common cathode to the GND row on the breadboard. The servo motor was connected to Arduino's pin 9 and GND and 5V rows. Finally, I connected HC-05 Bluetooth Module to the GND and 5V rows on the breadboard, TX to Arduino's RX pin, and RX to Arduino's TX pin.

To build the code that would be uploaded to the Arduino board on Arduino IDE, I started with serial testing to make sure that the HC-05 Bluetooth Module was connected to the GUI on an Android phone (I used the Arduino Bluetooth Control app). Then, I installed the Servo.h library and used its example. I defined the Arduino pins of the servo motor and RGB LED.

After that, in the void setup that runs only once at the beginning, I used the servo example and set the function pinMode OUTPUT for the green, blue, and red pins. 

Next, in the void loop, which's a function that executes indefinitely until the power is off, I used the while (Serial.available () == 0) to disregard any unwanted values or singles. Then the following will happen:

Once I verified and was done with the code, I removed TX and RX pins wiring on the Arduino and connected the Arduino to my laptop to upload the code. Then, I rewired TX and RX pins again to the Arduino, opened the Arduino Bluetooth Control app on an Android phone, and connected the Bluetooth to the HC-05. It worked perfectly and was fully functional.

char incomingData = '0';

#include <Servo.h>

Servo servo_9;

#define Green 3

#define Blue 5

#define Red 6


void setup() {

 Serial.begin(9600);

 servo_9.attach(9, 500, 2500);

 pinMode(Green, OUTPUT);

 pinMode(Blue, OUTPUT);

 pinMode(Red, OUTPUT);

}

void loop() {

 while (Serial.available() == 0);

 incomingData = Serial.read();

 Serial.println(incomingData);

 if (incomingData == '1') {

   digitalWrite(Green, HIGH);

   digitalWrite(Blue, LOW);

   digitalWrite(Red, LOW);

   servo_9.write(120);

 } else if (incomingData == '2') {

   digitalWrite(Green, LOW);

   digitalWrite(Blue, HIGH);

   digitalWrite(Red, LOW);

   servo_9.write(90);

 } else if (incomingData == '3') {

   digitalWrite(Green, LOW);

   digitalWrite(Blue, LOW);

   digitalWrite(Red, HIGH);

   servo_9.write(30);

 } else {

   digitalWrite(Green, LOW);

   digitalWrite(Blue, LOW);

   digitalWrite(Red, LOW);

 }

}

IMG_4983.MOV

Overcoming Challenges 🥷

What kinds of challenges or problems did you face while doing the assignment, tutorials, or exercises?  How did you solve them? Did you ask for help from an instructor or peer? Please provide a link to the tutorial or article that you used to solve your problem (if any)

I faced 2 issues while working on this assignment:

Final Project 🙌🏽

How can you use the skills and knowledge that you've acquired this week in your final project?

WOW! 😮

What is the coolest thing that you've learned this week? What is something that you will never forget from this week?

Weekly Digest [OPTIONAL] 🤔

Tell us about any other cool things that you've made this week: in the Hands-on activity, tutorial examples, exercises, or any other cool mini-project that you tried out aside from the assignment.

Assignment Design Files 🗂️