UNDERSTANDING Arduino memory

Most Arduino users probably are aware that Arduinos contain memory but have you ever thought about what type of memory there is? There is actually three types of memory in an Arduino! These are: flash, SRAM and EEPROM. In this article we will look at each type in turn and look at why you might…

UNDERSTANDING PWM

Pulse Width Modulation (PWM), is a technique that can be used to create analogue from digital! Using digital electronics to create a square wave, a signal can be created that repeatedly alternates between an ON and OFF state. This pattern can range between 0V and the supply voltage. This is achieved by varying the period…

UNDERSTANDING ADC

Humans live in an analogue world but computers are digital. Therefore, if we wish to measure elements of our analogue world, we need a way of converting these measurements to digital. This is the role of the process known as Analogue to digital conversion (ADC). With digital signals, we often deal with binary signals, such…

UNDERSTANDING data types

Introduction When declaring a variable, you need to state a data type. A data type determines how much space a variable can occupy in memory and what type of data. Dynamic vs static typing If you come from a background of Java, JavaScript, PHP, Python or Ruby – then this may seem odd. These languages…

random numbers

UNDERSTANDING random numbers in C++

Even though languages have ways of generating numbers, these numbers are not truly random! A more accurate description of what has been generated is a pseudo random number! The very nature of computers and software is such that random behaviour is not a feature that they have. Because we want them to perform set tasks,…

UNDERSTANDING binary

Computers use binary, base 2 and therefore I think that it is very important that you understand what binary is and how to use it. If you understand and build the circuit that I describe here, it can help you to count in binary! Binary uses only two digits, 0 and 1. Each digit is…

h-bridge motor

UNDERSTANDING motors

THE PROBLEM It is not possible to directly control a motor with an Arduino because of the low of the signal from the Arduino and because the current consumption of the motor will be too high for the Arduino. THE SOLUTION What is needed is a circuit to interface the motor and Arduino. Such a…

switch bounce

UNDERSTANDING switch bounce

THE PROBLEM Switch bounce can be problematic in some circuits if no action is taken to address it. We live in an analogue world but often want to provide a digital input to circuits, switch bounce is one of the issues that arise from this. Essentially the job of a switch is to transition between…

UNDERSTANDING SPI

Serial Peripheral Interface (SPI) is a data protocol that is used by microcontrollers for communicating with one or move peripheral devices, quickly and over short distances. SPI can also be used to communicate between two microcontrollers but whatever the situation, there is always one device that is designated as the master device. It is the…

UNDERSTANDING I²C

The inter-integrated (I²C) protocol allows communication between devices, with some designated as master devices and others as slave devices. As with SPI, it is designed for communication over short distances. However, unlike SPI, it is asynchronous. This means that only two wires are needed to exchange data. A further advantage is that it supports a…