Programming for the Nuimo Controller

We wanted to share our experience of using Bluetooth Low Energy including how a BLE connection works, an intro to our GATT profile, and ways you can advantage of the sensory inputs and LED matrix output of the Nuimo.

What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

Static and dynamic content editing

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

 

How to customize formatting for each rich text

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.

Computing is not about computers any more. It is about living.- Nicholas Negroponte, Founder of MIT Media Lab

Input and Output for Nuimo

The Nuimo controller offers a number of inputs that are easily mappable to computer applications or connected devices.

The four main sensor inputs include an analog ring that runs around the circumference of the device, capacitive touch, haptic click and a gesture sensor that allow a sweep motion over the device or upwards from the device. Nuimo also features an 11x11 LED matrix that can show simple graphics through the face of the device.

Input: Click
Input: Turn of the High-Precision Ring (Rotate left and Rotate right)
Input: Capacitive Touch (4 different swipes: top-bottom, bottom-top, left-right and right-left)
Input: Gesture Control (Gesture up, Gesture down, Fly-over left and Fly-over right)
Output: LED Matrix Output

Understanding Bluetooth Low Energy

Nuimo connects via Bluetooth Low Energy (aka Bluetooth 4.0, BLE or Bluetooth Smart). Bluetooth Low Energy is a relatively new standard introduced in 2010. In contrast to other low power connection standards like Zigbee or 6LoWPAN, BLE is built into most smartphones, computers and smart hubs.

BLE is designed for the periodic transfer of small amounts of sensor data, requiring extremely low power consumption. BLE devices maintain a sleep mode most of the time until a connection has been initiated with a peripheral device. This makes BLE an excellent choice for wearables and other mobile hardware devices that rely on battery power.

Depending on the module, the peak current while sending data is about 10 mA. Due to very short initial connection times, the average current is as low as just a few uA. This makes it possible for devices to run on the power of just a coin cell battery for up to a few years.

Likewise, for a high-throughput stream of data (> 100 kbps), classic Bluetooth or Wifi may be better options — although they require more power than BLE.

How Bluetooth Low Energy Works

The BLE connection is created between two devices:

  • A Central Device acting as the client that scans for and establishes the connection.
  • A Peripheral Device acting as the server that ‘advertises’ for and accepts incoming connections.

The connection happens when the peripheral device sends out an advertising package that denotes it is prepared to accept data. The central device picks up this package and requests an exclusive connection with the peripheral device. The peripheral device stops advertising, accepts the connection and data can then be exchanged.

Nuimo is a peripheral device and acts as the server which can be paired with either your smartphone or computer as the central device. Additionally, our integration with Logitech and subsequent integrations allow Nuimo to access smart hub APIs such as the Logitech Harmony Home Hub.

Over the next months, we will be adding more direct integrations with the major smart home hubs. At the moment, 30+ applications and integrations are supported including Philips Hue, LIFX to Spotify and Sonos.

Advertising and Scanning

The advertising package from the peripheral device (in this case nuimo) has a data payload of up to 31 bytes and includes the basic header information. Header information can include things like name, service UUID or similar info to be transmitted. This means that data can already be received from the advertising device even without establishing a connection. Each package is sent at an interval ranging from 20ms to around 10 seconds — the shorter the interval, the faster the connection is established and the higher the power consumption.

GATT

A GATT Profile (or Generic Attribute Profile) defines the exchange model between devices connected with BLE. This GATT profile governs the connection and allows the devices to discover, read, write and push data. The data being pushed is encapsulated in a service which consists of one or more characteristics. There are a number of predefined GATT profiles and characteristics by the Bluetooth SIG. In the case of Nuimo we have created a custom profile for Nuimo.

The input for the four sensors in Nuimo are evaluated by a microcontroller which detects the type of gesture or input performed by the user (a turn left of the aluminum ring or swipe movement on the top surface for example).

The input gesture is converted into a GATT-based characteristic (to optimize the communication for low throughput)and is then transferred by BLE radio. In the reverse, the central device can send writable bits that controls the LED matrix display as an output.

Conclusion

In order to grow our community of developers interested in the Nuimo, we will open the access to our git repo and provide anyone with two sample applications; one native OSX app and a ruby application to start development. We will continue to add further examples, support and operating systems over the next months.

To read more on the hardware development of Nuimo, see our blog post “How we built the Nuimo.

Share this Post

Sign up now and never miss a post!

Thank you! Please confirm your subscription in the email we just sent you.