Using Bluetooth

Top  Previous  Next

The Bluetooth option in Breeze Booth makes it possible to connect to compatible Bluetooth peripherals and interface with hardware such as lights, LED strips and payment systems.

 

To connect Breeze Booth to a compatible Bluetooth LE device go to the settings screen, select "Show advanced settings" and select "Connect to Bluetooth":

 

bluetooth

 

The line below "Connect to Bluetooth" will show the connection status:

"Scanning..." - if it can't find any compatible Bluetooth peripherals

"Connected to: <id>" - if it is connected the a Bluetooth peripherla with id "<id>"

or a display of the ids of compatible Bluetooth devices which don't match the prefix defined in Breeze Booth

 

Tap "Set Bluetooth prefix" to define which Bluetooth ids the app will connect to. For example, if you have a compatible Bluetooth peripheral to control LED lights which has an id of "Breeze_LED_3c03056712" you could set the Bluetooth prefix to "Breeze_LED". If you have multiple iPad photo booths each with an LED light controller you need to enter the full id as the prefix to ensure that each booth connects to the correct LED controller e.g. set the prefix to "Breeze_LED_3c03056712".

 

Technical Details

 

Breeze Booth can connect to Bluetooth peripherals that provide the Nordic UART service. This allows the app to send messages to the peripheral and the peripheral to send commands to the app. Each time the screen changes in the app it sends a status message to the Bluetooth peripheral with details of the screen being displayed. The peripheral can send commands to the app to query its status (e.g. battery level, memory usage, screen info) as well as commands to control the app e.g. stillsStart to start the shooting sequence when the app is displaying the stills ready screen.

 

The commands the peripheral can send to the app are:

?d - query the model name, example response: d:iPad 9.7" 2018

?i - device name, example response: i:My iPad

?s - status, returns the current screen, example response: s:cameleon/portrait/.: stillsReady

?v - vendor id, returns the vendor id (as displayed at the bottom of the settings screen). Example response: v:5A3B4974-C0AC-44BD-8CFA-8635367E0FC3

?m - memory usage, returns the number of MB free and total memory in MB, example response m:21742/30507

?b - battery percentage, returns the percentage charge remaining in the battery, example response b:98

start - enter photo booth mode from the startup screen

<touchscreen action> - the name of any touchscreen action when in photo booth mode

 

This may sound difficult, but if you are familiar with Arduino microcontrollers it is easy to create a suitable Bluetooth peripheral using an Adafruit Feather nRF52840 Express or Adafruit Feather nRF52 Bluefruit LE.

 

feather

Adafruit Feather nRF52840 Express

 

First setup the Arduino development environment by following the steps in Adafruit's tutorial

Then load the bleart example by selecting File->Examples->Adafruit Bluefruit nRF52 Libraries->Peripheral->bleuart in the Arduino IDE. Upload the example to the Adafruit Feather board and open the serial monitor in the Arduino IDE (Tools->Serial monitor) and you should see something like this:

 

arduino_serial_monitor

 

In the Breeze Booth settings screen the "Set Bluetooth prefix" line should show "Scanning: Bluefruit52". This shows that it has found a compatible Bluetooth peripheral but isn't connecting to it because its id doesn't match the prefix defined in Breeze Booth. Tap on "Set Bluetooth prefix" and set the prefix to "Bluefruit52", tap OK and it should connect to the peripheral and display "Connected to: Bluefruit52" in the settings screen. The serial monitor in the Arduino IDE should now show some information from the app:

 

arduino_serial_monitor_connected

 

Run an event in Breeze Booth and each time the screen changes a screen status message is sent to the Bluetooth peripheral and is displayed in the Arduino IDE's serial monitor e.g.

 

arduino_serial_monitor_screen_status

 

If you are familiar with controlling LED strips from an Arduino (e.g. Adafruit NeoPixel) you could modify the bleuart example to read the screen status messages from the iPad and display different LED light patterns depending on the screen being displayed. If you are not familiar with LED strips there are some excellent tutorials on the Adafruit website

 

iPad + NeoPixels

Breeze Booth controlling an LED strip via Bluetooth

 

Commands can be sent to the iPad by typing into the text field at the top of the serial monitor window and pressing send e.g. to query the iPad's memory usage enter ?m

 

arduino_serial_monitor_memory

 

It is also possible to control the iPad in photo booth mode by sending the name of the touchscreen action to be performed e.g. enter "stillsStart" to start the photo booth shooting sequence when the stills ready screen is displayed.

 

The bleuart example can be modified to control the booth e.g.

- detect a button press to start the shooting sequence

- use a proximity sensor to detect guests standing close to the booth and send a command to switch from the standby screen to the ready screen

- interface to a payment system and switch to the ready screen when a payment has been accepted.