We both continued working on our parts of the project.
Yael
I was focused on developing a more interesting form with defined spots for the servo. My favorite form that I tested is the one displayed below:
I really liked the life that was given to these fabric scraps through such small changes and details. It reminds me of that puppet video we watched.
Each of these have two ends that act as the ‘arms.’ I plan to have a servo connected to each of their arms, utilizing our maximum of 2 servos each.
In class today I want to make the soft sensor buttons that will trigger some of their actions. The form that this button will take on is a…. surprise!
Kanvi
After talking with Yael and inspiring the surprise button (I’m excited!!), I continued working on coding different functions to display different reactions the desk friend might have.
# Initialize hardware. # Create a PWMOut object on pad SDA A5 to generate control signals. pwm1 = pwmio.PWMOut(board.A5, duty_cycle=0, frequency=50) # Create a PWMOut object on pad A3 to generate control signals. pwm2 = pwmio.PWMOut(board.A3, duty_cycle=0, frequency=50) # Create a Servo object which controls a hobby servo using the PWMOut. servo1 = servo.Servo(pwm1, min_pulse=1000, max_pulse=2000) # Create a Servo object which controls a hobby servo using the PWMOut. servo2 = servo.Servo(pwm1, min_pulse=1000, max_pulse=2000) # ---------------------------------------------------------------- # Begin the main processing loop. totalHappiness = 100 def happy(level): for angle in range(0, level, 1): servo1.angle = angle time.sleep(0.02) for angle in range(level, 0, -1): servo1.angle = angle time.sleep(0.02) def beg(level): for angle in range(0, 90, level): servo1.angle = angle servo2.angle = angle time.sleep(0.02) for angle in range(90, 0, -level): servo1.angle = angle servo2.angle = angle time.sleep(0.02) def neglected(): # still thinking...
Today in class, I will pin down my prototype and see what these functions actually look like with the servos moving the stretchy fabric. I also created the “totalHappiness” variable and want to work on translating this on to the lights on the Circuit Playground, to show a meter of how happy our friend is.
Leave a Reply
You must be logged in to post a comment.