Software debouncing in a servo motor using myoware muscle sensor

hey guys what id like to do is to make a digital reading of HIGH whenever the analog reading is above 300. pls help me