casychow / DesktopPet_Eui

A small, mobile desk robot that helps alleviate the physical, emotional, and mental problems frequently faced by desk workers. This is my NYU Tandon Senior Design Project.
0 stars 0 forks source link

one-time tasks that run at start up #10

Closed qyc206 closed 3 years ago

qyc206 commented 3 years ago
casychow commented 3 years ago

Cleaned up functions from stubby_eui.py by including parameters to prevent hardcoding pin values. Now, all pin values can be seen in demo.py.

Changed the following functions (the following is not from a file, just a formatted view on github):

workTime() #wDuration parameter set to 25, replaced hardcoded time in work function
breakTime() #bDuration parameter set to 5, replaced hardcoded time in sleep function
setupBtnForTimer() #included timerPin parameter, replaced hardcoded pin
waitForBtnPress() #included timerPin parameter, replaced hardcoded pin
setupSound() #included soundPin parameter, replaced hardcoded pin
makeSound() #included soundPin parameter, replaced hardcoded pin
playMelody() #included soundPin parameter, replaced hardcoded pin
motorTest() #removed GPIO.setmode and GPIO.setwarnings functions bc we have them in demo.py
readDist() #removed GPIO.setmode and GPIO.setwarnings functions bc we have them in demo.py