sunfounder / SunFounder_PiCar-V

Smart Video Car Kit V2.0 for Raspberry Pi from SunFounder
GNU General Public License v2.0
111 stars 175 forks source link

Library for PHP Possible? #54

Closed crispy-computing-machine closed 3 years ago

crispy-computing-machine commented 3 years ago

Looked through the python code and i want to recreate in PHP using something like https://github.com/WiringPi/WiringPi-PHP

I would like to know if its possible to access the servos/motors on the boards via the above library? (It can access I2C and GPIO)

I am just playing with the below:

php $handle = wiringPiI2CSetup(0x40); // The PCA9685 device

$testWrite = wiringPiI2CWriteReg16($handle, 0xFC, 1); // 1 or 0 on/off?