Skip to content

Overview

The BLEControlsPi App lets you build a screen with various controls which are used to control a Raspberry Pi and display information returned by the Raspberry Pi (or a similar device running linux).

This is done using a bluetooth connection between your phone and the Raspberry Pi.

There is no need for a wifi connection.

A How to video is available on YouTube.

This is an example of a controls set up:

Controls Screen example

Typical usage

Real time control of appliance: Control various functions on the RPi via buttons, toggle switches, sliders - in real time.

such as a motorized toy, a robot arm, a home automation (lights, volume) controller

Configuration panels: text inputs, pickers (from preset options), color picker, date picker to set parameters on a a Raspberry Pi.

Dashboard: Use Gauges (linear or circular) and Text Displays to provide information on the real-time status of the Raspberry Pi and the processes running on it.

Or a combination of all the above.

Raspberry Pi Software Requirement - Important

The app can build/edit and operate controls independently - without "talking" to a Raspberry Pi.

But to have the value of the controls sent to/received from the Raspberry Pi, you must install the appropriate corresponding Python Code on the Raspberry Pi.

An automated installer is provided - which renders the whole process simple.

This installs the BLE Connect Router library which handles the bluetooth communication.

It also installs the ActionController Python code - which you must edit to create handlers that perform the desired actions on the Raspberry Pi.

The code is free and open source.

The Python code can connect to Linux systems beyond Raspberry Pi, but has only been tested on Debian-based (including the latest versions of Raspberry Pi OS), Armbian, and Ubuntu-based Linux.

How to use this app

When you first start the app, there are no controls setup. See Getting Started for an example of how to create two controls.

First Step: Create Controls

Select the Settings tab and tap "Create New +". Select a control type from the list, and edit its parameters, then tap Create.

Each control is given a Code which acts as an identifier sent to the RPi. See Using Controls for details.

Controls created this way are listed in order under the settings tab.

You may Resize and Layout the controls as you like them to be displayed on the controls screen .

Select the Controls tab to see the results on your control surface.

Controls are saved and Synched between devices

Controls are saved in between sessions. When you reopen the app the controls surface displays automatically with the controls you have created so far.

Controls are synchronized between devices running the same Apple ID. You may install the App on multiple iPhone/iPad. Controls added or removed from one device are added or removed on the other devices (needs app restart).

Second Step - Connect To RPi via Bluetooth

The Controls tab displays the control surface - ready to be used. Controls are always live - meaning that they can be used on the controls surface.

However, in order for the value of these controls to be sent to a Raspberry Pi, a bluetooth connection must be established to that Raspberry Pi.

The Controls Screen displays Select Device at the top of the screen, as well as a blue antenna icon. Tap either to connect. This brings up the Connection Screen. Choose the Raspberry Pi from the displayed list.

Only Raspberry Pi with the Python Code ActionController installed and running will be displayed in the available list of RPi.

Third Step - Use the controls

After connecting via bluetooth, manipulate the controls. As you do so, the control code (identifier) and its value are sent to to the Raspberry Pi.

Similarly, any display control such as Gauge or Text display can receive data from the Raspberry Pi.

You must create handlers in the ActionController.py to determine what the Raspberry does with the control's value.

In-app Purchases: How Many Controls do you need?

The App allows the use of two controls for free. This allows for testing the BLEControlsPi app and your Python Code Handlers.

Typical use is to define one Control that sends a value (such as toggle switch, slider or picker) and one controls that displays information (Gauge or Text display). But you can define any type you want.

Controls can be deleted and recreated as needed - up to two controls Max at any one time.

Buy Controls

The Buy Controls tab displays the in-app purchase screen.

You can purchase control packs - in quantities of 1, 3, 5, or 9. Every pack purchased adds to your final total of available controls.

Restore Purchases:

A record of your purchases is kept for your Apple Id. If you re-install the app, or install the app on another iPhone or iPad, you can tap the Restore Purchases button - and your total maximum amount of controls will be updated in the app.

This is useful if the app was uninstalled and you are reinstalling after some time. Normally, purchases are synchronized between devices as long as the app is still installed on one device.