Scientists hope the device can help give patients more warning ahead of seizures and prevent potential injuries