e-puck2 mobile phone development: Difference between revisions
Line 28: | Line 28: | ||
<code>git clone --recursive -b ble_spp https://github.com/e-puck2/esp-idf.git esp-idf_ble</code><br/> | <code>git clone --recursive -b ble_spp https://github.com/e-puck2/esp-idf.git esp-idf_ble</code><br/> | ||
The Android application source code can be downloaded from the following link [http://projects.gctronic.com/epuck2/e-puck2_ble_monitor.zip e-puck2_ble_monitor.zip]. It's an <code>Android Studio</code> project. | The Android application source code can be downloaded from the following link [http://projects.gctronic.com/epuck2/e-puck2_ble_monitor.zip e-puck2_ble_monitor.zip]. It's an <code>Android Studio</code> project.<br/> | ||
The iOS application source code can be downloaded from the following link [http://projects.gctronic.com/epuck2/epuck2_ble_monitor_ios.zip epuck2_ble_monitor_ios.zip]. |
Revision as of 13:09, 7 May 2019
Robot configuration
For working with Bluetooth Low Energy, the main microcontroller must be programmed with the factory firmware and radio module must be programmed with a dedicated firmware (not the factory ones):
- for the main microcontroller, refer to section main microcontroller firmware update
- radio module ble firmware (12.12.18), for information on how to update the firmware refer to section radio module firmware update
Put the selector in position 15.
Section Connecting to the BLE gives step by step instructions on how to accomplish your first BLE connection with the robot.
Connecting to the BLE
A minimal mobile application for both Android and iOS platforms was implemented as a starting point for further development.
The built Android application can be downloaded from e-puck2-android-ble.apk.
This application lets you connect to the robot and once connected, the phone receives the proximity sensors data and you can also send motion commands to the robot.
Follow these steps to connect to the robot:
- Turn on the robot, it will start advertising as
E-PUCK2_BLESPP
. - Install the application in your phone and turn on Bluetooth (beware that your phone must support Bluetooth 4)
- Open the application
e-puck2 monitor BLE
and click on theConnect
button; the robot should appear in the list of discoverable devices as shown in the following figure - Select the robot and the connection will be established. If it doesn't work the first time, retry once more; if you still have connection problems try by switching off and on again the Bluetooth
- Now you will receive the sensors data and you can pilot the robot as shown in the following figure
Get the source code
The main microcontroller wifi firmware source code can be downloaded with the command:
git clone --recursive -b wifi https://github.com/e-puck2/e-puck2_main-processor.git
The radio module ble firmware source code can be downloaded with the command:
git clone --recursive -b ble_spp https://github.com/e-puck2/esp-idf.git esp-idf_ble
The Android application source code can be downloaded from the following link e-puck2_ble_monitor.zip. It's an Android Studio
project.
The iOS application source code can be downloaded from the following link epuck2_ble_monitor_ios.zip.