The two of us continued to develop our ideas into something that could physically work.

Yael

I created the hats(!!!) for the little desk friends. These hats have a small fsr inside them that will be used to detect touch. I attached the fsr to the top of the bottle cap and then covered the constructed hat and fsr with fabric. I carefully navigated the tail of the fsr down along the side of the hat, giving it the appearance of an elegant detail when worn by the desk friends.

Kanvi

Yael dropped off the hats and friends with me, so I got to wire up the sensors and test them out!

With the following code, I have the sensor outputting an analog value dependent on how much force is placed on the friend’s head.

# Circuit Playground AnalogIn
# Reads the analog voltage level from FSR connected to GND, 3.3V, and pin A2
# and prints the results to the serial console.

import time
import board
import analogio

analogin = analogio.AnalogIn(board.A2)


def getVoltage(pin):  # helper
    return (pin.value * 3.3) / 1023


while True:
    print("Analog Voltage: %f" % getVoltage(analogin))
    time.sleep(0.2)

During class today, we plan to set up our servos permanently and then make them react to different values, using the functions I wrote last class.

Here’s a video of me patting one of the hats and the analog reads coming in on my computer in the background: