An open API service indexing awesome lists of open source software.

https://github.com/daverandom/serial

Serial device manipulation toolkit
https://github.com/daverandom/serial

Last synced: 8 months ago
JSON representation

Serial device manipulation toolkit

Awesome Lists containing this project

README

          

# Serial

```php
getConfigForDevice(COM_PORT);
var_dump($config);

// Modify some parameters and set the config
$config
->setBaudRate(9600)
->setParityMode(ParityMode::NONE)
->setDataBits(8)
->setStopBits(1)
->setControlFlowMode(ControlFlowMode::NONE)
;
$manager->configureDevice(COM_PORT, $config);

// Open the device
$device = $manager->openDevice(COM_PORT);

// Send a message to the device
$device->write('D');

// Read some data from the device
var_dump($device->read());
```