Difference between revisions of "e-puck2 mobile phone development"

From GCtronic wiki
Jump to: navigation, search
(Connecting to the BLE)
(Get the source code)
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

e-puck2 main wiki

1 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):

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.

2 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:

  1. Turn on the robot, it will start advertising as E-PUCK2_BLESPP.
  2. Install the application in your phone and turn on Bluetooth (beware that your phone must support Bluetooth 4)
  3. Open the application e-puck2 monitor BLE and click on the Connect button; the robot should appear in the list of discoverable devices as shown in the following figure
  4. 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
  5. Now you will receive the sensors data and you can pilot the robot as shown in the following figure


3 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.