# Physical Computing

by

## Capacitors and RC Filters

Capacitors are electronic devices that can store electric charge. The amount of charge (Q) a capacitor can hold per volt (V) is called the capacitor’s capacitance (C) and has SI units of farads. C = Q/V Capacitors are used for myriad reasons. You will find capacitors in timing circuits, filter circuits, AC to DC conversion

by

## Arduino Program Flow Control Using Conditional Statements and Loops

There are a vast number of programming languages each with their own syntax but most share common features that allow a programmer to control the flow of processing. This laboratory introduces some of the most important programming structures for flow control using the Arduino programming language, which is based on C/C++; The IF Statement An

by

## Arduino Serial Communication, Bytes, Bases, and ASCII Characters

Understanding data types is especially important if you wish to use serial communication to send data to your Arduino and have the ATmega328 act on this data. Serial data is read from the serial buffer using a sequence of commands like this. if (Serial.available()>0) { // there are bytes in the serial buffer to read

by

## An Arduino Calculator

The program below is capable of summing a sequence of single digit numbers typed into the Arduino IDE serial terminal. For example, if 2+4-5+1= where typed into the terminal the output would be 2+4-5+1=2 Upload this program to your Arduino board and try it out. Notice that the program breaks if the very strict syntax

by

## Using Pulse-Width Modification to Simulate Analog Outputs with Digital Signals

Pulse-width modulation (PWM) is the act of using a digital ‘on’ or ‘off’ signal (all or none, high or low, 5 V or 0 V) to simulate an analog graded signal. This is done by rapidly flipping the digital signal between high and low voltage so that the duty cycle (defined as the amount of