Petal Docs
  • Introduction
  • Connect to muse (Free)
    • Connect muse & Stream Raw Data
      • Connect muse to Mac
      • Connect muse to Windows
  • Receive Data Streams (Free)
    • Receive an LSL Stream
      • Python Examples
      • Node Examples
    • Receive an OSC Stream
      • Python Examples
      • Node Examples
    • Receive Webhooks
      • Python Examples
      • Node Examples
  • Log Data (Free)
    • Logging Data
  • Metrics API (Maker Plan)
    • API Integration
    • Make Metrics API calls
      • Python Examples
      • Node.js Examples
  • Receive Data Streams (Maker Plan)
    • Receive an LSL Stream
      • Python Examples
      • Node Examples
    • Receive an OSC Stream
      • Python Examples
      • Node Examples
    • Receive Webhooks
      • Python Examples
      • Node Examples
  • Glossary of Terms
    • Glossary of Terms
  • 🧪Markers
    • 🧪Markers User Guide
Powered by GitBook
On this page
  • Python Installation
  • Script Examples

Was this helpful?

  1. Receive Data Streams (Free)
  2. Receive an OSC Stream

Python Examples

PreviousReceive an OSC StreamNextNode Examples

Last updated 2 years ago

Was this helpful?

Python Installation

See the for full scripts. For python, we use 3.8.5, but any later 3+ version will probably work. Create a virtualenv from that repo:

pip install venv
python3 -m venv eeg_venv
# activate the venv according to your OS
# Windows example:
. ./eeg_venv/scripts/Activate
pip install -r requirements.txt

Script Examples

This script receives an OSC EEG stream and prints it to the console.

python osc_receive.py -t /PetalStream/eeg
python osc_receive.py -t /PetalStream/gyroscope
python osc_receive.py -t /PetalStream/acceleration
python osc_receive.py -t /PetalStream/telemetry
python osc_receive.py -t /PetalStream/connection_status
python osc_receive.py -t /PetalStream/ppg
getting started repo
osc_receive.py