The Spin Cycle
The Spin Cycle is a head massaging device that does all of the work for you. The next time you feel stressed or congested in the head, all you need to do for relief is... turn on the EV3, connect to Tufts Wireless, run the IDE setup, open your laptop, access the IDE, run the file titled "spincycle.py", lift the device onto your head, and hold the button down. Easy as that!
Critics are calling The Spin Cycle the next big breakthrough in home technology. Tweet us what you think using the hashtag #ISpinIGrin. Happy spinning!
This Spin Cycle works by utilizing a large LEGO motor and a touch sensor. Under the hood, the code runs an infinite while loop that continually checks whether or not the button is pressed. When it is being pressed, the motor rotates and the device massages your head. When it is not being pressed, The Spin Cycle cuts power to the motors.
#!/usr/bin/python3 def main(): ev3 = Device('this') motor = ev3.LargeMotor('outD') touch_sensor = ev3.TouchSensor('in3') print('start') while True: if touch_sensor.is_pressed == 1: motor.run_forever(speed_sp=400) else: motor.stop(stop_action="coast") if __name__ == '__main__': main()