RedBearLab - Simple Control

This application is a reimplementation of an example application that RedBearLab provides (iOS example app - Source code, Android example app - Source code). The application shows you how to communicate in both directions with your RedBearLab board (read/write). The example hardware setup contains LEDs and a potentiometer connected to the development board. See the above example apps for hardware setup.

Source code

You can browse the source code for this example at the Evothings GitHub repository

The file index.html contains the HTML markup of the app and the app.js contains the logic.

What you need

This example runs in Evothings Viewer on Android or iOS.

An iOS device or an Android device with support for Bluetooth 4.0 (which includes BLE) is required. For Android version 4.3 or later is needed.

You need one of RedBearLab development boards that has an implementation of the Simple Control example available, for example Blend or Blend Micro. You can also use an Arduino with a BLE Shield.

You also need the following hardware components in order to build the external circuit.

  • 2 x LED
  • 2 x 220 Ohm resistor
  • 1 x 1 kOhm resistor
  • 1 x potentiometer
  • 1 x digital button
  • 1 x 100 μF capacitor
  • 1 x servo

Fritzing sketch of the external cricuit:

Photo of the hardware setup:

How to get up and running

Follow these steps to get started with this example:

  • Set up the hardware configuration and compile and upload the Simple Control application to your RedBearLab board. This is one of the demo sketches that comes with the RedBearLab setup for the Arduino IDE. See the getting started instructions for Blend, Blend Micro, or the BLE Shield.
  • Run Evothings Workbench on your desktop/laptop computer.
  • Connect to the Workbench from Evothings Viewer mobile app.
  • Run the "RedBearLab - Simple Control" example from the Workbench window.
  • Press "Scan" in the app and then connect to your board from the list of devices displayed.
  • Play around with the application.