Download the PHP package microscrap/scrapyard-usb without Composer

On this page you can find all versions of the php package microscrap/scrapyard-usb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package scrapyard-usb

microscrap/scrapyard-usb

Tests Latest Version on Packagist Requires ext-ftdi

The FTDI adapter for scrapyard-io/framework: the usb driver for I2C, SPI, digital pins and UART over an FTDI USB board such as the FT232H. It works on any machine with a USB port, including a Mac.

Protocol Engine Device names
I2C, SPI, digital MPSSE ft232h, ft2232hl-a, ft2232hl-b, ft4232hl-a … ft4232hl-d
UART FTDI serial product name (ft232h, ft2232h, ft4232h, ft232r, ft230x, …) or USB product id (0x6014)

There is no PWM driver.

Requirements

Installation

The service provider is discovered automatically and registers usb on the DigitalIO, I2C, SPI and UART managers. Make it the default in config/gpio.php, or name it at each call.

Usage

An FT232H runs one of these at a time, so each example below is a separate board, or the same board after disconnect().

SPI, with chip select on D4 (0) and a data/command pin on D5 (1):

I2C:

Serial, on the chip's UART engine:

The framework's README covers the transports, the event loop and via(). What this adapter adds:

One engine per interface

An FTDI interface runs its MPSSE engine or its UART engine, never both. Once one is registered, opening the other on the same interface throws GPIOLevelException::ftdiEngineBusy before any USB traffic. disconnect() frees the interface for the other engine.

A UART on an FT2232H or FT4232H uses interface A, the same interface as ft2232hl-a / ft4232hl-a.

Shared MPSSE context

I2C and SPI open the interface and hand it to the usb digital driver, so the spare lines are pins at once with no connectTo(). Connect I2C or SPI first: SPI refuses an interface the digital driver opened on its own.

Digital pins

I2C

SPI

UART

Offloading

libusb holds the device for this process, so via() jobs cannot move to another process:

Testing

The suite uses scripted serial and MPSSE links and recorded command streams, so it runs without a board.

tests/Digital/Ft232hDigitalIOTest.php drives all twelve pins of a real FT232H with nothing wired to them. When no board answers it skips itself.

License

MIT. See LICENSE.


All versions of scrapyard-usb with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4|^8.5|^8.6
ext-ftdi Version ^0.8.0
gpio/contracts Version ^0.8.0
gpio/digital Version ^0.8.0
gpio/i2c Version ^0.8.0
gpio/nuts-and-bolts Version ^0.8.0
gpio/spi Version ^0.8.0
gpio/uart Version ^0.8.0
microscrap/ftdi Version ^0.8.0
microscrap/mpsse Version ^0.8.0
venusian-voyager/nuts-and-bolts Version ^0.8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package microscrap/scrapyard-usb contains the following files

Loading the files please wait ...