cast memory variables to float before division

problem was I saw nothing but 0% on my raspberry, running python 2.7
this fixes that.