Device could automatically deliver drug to reverse opioid overdose