Giter Site home page Giter Site logo

php-gpio's People

Contributors

aaronpearce avatar basbloemsaat avatar notrix avatar ronanguilloux avatar scrutinizer-auto-fixer avatar srwiez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-gpio's Issues

"git was not found" when installing from composer

(received from David P., I write it back here in case it serves to others users )

I have tried to install the php gpio library and I seem to be running into a problem. Please forgive me, I am a beginner. I'm sure I'm missing something very fundamental :)

Following instructions at https://github.com/ronanguilloux/php-gpio

When I try to execute

php composer.phar create-project --stability='dev' ronanguilloux/php-gpio intoYourPath

I get an error

[RuntimeException]
Failed to clone http://github.com/ronanguilloux/php-gpio.git, git was not found, check that it
is installed and in your PATH env.

sh: 1: git: not found
I also get errors in my PHP when I try to

11 scrutinizer-related issues to fix

Permissions for Exec

Hi,

I have been dealing with the Exec command, and the only way that worked for me was exec('sudo php blinker 17 20000');

It needed the php command, is this a permissions issue? It works fine localy, but through the network it doesn't.

Permissions are not set, pelase provide example

Hi There.

I am sorry to bring this up, but could the permissions settings also be addressed here more, because this does not work without them, using Raspberry Pi2 and Jessie 2017 image.

When user starts this from the pure clean jessie image and installs apache2 with php5 pi user loggind in, , GPIO permissions are not right and this does not work. Sudo php index.php does the trick.
I would ask for clean commands on how to make this work.
After Apache2 & PHP installations, I use "sudo chown pi.pi /var/www/html -R" so that I can SFTP stuff in.

Thank you for your considerations.

Raspebrry Pi A+ & version 2 support

I'm putting here an email from Jack **** about Raspebrry Pi A+ & version 2 support:

Dear Ronan Guilloux
At First Thanks For make the Project php-gpio and share with us.
I have a Question may i know is this Project Support the Raspberry-Pi A+ or Raspberry-Pi 2 ?
I have Test this in My Raspberry Pi A+ with a simple LED blink but fail.
So just want to make sure for this.
Thanks

My (typo fixed) answer, and the things to do are:

Hello Jack ****!
AFAIK, A+ & 2 versions are not supported yet, but it wouldn't be a big deal to add such support, since you just have to find the right list of GPIO pins to add in the Gpio class constructor.
These GPIO pins lists for both A+ & Raspi 2 may probably be found in the Raspberry Pi public specifications. Other (unofficial) specs are already online, but a deeper check on that, from you or someone else would be nice.
So, do not hesitate to contribute & to enhance our GPIO pins list, in order to support these new Raspi models !

PWM support

Could it be possible to support PWM (Pulse Width Modulation)?

Permissions Issue

I seem to be having a problem controlling the GPIO pins using this script.

It seems to stem from the fact that the directories in

/sys/class/gpio

and their symlinked companion

/sys/devices/virtual/gpio

keep reverting back to being root:root.

Additionally, if I set the ownership to pi:pi and add read/write to group permissions the directory for the pin I'm accessing empties itself.

I feel like I'm missing something really obvious. At the moment my Apache server is running as pi:pi. What permissions and ownership do I need to set to make this work?

Clarification on API

The API can only be used with sudo permissions correct? The blinker file is separate and used for secure cases, but there is no safe/secure way to use the API for a web based application?

Thanks

run servomotor using this library

Hi
I am trying to simulate PWM by writing this code to run a servomotor

#!/usr/bin/env php
<?php

require 'vendor/autoload.php';

use PhpGpio\Gpio;
$gpio = new GPIO();
$gpio->output(18,0);
while(true)
{
$gpio->output(18,1);
usleep(1500);
$gpio->output(18,0);
usleep(2000000);
}

but the servo is not working, a similar code is written in python on this video and it is working: http://www.youtube.com/watch?v=ddlDgUymbxc&feature=youtu.be

any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.