Spider Bot using Bluetooth
The code is made to work with KEUWLSOFT Bluetooth Electronics app: http://www.keuwl.com/apps/bluetoothelectronics/. But with little modification you can make it to work with any classic bluetooth app.
What you will need
- Assembled Spider Bot itself
- Bluetooth Classic Module (HC-05 or HC-06)
- Install the app: https://play.google.com/store/apps/details?id=com.keuwl.arduinobluetooth
- Open the app. You may be asked for bluetooth permission. click Allow.
- You will be presented with various examples with tons of controls to choose from. We will be making our own UI to keep things simple.
- First we need to connect with the bluetooth module. From the top right corner of the app choose "Connect".
- Select "Bluetooth Classic" and hit "Next".
- Choose your bluetooth device and and click "Connect".
- After successful connection you will see a message at the top like this. Click "Done".
- Now scroll to the right, select one of the empty panels for our custom UI, and click "Edit".
- From the side menu, click on "Pads".
- Drag the first one onto the empty panel like this
- With the pad selected, choose "Edit" from the bottom right corner. Here's the settings that goes with our code
- After the settings, navigate back and with our custom panel selected, click "Run".
Unlike the Robotic Arm, the Spider Bot will keep executing the current operation (moving forward, backward or turning around) until it is complete, before proceeding with the next operation, even if you press the pad in app for next operation halfway between. To keep the code simple, we left it as it is. But you can easily remedy this with a bit of modification.