--- author: Fred Cahill, Shawn Nock institute: Unlondon Digital Media Assoc. title: Introduction to Art Engineering subtitle: Medway High School lang: en-CA colorlinks: true ... # Goals ## Art Engineering - Science, technology, engineering and maths; in service of Art. - Allows unprecedented interactivity - Reach Kids, non-traditional art audiences - Opens doors to new funding sources, non-traditional gallery space. ## Unlondon - 121Studios: Coworking for Creatives - Unlab: Hackerspace - Events: STEAM Outreach & Edu., ExplodeConf, X, Y, Z ## Shawn: Day Job Freelance Engineer, Father - Indoor location tracking w/ Bluetooth - Keychain / Fitness Band Widgets - Joystick for VR - Remote Controls - Internet of S*#t ## Shawn: The Fun Stuff Hacker, Church of the Weird Machine, Odd Duck \begin{columns}[c] \column{0.50\textwidth} \begin{itemize} \item Arduino compatible implant \item EEG Games / Toy Hacking \item Brain Stimulation \item Be Weird, Make Weird, Have Fun! \item Bad at "Art" \end{itemize} \column{0.50\textwidth} \begin{center} \includegraphics[width=0.95\textwidth]{images/timbo.jpg} \vspace{5mm} \includegraphics[width=0.95\textwidth]{images/circadia.jpg} \end{center} \end{columns} ## @scanlime: Micah Elizabeth Scott, Art Engineer > "...she explores the boundaries between technology, society, and creative > expression, using her unique perspective to try and help illuminate > what makes us human." [^1] - [Eclipse](https://www.youtube.com/watch?v=bqGXC6AGlWw) - [Forest](https://www.youtube.com/watch?v=6HcIPMVUezI) - [Zen Photon Garden](http://zenphoton.com) [^1]: Micah's Portfolio Website: [misc.name](http://www.misc.name) ## @kimalpert: Kim Alpert, Aesthetic Engineer > "With a background in fine art, world music, and carpentry, Kim Alpert > brings an attention to detail and diverse style to her work." [^2] - [Bodyphonic @ National Music Center, Calgary](https://vimeo.com/154004279) [^2]: Kim's Portfolio Website: [http://aestheticengineer.com](http://aestheticengineer.com) ## Fred: Hey Fred, how about a bio? Then your images follow. Seemed like a logical flow... intro shawn; shawn talks about his heros, then switch. ## Electro Sideshow \fullImage{images/fred/Electro Sideshow.jpg} ## World Record Tower \fullImage{images/fred/world record tower for arduino presentation.jpg} ## Roll Up the Cosmos \fullImage{images/fred/roll up the cosmos for arduino presentation.jpg} ## Lumarca \fullImage{images/fred/lumarca for arduino presentation.jpg} ## Knexhibitions \fullImage{images/fred/knexhibitions for arduino presentation.jpg} ## Canon \fullImage{images/fred/canon for arduino presentation.jpg} # What's in your kit? ## Kit Contents - Arduino Uno R3 Clone - Solderless Breadboard - Connecting wires - LEDs - Resistors, Potentiometer - Buzzer - IR Remote - IR Receiver ## What is Arduino? \begin{center} $\mu$C + reset button + led + USB communication \end{center} It's a kit (on a board) with the bare minimum components to easily use the $\mu$C hardware. They do the basic, boring design needed for any board, so users only need to add the neat stuff. ## Arduino UNO The Arduino variety that we are using is the Arduino UNO. - Processor: Atmel Atmega328p - Memory: 2K RAM + 32K Flash - FT232RL Logic-level Serial$\leftrightarrow$USB Chip ## Arduino Software The Arduino folks also adapted an *Integrated Development Environment* (IDE) to their boards. This IDE allows users to easily write programs for their boards and then write the programs to the $\mu$C. \Large Get the Arduino IDE: [https://www.arduino.cc/en/Main/Software](https://www.arduino.cc/en/Main/Software) # Circuit Basics ## Current Current is the flow of charge through a circuit. Conventionally we think of this as happening from $+$ to $-$ of the power supply of the circuit. ## Voltage / Potential / Resistance Voltage is how fast the current can move in the circuit. River metaphor: - current = flow rate: ($\si{\liter\per\second}$) - voltage = change in height: ($\si{\meter}$) Other devices in a circuit can impede / effect current flow. We'll call them resistance(s). # Circuit Devices ## Diode \begin{columns}[c] \column{0.50\textwidth} \begin{itemize} \item One way value for current\footnotemark[1] \item LED $\equiv$ Light Emitting Diode \item Band marks (-)\footnotemark[2] \item Longer leg marks (+) \end{itemize} \column{0.50\textwidth} \begin{center} \includegraphics[width=0.75\textwidth]{images/diode.png} \vspace{5mm} \includegraphics[width=0.50\textwidth]{images/led.jpg} \end{center} \end{columns} \footnotetext[1]{\tiny \url{https://learn.sparkfun.com/tutorials/diodes}} \footnotetext[2]{\tiny \url{https://learn.sparkfun.com/tutorials/polarity/diode-and-led-polarity}} ## Diode Problems * Diodes don't limit current * Diodes aren't perfect (some current turned to heat) * Too much current = Too much heat = __BANG__ * How do we limit current? ## Resistor \begin{columns}[c] \column{0.50\textwidth} \begin{itemize} \item \emph{Resist} the flow of current \item Needed for LEDs: $\approx\SI{400}{\ohm}$\\ (safe for $\le\SI{6}{\volt}$) \item Button Pull-up/down: $\ge\SI{10}{\kilo\ohm}$ \item Color coded, Google it \end{itemize} \column{0.50\textwidth} \includegraphics[width=0.98\textwidth]{images/resistor.png} \end{columns} ## Buttons - Buttons connect _or_ disconnect two wires/parts - Momentary Switch: Normally Closed (NC), Normally Open (NO) - Toggle Switch ## Digital Signals - Vcc: The power supply of the digital circuit elements - GND: The reference voltage (usually \SI{0}{\volt}) - Connecting a part to Vcc = Logical 1 - Connecting to GND = Logical 0 ## Transducers {.fragile} Transducers turn electrical energy into another sort of energy: | | -------|--------: Speaker|Electrical $\rightarrow$ Sound Microphone|Sound $\rightarrow$ Electrical LED|Electrical $\rightarrow$ Light LED|Light $\rightarrow$ Electrical Piezoelectric|Electrical $\rightarrow$ Motion ## Piezo Buzzer - Piezoelectric elements change shape when voltage is applied - Thin discs can be made to oscillate and create sound. - Contains oscillator circuit - Two connections: Vcc, GND - Use a switch; connected = annoying tone, disconnected = glorious silence ## Power The power supply provides the energy to drive the system *and* defines logical 1. Can be a: * Voltage Regulator (converts one potential to another) * Batteries * Solar Panel In our circuits, your laptop is converting it's power source to $\SI{5}{\volt}$ and delivering power to our circuit via USB. You also have a battery pack for computer-free shenanigans ($\SI{6}{\volt}$). ## $\mu$Controller Microcontroller ($\mu$C) is a *processor*, *memory* and a few *peripherals* on a standalone chip. Processor : is a group of transistors that understands a few dozen commands (ADD, SUB, JUMP..) Memory : a circuit that can hold values. Peripherals : Vary chip to chip, but often include timers, radios, communication interfaces Seems complicated, but really simple. They literally read a command from memory, then execute the command. At the end of the command, read the next command from the next memory cell and repeat^[some commands change the next command memory address] ## $\mu$C + Digital Signals as Switches If one end of an LED is connected to ground, and the other end is connected to a pin on a $\mu$Controller, then: If the $\mu$C sets the pin HIGH ($\SI{5}{\volt}$) then current will flow from the pin through the LED to GND, if LOW ($\SI{0}{\volt}) then the current will not flow and the LED is off. # Let's start programming ## Configure Arduino \begin{center} \includegraphics[width=0.98\textwidth]{images/arduino-board.png} \end{center} * Board: Arduino UNO * Processor: ATmega328 * Port: \ldots ## The Code Environment \begin{center} \includegraphics[width=0.5\textwidth]{images/arduino-toolbar.png} \end{center} ## Your first Program ~~~ C /* the setup function runs once on reset / power */ void setup() { /* set pin 13 as an output */ pinMode(13, OUTPUT); } /* the loop function repeats forever */ void loop() { digitalWrite(13, HIGH); // turn on LED delay(1000); // wait for a second digitalWrite(13, LOW); // turn the off LED delay(1000); // wait for a second } ~~~ ## The End? \begin{center} \LARGE{Questions?} \end{center}