https://github.com/ignacioxd/pupil-remote-php
A PHP client for the Pupil eye tracking software
https://github.com/ignacioxd/pupil-remote-php
composer eye-tracker php php-client pupil-labs
Last synced: 11 months ago
JSON representation
A PHP client for the Pupil eye tracking software
- Host: GitHub
- URL: https://github.com/ignacioxd/pupil-remote-php
- Owner: ignacioxd
- License: mit
- Created: 2017-04-11T02:43:48.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-10T15:35:17.000Z (almost 9 years ago)
- Last Synced: 2024-10-19T05:16:57.231Z (over 1 year ago)
- Topics: composer, eye-tracker, php, php-client, pupil-labs
- Language: PHP
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pupil-remote-php
[](https://packagist.org/packages/ignacioxd/pupil-remote-php)
[](https://packagist.org/packages/ignacioxd/pupil-remote-php)
[](https://packagist.org/packages/ignacioxd/pupil-remote-php)
A simple PHP remote control client for the [Pupil eye tracker](https://pupil-labs.com/pupil/) software.
## Installation
The package is available on [Packagist](http://packagist.org/packages/ignacioxd/pupil-remote-php),
and you can install it using [Composer](http://getcomposer.org):
```shell
composer require ignacioxd/pupil-remote-php
```
### Dependencies
- [ZeroMQ PHP Extension](http://zeromq.org/bindings:php)
## Basic usage
### Connecting
```php
$host = "127.0.0.1";
$port = 50020;
$remote = new \Ignacioxd\PupilRemote();
$remote->connect($host, $port); // Or leave empty for defaults
```
### Getting Pupil's timebase
```php
$pupilTime = $remote->getTimebase();
```
### Setting Pupil's timebase
```php
$remote->setTimebase(123.456);
```
### Starting calibration
```php
if( $remote->startCalibration() ) {
echo "Calibration started";
}
```
### Stopping calibration
```php
if( $remote->stopCalibration() ) {
echo "Calibration stopped";
}
```
### Start recording
```php
if( $remote->startRecording() ) {
echo "Recording started";
}
```
### Stop recording
```php
if( $remote->stopRecording() ) {
echo "Recording stopped";
}
```