Hello,
I compiled and added i2c in extension but I get an error message when I try to run a command (i2cset for example)
A simple script :
<?php
i2cset(1, 0x04, 0x04, 0x61);
?>
Return :
php: symbol lookup error: /usr/lib/php/20180731/i2c.so: undefined symbol: i2c_smbus_write_word_data
If I test with your example I get:
root@pi0(rw):/opt/i2c# php i2c.php
Functions available in the test extension:
i2cget
i2cset
PHP Fatal error: Uncaught Error: Call to undefined function confirm_i2c_compiled() in /opt/i2c/i2c.php:16
Stack trace:
#0 {main}
thrown in /opt/i2c/i2c.php on line 16
Do you have an idea to help me?
Thank you in advance for your support!
And thank you for this code!
Hello, I compiled and added i2c in extension but I get an error message when I try to run a command (i2cset for example)
A simple script :
Return :
php: symbol lookup error: /usr/lib/php/20180731/i2c.so: undefined symbol: i2c_smbus_write_word_data
If I test with your example I get:
Do you have an idea to help me?
Thank you in advance for your support! And thank you for this code!
David