Lucid Projects

Blog - Day to day mumblings...
Pcomp Week3 Labs And More

Pcomp Week3 Labs And More

26 Sep 2019 - Jake Sherwood

pcomp week 3 labs and more pcomp week3 labs and more

PCOMP WEEK 3 - Labs & More

This week the labs explored digital and analog inputs with the Arduino nano IoT.

I had an Arduino Uno a few years ago for a project, so it wasn’t completely new. But it was a good refresher in class and the nano is cool!

Durring class I was able to follow along and do the button and FSR labs.

I did the potentiometer lab afterwards and saw there was a few simple changes to make the same sketch work with a speaker.

I did not get a speaker in my kit, but I was able to borrow one to give it a shot. I attempted to do the speaker portion with both potentiometer and FSRs. But I failed at both attempts. The potentiometer sketch had errors which were pretty clear but I still couldn’t get it to work. Not sure why it wouldn’t work with the FSRs.

Failing at the speaker tests did lead me to the photo resistors which was pretty cool.

I got it working with the serial monitor and reading the different values.

week3 lab: button week3 lab: FSR week3 lab: potentiometer week3 lab: photo resistor
week 3 labs: button, fsr, potentiometer, photo resistor

I decided to expand on that a bit and added 4 LEDS that illuminated based on the reading from the photo resistor(s). breadboard test for gatorfant light breadboard test for gatorfant light

A simple if statement, in my Arduino sketch, checking the resistor values allowed me to illuminate the 3 yellow LEDs on a lower resistance range and illuminate the blue LED on full resistance.

I figured I’d take it one step further and wired into on of my cardboard etching prototypes. Using the LEDs as the eyes for the characters.

I soldered up longer wire / leads for my LEDs. And wrapped the shorter leads with electrical tape so I didn’t get a short inserted into the cardboard.

I twisted each set of wires so the it was a bit less of a mess and secured with tape on the back of the cardboard. gatorfant wires gatorfant wires

gatorfant led eyes gatorphant LED eys

If I hover my finger over the photo resistor. The yellow light illuminated. If I touch the resistor the blue light lights up and the yellow ones turn off. gatorphant blue LED eyss - yellow LED eyes gatorphant blue LED eyes - yellow LED eyes

categories: pcomp

join me on this crazy ride. enter your email:

contact [at] jakesherwood [dot] com

contact me if you'd like to work together