Pcomp Analog Input/Output

For this assignment, i decided to build an LED Cube.

They used to be all the rage at some point. I remember every arduino book i have read had one LED cube project near the end. They have a pretty simple layout (that actually took me a while to properly comprehend!) :

It goes like this: All the LED’s in each layer, share the same cathode, and every LED in each column share an Anode. Simple? Right.

So that way, if you have a wire running through each column and a wire attached to each layer, you can individually light up any LED you want. My goal was to simply put a potentiometer dial in the circuit to control X,Y,Z of which LED is lit up. But that turned out to be difficult:

You see, i wanted the LEDs to fade-in and out into each other whenever i turned the knob. But addressing all the LEDs AND adding 3 Analog inputs and 9 Digital Outputs and 3 Analog Outputs proved problematic. I tried using the “analogWrite” function, but that even has its own limits.
Solution? Multiplexer… which i don’t have at the moment.

So with what i have now, i can address any LED i want and fade it in and out. Getting inputs is a problem.

But forget about the inputs! What’s next for this project is 3D!
What if we were able to spin this cube real fast? That way it’s not impossible to think we might be able to create Psuedo-Holograms if it’s fast enough to get past the human eye’s Flash-Lag effect.

Things we will need for that:
1. Some design for a brush connection to the rotating cube
2. definitly multiplexers. i don’t want to create 12 brush lines for the connection!
3. Is the a library for rotating stuff? There’s a few for LED Cubes and a few for rotating 2D RGB LED strips…

ICM Week3 : Chaos to Order by Randomness, Conditionals, Loops and Functions

Well this is a title i like: Chaos to Order.

because, when you think about it, aren’t we the digital creatures in this analog world? The mediators between left and right, good and bad, chaos and order?

anyway, this one began with a random contraption Peach (Changtao, my partner for this assignment) made to kick us off. it was supposed to be a very free spirited polygon that bends and stretches in space and its vertices sorta bounce off this invisible box around it that stopped it from expanding too much. The idea was to add a slider that limits that polygon to a smaller and smaller box, and a button that basically changed its color.

Okay now that i think about, maybe we were better off using the “beginShape” function rather than quad…

anyways, first thing i did was putting the Quad (Polygon) generator inside a function for it to be easier to call. After that was figuring out the rollover. We found an example that also added Hand and Cursor to our rollover… a good find for p5!

Next was the slider nightmare. I mean… there must be an easier way, right? this is just a learning exercise… right? no? okay.

So after implementing the slider, we wanted a clean look. so we removed the line and just created a geometric scene basically where colors were front and center. Oh and that whole limiting bounding box thing? yeah that didn’t work out. Turns out the random function can sometimes jump through limitations! Instead, we use our slider to calm our crazy polygon down to a zen state where it’s breathing in and out… not really caring about anything.

Chaos to Order on p5.js Online Editor


PComp : Build a switch

I get what this assignment is about.

What is a switch? just something to connect/disconnect two wires to complete a circuit. Does it have to be a standard switch? No. Anything can be a switch.

This is the idea of creative electronics, right? to turns things into electronic components. Like, what is a sensor? (Usually) just something that turns a real-world phenomena into a variable resistor.

A switch is a binary form of a sensor. On or off, zero or one. So any absolute physical action can be turned into a switch. A touch, open and close, on and off.

Anyhow, i decided to move a whole other direction. From the few electronic components i had the courage to bring in my luggage, was a 9-Axis IMU sensor that i bought a few years ago to play around with. It’s amazing how cheap these things are now… They used to be on Missiles not many years ago!

i used the MPU-6050 breakout board which has on-board processing that takes the signal processing off your shoulders. You’ll get clean, processed data off the Serial output in degrees or radians, depending on your religion.

There are many codes online to get things going. And they’re all practically the same: send and interrupt, read the data through serial, and format it for display or later use. I ended up using DiyHacking code.

So the idea is to have some LEDsĀ  pointing in every direction that will light up when the device is pointing their way. The “Switch” part happens when you point the device in a specific orientation that will “Unlock” the lights.

So this actually gave me an idea. Why not make an actual puzzle box or jewelry box with this? It can simply activate a servo and open/lock the enclosure. It would be like a gyro combination lock!

Things that i will need for that:

1- Arduino mini
2- Better looking LEDs maybe
3- An IMU with Compass sensor. so it will have an absolute origin.
4- Mad design skills for a 3D printed enclosure.

Visual Language: Design Analysis

