This page gives you information on how to set up a Bluetooth link between your Android phone and your Arduino. We can then use the phone to order goods from the warehouse and the robot will go and get them.
There are plenty of free apps you can get that will allow your phone to communicate with an Arduino using Bluetooth.
Here is a link to one you can get from the Microsoft App store:
However, Bluetooth is not built in to most Arduinos and you need to get a Bluetooth adaptor (HC05) that plugs into your Arduino like this:
Bluetooth is a serial communication system, and you will see on the HC05, one pin labelled Tx (transmit) and another labelled Rx (receive). In the above image, Tx and Rx connect to pins 9 and 10 on the Arduino. Since posting the above image I have learned more about the HC05 and there is a better circuit for it shown below
On our Y13 pcb Tx connects to pin 6 and Rx connects to pin 7. (This is different from the pins shown in the above diagram.) The other two pins are +5V and Gnd. The reason for this is because we are using the Software Serial Library which lets us create a serial port using any pins we like, and we have chosen to use pins 6 and 7 because it suits the space we had available on our circuit board.
To see example coding showing you how to create and use a software serial port, start up Arduino and look under File - Examples - SoftwareSerial and open the file called SoftwareSerialExample.
Note that you will be using the normal serial port for communications between the Arduino and your laptop, and the software Serial port for communications between Arduino and the robot via the HC05 bluetooth adaptor.
Also note that the HC05 defaults to a baud rate of 9600 bits per second, so you will need to configure the software serial port to that rate.
The HC05 can be powered from a 5V supply, but its Tx and Rx pins use 3.3V logic. This is OK when the Arduino is receiving from the HC05 because a logic high on a 3.3V system will also trigger a logic high on a 5V system. However, sending a 5V logic signal into a 3.3V input can damage it. Therefore, we have to reduce the 5V signal from the Arduino's Tx pin down to 3.3V before we pass it to the HC05.
This can be done with a little minor surgery on the Y13 Arduino shield.
The bluetooth part of the shield looks like this:
You need to cut the track leading to pin 7 and add in two resistors like this:
These resistors can be carefully soldered on the under side of the shield. They should help to prevent damage to the HC05.
If you can not use your phone to communicate with your robot, you can use a Windows pc. There is a free Bluetooth terminal app which will allow you to use your laptop's Bluetooth to communicate with the HC05
It is called Bluetooth Terminal and its home screen looks like this:
Both the Terminal app and the HC05 default to a baud rate of 9600, so all you have to do is plug the HC05 into your Arduino and turn it on. The rapid blinking of the red LED on the HC05 tells you it is in pairing mode. Start Bluetooth Serial terminal and click Refresh List to find the HC05. Then select it and click connect and the system should be up and running. The LEDs blinking will slow down when it is paired.
You do have to remember to turn on Bluetooth on you laptop.
In Arduino, click File - Examples and scroll down until you find a folder called Software Serial, and open the example called SoftwareSerialExample.
In this example the laptop transmits to the Arduino using Bluetooth, and then the Arduino transmits back to the laptop through the serial cable. This allows us to confirm that the Bluetooth system is working.