I'm trying to make a compass that tells the user it's heading through vibration patterns ( one for each cardinal direction ). Thing is, I need to make the reading THEN send the vibration pattern some time after, because the magnetometer goes crazy when trying to read while the vibrator is on.
So, how can I make it so that it does something like "read heading, wait 0.3s then send vibration" ?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm trying to make a compass that tells the user it's heading through vibration patterns ( one for each cardinal direction ). Thing is, I need to make the reading THEN send the vibration pattern some time after, because the magnetometer goes crazy when trying to read while the vibrator is on.
So, how can I make it so that it does something like "read heading, wait 0.3s then send vibration" ?