So to me, the hardest part was to a design to choose. Everyone is inspired by a number of things in their lifetime, that are actually mostly easy to remember and make a “visual art history” of yourself. That was practically my first assignment for a CalArts Art History course i took online.

But i had to choose, right?! So one thing im really fascinated with is reductions. Saying so much with so little is the idea basically, and that doesn’t have to lead to Minimalism. In fact, im trying to avoid minimal themes lately and try to explore other paradigms that resonate with modern days people’s psyche. So imagine a grafitti is usually the opposite of minimal, but can say so much with so little!

Alright so the design i chose is the logo at the beginning of the TV adaptation of Agatha Christie’s Poirot. I used to watch it as kid with single digit number of age so the fact that i went to it shows how deep a mark it left on me. The music, the art style, and that damn logo! It contained everything about the series and the most detailed depiction of Poirot’s actor David Suchet.

For color, i used Adobe’s online Kuler (now called Adobe Color) tool to analyze the main colors. But you dont need a tool to realize the design consists of mainly black,white and grey gradients plus a hint of blue for the smoke.

Although we could categorize the coloring as Monotone, the color is chosen masterfully and ties in beautifully with the rest of the Art Deco style of the opening. Not to saturated and not so muted, it does a great job of adding to the mystery of inner workings of Mr. Poirot’s brain.

Font used for the main title is called Plaza. Designed by Alan Meeks in 1975, Plaza is an Art Deco sans serif style. It includes many alternative characters which offer endless possibilities. Plaza is ideal for work in which a feel of the 1920s or 30s is desired. (source)

Plaza Font

For composition, a trick i (along with infinitely more talented illustrators than me) use, is that we squint our eyes. This way you force yourself to reduce details in an image and only focus on the major shapes that forms the composition in front of you. Design is almost always a General to Detail process, and for understandable psychological reason, our eyes are usually distracted by the details to pay attention to the big stuff.

Blurred Squinted Poirot

So generally, the composition is a very heavy on the left and creates a big negative space on the right. sorta like a window leading to things beyond the composition.

adding some guides to the design, the design seems to balance out the top and bottom, but generally uses a Rule of Third to place the graphics.

Simple Grid on Poirot

Though the odd ball is the placement of the eye. i can’t say for sure if it is following a specific grid, but it just brilliantly works out as its only important relation is with the face the designs forms on the left. it might not follow a specific grid, but it works, because human eye is more than anything trained to detect faces immediately. You can experience this when you are in the back of a class or conference and someone turns around and you can’t help but to jump your POV to their direction.

One thing i always like to test with designs i like is to see if they’re following a less geometric grid like the Golden Ratio or Phi grid. I wont go into details of it, but there are different ways to apply the ratio to a design. i tried one (practically an exponential vertical grid), but it doesn’t really work with the design.

Though overlaying the Spiral pattern is almost serendipitous to the design. Puts the placement of the eye/moon in a structure. And when flipped, matches with the placement of other “facial” features of the design!

Double Phi Grid

Why is this you ask? Well, we’re dealing with an organic thing, a face. Faces inevitably follow the Phi structure one way or the other, like most other organic shapes. But with Phi, i always tread lightly. There’s too much hype around it and i am yet to see a good practical approach to it as a design grid. (source)


Forcing Phi

Alrighty. That’s it then.
Beautiful reduction and a design that contains everything the series (and the books) are about. Again, i love reductions! i had more candidates like Hitchcock’s logo or the logo for a fictional Jerry Lewis shows in the movie “King of Comedy”.

ICM Intro

Scripting language, programming language, real and fake programmer…

its hard to get past the noise whenever you try learning programming from scratch for the hundreth time or just a new language or a framework. there’s a right way and a worng way and wine snob like people being disgusted at whateveer way you do htings.

should you care? yeah. a bit. don’t be all free and relax. programming is a very disciplined thing. but if anything stops you from learning, just destroy it. get to work as SOON as humanly possible and just keep doing.

these are things i’ve learned in every attempt to programming i’ve had. back in “Programming 101” in Iran i didn’t learn kaput in class, so i looked up the best selling book on C++ (it was Deitel & Deitel), bought it, didn’t understand a word, and went with “C++ for Dummies”, loved it, and passed the course with it. this was 8 years ago. now things are different.

with Youtube, there’s high quality videos of any minute subject you would ever need in the beginning. Or you can bend towards the absolutely academic direction and go on edX or Coursera and just begin learning in your favorite school… and why go to school then… and stop thinking about that and continue to use whatever assets your school gives you.