You can download Sketch(Arduino source code for band) on Github. Go to the link below.
Uploading Arduino source
You need to upload Arduino source on Arduino board after the compile is done. Before you upload it, select board type ‘Arduino Pro mini 3.3v(ATmega328)’. And you should press reset button manually when you upload the source on Arduino Pro mini. If the process has failed, you can see this message :
arvdud: stk500_getsync():not in sync: resp=0×00
The reasons why this message appears are usually these:
1. The board type that you choose on Arduino IDE and the actual board is different.
2. The connection between TX, RX pins is wrong
3. Serial pins which are allocated as TX,RX are not used as they should be.
4. Bootloader on the board is malfunctioning
5. User doesn’t reset properly if they use a USB module that doesn’t support the auto reset feature.
Case 1, you should select a proper board type in [tools > board] on Arduino IDE, and case 2, you should check whether TX, RX pins are connected properly. If the connection is the same as case 3, disconnect D0 and D1 pin connection. In case of 5, you should press the reset button. If you press the upload button on Arduino IDE, check the message appeared below the IDE. There’s a moment that it changes ‘Compiling’ to ‘Uploading’. You should press the button at that moment. If you see TX/RX LED on the USB module flickering, then the upload process is in progress. Rarely, you can face the case 4. In that case, you should use an UNO board that is possible to upload the source to burn a bootloader on the malfunctioned board. The solution is way too long to describe and it’s out of our purpose, check the link below if you want to fix the problem.
You need to verify every module connects each other and works okay. First, you should run [Serial Monitor] on Arduino IDE to check if the accelerometer works fine(run the program when LED on the board is on after uploading Arduino sorce). Since the source code has a debug code as below, it should print out the values that are transferred from Arduino board if the connection is okay. If it doesn’t, there’s a problem in the connection with the accelerometer(you can delete the debug code once you finish to check).
// Print the raw acceleration values<br> Serial.print(F("accel x,y,z: "));
Serial.print(F(", at "));
Now, you should check the Bluetooth. It would be found perfectly if VCC, GCN pins are connected properly when the mobile device starts scanning. If you don’t see HC-06 module on the found device list, check the power pin connection.
If you’ve done up to this part, it’s time to check the app.
# : If there’s nothing wrong with pairing process but the app doesn’t receive the data properly, there might be a problem in the connection of TX / RX pins. That is, the data don’t transfer from Arduino to Bluetooth module well.