e-puck2 mobile phone development

From GCtronic wiki
Revision as of 13:09, 7 May 2019 by WikiSysop (talk | contribs) (Get the source code)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

e-puck2 main wiki

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.

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


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.