Reliable Bluetooth LE Comms Between Arduino and MIT App Inventor (AI2)

MIT_AI2_IconIn a previous post, I looked at creating reliable communications using Classic Bluetooth. While that approach works well, and is a reliable way to connect devices, there may be circumstances when a Bluetooth Low Energy (BLE) connection is preferable.

As it turns out, Bluetooth and BLE are about as similar as apples and oranges. The change in transmission protocol technology is more than a trivial change in the code and its structure.

In this article I explore the difference between BT and BLE and how the previous BT AI2 app needs to be adapted.

Continue reading “Reliable Bluetooth LE Comms Between Arduino and MIT App Inventor (AI2)”

Reliable Bluetooth Comms Between Arduino and MIT App Inventor (AI2)

MIT_AI2_IconI recently needed to develop a Bluetooth application between an Arduino and a controlling App running on Android. App Inventor 2 was used to simplify development of the Android App .

MIT App Inventor (AI2) is a web-based online graphical mobile application development environment for Android devices, where you can create an application by simply dragging and connecting a series of function blocks.

When researching the task, I found a lot of disparate information about how to write the Bluetooth management code for AI2. This information (some good, some wrong, and a lot repetitive) was synthesized it into a set of functions, described here, that provide a reliable communications interface to my project.

Continue reading “Reliable Bluetooth Comms Between Arduino and MIT App Inventor (AI2)”

Simple Debugging for Arduino Sketches

Bug_TrackingDespite the advent of source level debuggers for Arduino code, one of the most accessible ways to debug Arduino projects is still the Serial.print() statement. It is how most beginners will start when trying to debug their code.

But what do you do with all the print() statements sprinkled through the code once your application is working?

Continue reading “Simple Debugging for Arduino Sketches”

Parola A to Z – Double Height Displays

parola_dh_single_doubleUsing the Parola library for double height displays is becoming increasingly popular with library users. Setting up the hardware and the library is not difficult, but it can cause problems if not done correctly. This article will explain the hardware and software setup considerations for trouble-free double height displays.

Continue reading “Parola A to Z – Double Height Displays”

Parola A to Z – Managing Animation

azparola_animationAs the main function of the Parola library is to enable text animations, it is important to understand how these are set up and managed to completion from user code.

From a user perspective, Parola animation consist of 3 parts – setting up, running and resetting the animation. The process is not complex and is illustrated in the numerous library examples. This article breaks these down and explains how the Parola class methods apply in each phase.

Continue reading “Parola A to Z – Managing Animation”

Parola A to Z – Text Animation

azparola_animationThe key function of the Parola library is to display text using different animations. These animations are built around a core supporting framework and largely follow the same patterns. This article explores how Parola animations code is constructed so that advanced users of the library have enough information to be able to write (and contribute!) their own new animations.

Continue reading “Parola A to Z – Text Animation”

What is 00101010?

binaryI frequently see see novice programmers asking “how to change variable from hex to binary” or similar questions. Leaving aside the simple number base conversion, these questions are, frustratingly, usually about not understanding fundamental computing concepts.

Continue reading “What is 00101010?”

Double Height Digits on a Character LCD Module

LCD2H_FontTwo line LCD modules based on the Hitachi HD44780 LCD controller (commonly referred to as 1602 LCD) are a very inexpensive way to add an output device to an Arduino project, enabling all manner of user information to be displayed in a flexible format.

I have found, though, that I am not able to read this display at a distance (maybe it is age related!). For my own projects I developed code that allows numbers to be displayed over both lines of the LCD display, making the ‘current’ value display for instruments, for example, more obvious and more visible.

Continue reading “Double Height Digits on a Character LCD Module”

MAX7219 LED Matrix Module Micro Word Clock

WordClockA Word Clock is a clock that tells the time using words.

In an era when super-accurate digital clocks are available to most people on the planet, it intrigues me that Word Clocks have a place as they only show the time to the nearest five minutes!

Building one has been on my project to-do list for a while, but I didn’t want to invest the time and money needed for the various ‘from scratch’ build projects that I found online.

Continue reading “MAX7219 LED Matrix Module Micro Word Clock”

Adaptive User Input with a Rotary Encoder

rotary_encoderI like using rotary encoders for user input as they can provide very precise control over settings. The built-in switch is also very convenient and makes it easy to implement the push button functionality I described in a previous post. Altogether, rotary encoders have a ‘modern’ feel that makes projects seem more professional.

There is one shortcoming of these devices, though, that I have recently worked to overcome.

Continue reading “Adaptive User Input with a Rotary Encoder”