# Setting up the Arduino IDE

This tutorial shows you how to setup the Arduino IDE so that you can use it to program the microcontroller on the Mojo.

This tutorial will walk you through how to upgrade your Mojo's bootloader to the new Arduino compatible bootloader. To do this you will need an ISP programmer. We recommend the AVRISP mkII, but any ISP programmer should work. You can even use an Arduino to program the Mojo if you have one.

# Updating the Mojo

On the Mojo there is a microcontroller that provides most of the core functionality. As we improve the firmware for the microcontroller by fixing bugs and adding new features, you can update the Mojo by following this tutorial. The microcontroller has a USB bootloader so it is easy to update yourself.

# Subtraction

Subtraction almost doesn't need its own page. That is because if you remember your basic math you never actually need to subtract anything! Subtraction is really just an easy way to write add the opposite. When we subtract we are really not performing a special operation, but really we are just adding the opposite of the second operand.

Addition is a very important function that allows for the basis of a lot of designs. In order to add two numbers, we first need to decide what number encoding to use. Since the most common is binary, we will be using that.

# Multiplexers

A multiplexer is a circuit that allows you to select one of many inputs to be it's output. The output mirrors the selected input, so when that input is 0 the output is 0, when it is 1 the output is 1.

# Encodings

Up until now we have only talked about discreet 0s and 1s. For many cases a single bit is all you need, however, many times you need to be able to encode numbers. The far most common way to do this is to use binary encoding. This encoding is the most obvious way to do things, and it is the closest to what you are already familiar with.

# Combinational Logic

There are two main types of digital circuits. The first, and the one we are covering here, is called combinational logic. For a circuit to be considered combinational, it's output must be the same for a given input no matter when that input is applied. An example of this is an addition circuit.

# Digital Logic

What is digital logic? As you may or may not already know digital systems are based on two logic levels which are usually represented as 1's and 0's. These values are manipulated via a handful of "logic gates" which are covered in this tutorial.

# How does an FPGA work?

This tutorial will cover how an FPGA can implement so many different logic circuits simply by being reprogrammed.