Asynchronous serial communication, often shortened to just serial, is one of the easiest ways to communicate between two different devices. In it's simplest form, it consists of just two connections. One line for sending data and the other for receiving data.
The Mojo has eight analog inputs that you can use to read voltages from 0-3.3V. In this tutorial we will make the Mojo read the voltage on input A0 and adjust the brightness of the LEDs depending on the value.
In this tutorial we will cover some of the pit falls that can happen when having asynchronous inputs to the Mojo. The more general case is metastabilty, but we will also cover debouncing of buttons. These are both important if you want to reliably detect when a button is being pressed or interface with anything that is not synchronized to the Mojo's clock.
Test benches are used to simulate your design without the need of any physical hardware. The biggest benefit of this is that you can actually inspect every signal that is in your design. This definitely can be a time saver when your alternatives are staring at the code, or loading it onto the FPGA and probing the few signals brought out to the external pins. However, you don't get this all for free. Before you can simulate your design you must first write a test bench.
Pulse-Width Modulation, or PWM is a very common technique that varies the width of the pulses in a pulse-train. PWM has a few applications, the main ones are for controlling things like servos and speed controllers and limiting the effective power for things like motors and LEDs. This tutorial will cover how to use PWM to change the brightness of an LED.