sleep(0.2) ohbot.move(ohbot.LIDBLINK, 10) # wait for a random amount of time for realistic blinking sleep(randint(0, 4)) # start up sequence resets to mid position, sets the eyes to blue then goes to sleep ohbot.reset() ohbot.eyeColour(0, 0, 10) sleep(1.0) ohbot.eyeColour(0, 0, 0) ohbot.move(ohbot.HEADNOD, 0) ohbot.move(ohbot.LIDBLINK, 0) sleep(2.0) # close to turn the motors off ohbot.close() while (True): # get seconds and minutes into strings s = strftime("%S", localtime()) m = strftime("%M", localtime()) # set this to False for testing to make Ohbot speak continuously everyQuarterHour = False #make True for every 15 mins if ((everyQuarterHour == False) or ((everyQuarterHour == True) and (m == "00" or m == "15" or m == "30" or m == "45") and m != lastm)): lastm = m h = strftime("%H", localtime()) hi = int(h) say = "Wow the time is " if (m == "15"):
ob.say("Let me see") ob.wait(.3) showerFirst = chooseShower() ob.say("I've decided!") ob.say("The kid who is showering first is") ob.say(showerFirst) listOfMoves = [i for i in range(random.randint(40, 60))] print(len(listOfMoves)) ob.reset() ob.wait(1) ob.say("Have a good shower" + showerFirst) ob.say("Remember to leave some hot water for the next person!") ob.wait(1) ob.say("My work here is done.") ob.say("I am going back to sleep") ob.say("Call me if you need me.") ob.say("Goodnight!") endAndRest() ob.wait(1) ob.close()