Week 4
In week four, the flex sensors were arrived and all previous sections could be connected. All the action modes of car was
completed and tested. Moreover, the test of employing Bluetooth to control the
car was successful, which means most work of car part was completed.
Working Details
Motor Group:
Before the lab, we
have spent some time at home to writing the codes of the nine running modes,
and each of them were tested to ensure they are working. The video of testing is shown below. However, there is a
problem that the buttery could not supply enough voltage to run the motors and
arduino at the same time. Therefore, a portable power bank was employed to
supply power for the car, but it is too heavy for the car. Consequently,
another power supply should be found.
Video of testing
In the morning of the lab
day we were trying to connect the arduino and phone. At this time, the phone
can find the Bluetooth. However, there are still some bugs on it, which results
in some errors on the received data. In debugging part, we changed the data
type, and the problems were solved. After debugging, phone could control
arduino successfully, and they can receive the information transmitted each
other.
In addition, we try
to transmit information between two paired hc-05 Bluetooth on arduino, and a
LED was employed to determine whether the data was received successfully.
However, there are too many bugs, and it was always failed in the morning.
We
solve the data type problems, language problems and logic problems, and a lot
of tests were made. As a result, the receiver can receive data, but no matter
what the master send it is always 128 or 248 in receiver. At last, we search it
on Google and find that somebody had the same problem with us. They solved the problem by change the Baud rate to 9600 and adjust the
master to AT mode, and the test with LED was successfully. The codes of master
and receiver part are shown in Figure 1 and Figure 2.
Figure 1: The master part of LED test
Figure 2: The receiver codes of LED test
As if can be seen in Figure 1, after pairing, the master Bluetooth
will send 1 to receiver, and send 2 after 3 seconds. In the receiver part, the
serial will print the information received. In addition, the LED will be
lighted if 1 is received, and it will be turned off if 2 is received.
In the next step, we complete the codes of Bluetooth in this project,
and combine it with the codes of motor controlling. Moreover, the tests of
combined codes were also successful.
Flex Sensor Group:
We
got our flex sensors this week and we were able to connect all parts of our
previous work. We measured the resistors of flex sensors and tried to run our
codes, all work went smoothly and the software part is basically completed.
The
combination of gloves and sensors is designed and the general circuit diagram
is drawn. We started working on hardware. The circuit scenario is shown in Figure 3.
Figure 3. Circuit scenario
We
chose four flex sensors and glue them to the four fingers of the glove. Then
according to the circuit diagram we designed, the resistors and wires are
welded together. One end of each wire is connected to the sensor and the other
end is connected to Arduino (Figure 4).
Figure 4. Basic circuit
Tie
Arduino to the bottom of the glove with strings and fix the whole model with
tape. The hardware work of the glove part has been roughly completed and the final glove is shown in Figure 5. What we
need to do next is to connect all parts and make them work smoothly.
Figure 5. Final glove
评论
发表评论