Skip to main content

Week 2

In this week, the group worked on the Bluetooth function. The objects of that were setting the Bluetooth into AT mode and connected it to a Android phone and the Bluetooth can receive the instructions, which were transmitted by controlling on the APP called . 


Summary of week's activities :
1. The HC-05 Bluetooth entered into the AT mode. Firstly, connecting Rx pin of the Bluetooth module to pin 11 of Arduino Uno, and Tx pin of Bluetooth to pin 10 of Arduino. Also connect  ground to ground, but don't connect the Vcc yet. 

Figure 1: Bluetooth connected with board

Secondly, we input the code into the Arduino IDE. After we compiled and uploaded the code, opened the serial monitor and changed the  "no line ending " to "both NL & CR". Due to the default baud rate of this Bluetooth was 9600baud, we set the baud rate to 9600baud. 
The circuit and the code had gotten ready, we found the light on the Bluetooth kept flashed for 2 seconds and kept dark for 2 seconds but not 2 flash in 1 second. When we input "AT" in the serial monitor, there was a OK displayed in it. That mean the Bluetooth had entered into the AT mode. 

Figure 2: The code and the AT mode. 

2. The Bluetooth connected to the Android phone. Opened the Bluetooth function on the phone and found the Bluetooth address, which could be find by input "AT+ADDR" in serial monitor then connected them. 
3. The APP could send instructions. We wanted to make the Bluetooth received the data, which sent by controlling APP, so we had to change the code. Then we could observe the data in the serial monitor that could match with instructions from APP.

Figure 3: The instructions in the APP

Figure 4: The new code and receiving data from APP


Problem, issues and concerns :
1. Due to we were confused to the function of the pins on the Arduino Uno, we wasted a long time to test them. 
2. We considered the "key pin" on the Bluetooth should connected to pin 9 on the board, but we could not connect the Bluetooth with the phone when we did it. 
3. We lacked experience in coding, so it was difficult for us to debug the code. 


Plan for next week :
Complete the code about motors.







Comments

Popular posts from this blog

Week 3

In this week, our group had a bottleneck on the code of motors. Due to the lack of experience in Arduino programming, we spent a whole day but there were few results. However, the process of constructing the main body of car was prosperous extremely.  Summary of week's activities : 1. Work on the code of motors. 2. The main body of the car. Working on the chassis of the car and adding the wheel with the motors. Hand drill the board for the motor to finish the chassis.  Working on the code for the arduino and the Bluetooth module and Try to finish the code and make it work.  Problem, issues and concerns : W e did not familiar with the principle of the board and the logic of code, so the works were inefficient. If we just entered the code of Bluetooth, we could observe the correct data in the serial monitor. When we added the code, which could control the motor into original one there was a infinite loop where t...