Processing Selections from Multiple User Input Sources

MUI_HeaderIn the last few projects I completed, I needed to find a way to process user commands arising from multiple input sources. A simple example would be a clock with tact switches and a Bluetooth interface providing identical functionality from either user input source.

For these applications I developed a simple modular and scalable approach that can be applied in other projects.

Continue reading “Processing Selections from Multiple User Input Sources”

Advertisements

Parola A to Z – RAM Requirements

RAM_ChipThe amount of RAM an application uses is printed out by the IDE at compile time. For applications that don’t allocate memory, this is a really good guide to how much spare RAM is available at run time.

However, if  an application, like any using the Parola libraries, uses memory from the heap, you need to make sure that there is sufficient memory left for run-time memory allocation.

Continue reading “Parola A to Z – RAM Requirements”

Parola A to Z – Vertical Displays

Parola_Vert_signVertical LED dot displays are not a common requirement, but they can be created using the standard library with a few tweaks to the software.

As I get questions about vertical displays from time to time, I will cover the basic process of how this is done in this short article. Continue reading “Parola A to Z – Vertical Displays”

Low Cost DIY Logic Analyzer

PulseView_LogoA logic analyzer is an electronic instrument that captures and displays multiple signals from a digital system or circuit on a common time base. It is a really useful tool for debugging circuits and communications links. However, the cost of brand-name logic analyzers runs into hundreds of dollars and can be really hard to justify for hobby use.

Fortunately, there is a low cost alternative using open source software and inexpensive hardware.

Continue reading “Low Cost DIY Logic Analyzer”

PID Control Experiment – Tuning the Controller

PID_FCIn the first part of this blog I described building a test apparatus that allows me to experiment with tuning a PID loop controlling a levitating pin pong ball in a tube.

This second installment is about trying different hands-on methods of tuning the loop, understanding how they are derived, and how well they perform compared to each other.

Continue reading “PID Control Experiment – Tuning the Controller”

PID Control Experiment – Making the Testing Rig

PID_FCPID (Proportional, Integral, Derivative) control is a classic control algorithm that I have used for a few projects, ending with ‘good enough’ control, without really spending time learning how to properly tune the PID constants.

Time for me to fill in the gap in my knowledge, so in this two part blog I want to capture my learning. Hopefully it is useful for someone else. In this first part I will document the learning and testing rig and software. The next part will be about tuning the control loop.

Continue reading “PID Control Experiment – Making the Testing Rig”

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 – Multi Zone Displays

Parola_Controlled_ZoneA very powerful feature of the Parola library is the ability to separate a display into a number of zones. This allows the implementation of sophisticated animations schemes and is a key part of being able to create double height displays.

This post explains what they are, how they are set up, and how to manage them.

Continue reading “Parola A to Z – Multi Zone Displays”