Error within Bubble Machine coding

It is somewhat working but there is no movement with regards to the fan - any ideas?