Digital – Analog – Mechanical

Bluetooth Communication

The next step is to incorporate Bluetooth by including the RedBearLabs BLE Mini, which uses Bluetooth 4.0 low-energy technology to generate signal input from a mobile device. The BLE Mini uses a serial port for communication, so it supports all development platforms that have a UART interface (e.g., Raspberry Pi, Arduino, BeagleBone).

The J4 connector on the BLE Mini has six pins – Reset, P0_0, RX, TX, GND, and Vin (looking from the MicroUSB port inward) – but I'm only interested in the four pins farthest from the MicroUSB port. These pins are:

  • Vin – wired to the power bus
  • GND – wired to the ground bus
  • TX – wired to the Serial1 RX pin 19 on the Arduino Mega
  • RX – wired to the Serial1 TX Pin 18 on the Arduino Mega

The wiring on the breadboard should look something like that shown in Figure 7. Figure 8 shows the real-life result.

Figure 7: All three motors and BLE Mini wired. (Fritzing)
Figure 8: Order out of chaos: stepper motors, motor drivers, Arduino Mega, and BLE Mini wired for action.

Upgrading the BLE Mini

Before going any further, make sure the latest firmware has been loaded into the BLE Mini [6]. To do so, hold the Reset button down while connecting a USB cable to the PC. The BLE Mini will pop up as a removable media device. Delete the current *.bin file and copy the newly downloaded *.bin file. Now, cycle power, and you should be in business.

You also need to install additional libraries. To do so, just follow the directions on the Arduino website [7]; it will step you through loading the BLE Mini library [8].

Buy this article as PDF

Express-Checkout as PDF

Pages: 7

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content