[a32498]: / python / example.py

Download this file

16 lines (11 with data), 387 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# -*- coding: utf-8 -*-
# This is an example of popping a packet from the Emotiv class's packet queue
import time
from emokit.emotiv import Emotiv
if __name__ == "__main__":
with Emotiv(display_output=True, verbose=False) as headset:
while True:
packet = headset.dequeue()
if packet is not None:
pass
time.sleep(0.001)