P.S. The "4" in line 3 of the code represents the port number your Flip-Flat is using.

Forgot to mention that part, sorry!