Category Archives: Class notes

Putting it all together

Code from class, circuit schematics, etc. are at the bottom

Let’s get the chocolate in the peanut butter

Continue reading

moving on up

  • objects
    • class
    • constructor
    • (new tabs!)
  • arrays
    • arrays plus for loops

 

 

code from class

 

 

Animation

code from class

Primitive Drawing

Processing :: Setup//draw (just like loop())

  • size
  • width and height
  • background
  • coordinate system
  • line
  • point
  • ellipse (ellipseMode)
  • stroke/nostroke/fill/nofill
  • rect (rectMode)
  • mouseX mouseY

code from class

Some notes on your RGB LEDs

So we didn’t get the chance to do color mixing with the LEDs, but I hope you all try it out. Here’s some notes on them….

Continue reading

Tricking the machines

So far, we’ve managed to get the micro controller to read digital & analog inputs, ad set a variety of fancy LED effects. Now it’s time to make some even more fancy things happen.

The microcontroller has the ability to red variable voltages, but what about sending out a variable voltage? Unfortunately, unless we’re using a high end microcontroller with a built in DAC (digital to analog converter), there’s no way to get a true analog voltage out of the microcontroller. However, we can fake it with a technique called Pulse Width Modification (PWM).

Continue reading

Arduino Starter Kit book

You are required to login to view this page.

Making sense of things

We were talking last time about how awesome computers are at reconfiguring themselves to do different things. This was manifest in pins on the microcontroller that we could change the behavior of through software.

What we were lacking in this model though, something that we possess, is a sense of memory (regret, if you must). Our programs so far forget things as soon as we’re done with them. It’s not a very efficient method, like buying a new water bottle everytime you wanted a drink. Instead, let’s save the planet and use something over and over again. In programming, the tool we can use for this is a variable.

Continue reading

Your first programs

 

!!Updated with code and the circuits from class!!

While you’ve successfully managed to leave the lights on, you’ve so far been limited in that you have only been able to do one thing at a time. With software, we can do multiple things (or at least have the appearance of multiple things) happening.

Software is the realization of Alan Turing’s universal machine. In short, this is a computational machine that can replicate any other computational machine after being fed a set of instructions that indicate the computation to go through and how the machine is set up to do this. ¬†Through software, we can reconfigure a machine to do anything we darn well please, including teaching the machine to behave like a different machine (see also, emulators).

Continue reading

Switches and things

Computers are great adding machines. They’re also great at comparing things that usually don’t work well together. Jim Campbell has a nice animation¬†about this. We can get away from the mouse, monitor, keyboard (and now ubiquitous touchscreen) to think differently about these machines we use all the time.

At the end of the day, all we’re doing here is wrangling electrons. They want to move from a place of higher potential energy to a place of lower potential energy (we call this ground). The bus falling off the side of a cliff metaphor is generally a good idea of how we can think of these things moving through a circuit.

Continue reading