There is no license information available for the latest version (v0.1.0) of this package.

An extension that works with a simple api to control GPIO's of Raspberry PI 3, using Wiring Pi library

v0.1.0 2019-03-21 21:21 UTC

This package is auto-updated.

Last update: 2024-03-22 08:49:22 UTC


README

Biblioteca PHP para controle das portas GPIO do Raspberry 3

Requisitos

  • PHP >= 7.2.*

Ambiente

Testado no raspbian 9 com PHP 7.2

Instalação

Instale diretamente no terminal de comando com composer:

composer require ioteducation/gpio

ou adicione em seu arquivo composer.json:

"require": {
    "ioteducation/gpio": "^0.1.0"
},

e no terminal:

composer update

Exemplos

Atuadores

use I9IoT\GPIO\Device\Device;
use I9IoT\GPIO\Pin\PinMode;
use I9IoT\GPIO\Pin\PinState;

$device = new Device();
$device->newPin(26, PinMode::OUTPUT);

// Equivalente ao digitalWrite(26,HIGH) do arduino
$device->actions->digitalWrite(26, PinState::HIGH);

// Equivalente ao digitalWrite(26,LOW) do arduino
$device->actions->digitalWrite(26, PinState::LOW);

// Equivalente ao digitalRead(26) do arduino
echo $device->actions->digitalRead(26);

Em breve

  • Sensores
  • Interrupções
  • PWM
  • Funções alternativas para newPin:
    • newOutput
    • newInput
    • newPWM
    • newInterrupt
    • Entre outras

Desenvolvimento

Esse projeto é uma parceria da IoT Education com a I9 IoT.

IoT Education

  • Cidade: Indaiatuba - SP
  • Ramo: Consultoria e Treinamento IoT

I9 IoT (Startup)

  • Cidade: Indaiatuba - SP
  • Ramo: Consultoria e Desenvolvimento de sistemas IoT