Demo entry 6623966

geia

   

Submitted by anonymous on Jun 12, 2017 at 07:39
Language: Python. Code size: 598 Bytes.

# -*- coding: utf-8 -*-
# This is an example of popping a packet from the Emotiv class's packet queue
# and printing the gyro x and y values to the console. 


import time

from emokit.emotiv import Emotiv

if __name__ == "__main__":
    with Emotiv(display_output=True, verbose=True) as headset:
        while True:
            packet = headset.dequeue()
            if packet is not None:
                #print("Sensors - O1:{x_position} O2:{y_position}".format(x_position=packet.sensors['O1']['value'],y_position=packet.sensors['O2']['value']))
                pass
            time.sleep(0.1)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).