

In my program, I add Passing Urine behavior, and Sit Down and Stand Up behavior. Since the code lines could run parallel, the puppy could do several actions at one time. To make things more reasonable, those actions should be done when “waking_up” variable is True. When Right brick button is pressed, it will run three steps by switching rear leg positions. When Up brick button is pressed, the puppy will nod head three times. In these two code lines, the program adds more features for the pet puppy. The logic behind is that when you give puppy too much food, it will say “No!” and the screen will display “too much!”. It should happen when puppy is awake and “feed_time” value <5. Identify color block simulates the feeding of puppy. If the touch sensor is pressed, it will set “Waking_up” variable to True, so that the sleeping loop is interrupted and the puppy will wake up. The “Sleep_mode” block is designed to check touch sensor status continuously. Done for the initialization! Sleeping and Waking UpĪfter initialization stage, one code line will enter into a loop in which the program will wait till Timer 3 exceeds 20 seconds, then it will make puppy sit down and call “Sleep_mode” block to make the dog snoring. It will then sets Timer 3 to zero and sets variable waking_up to True. When Center brick button is pressed, the program will make the puppy stand up and bark. If Up or Down brick button is pressed, the program will adjust the angle of head. It sets a sitting gesture as the initial status. The initialization part is similar to the old version.
