Raspberry Pi 3B+ の I2C ポートを使用し、ローレベルAPI(バイト列による制御)を行う例です。
※ 本サンプルは、言語は Python を使用していますが、KeiganMotor の Python 用ライブラリは使用していません。
準備
SMBus ライブラリを使用し、I2C ピンを有効にする必要があります。下記ページを参照下さい。
Using the I2C Interface – Raspberry Pi Projects
インストール方法
sudo apt install python-smbus
サンプルコード
下記よりダウンロード下さい。
raspi_i2c_keiganmotor
|
|
Warning: Undefined variable $nextpage in /home/keigan/keigan-motor.com/public_html/test.docs/wp-content/themes/emanon-pro-child/content-page.php on line 65
Warning: Attempt to read property "post_title" on null in /home/keigan/keigan-motor.com/public_html/test.docs/wp-content/themes/emanon-pro-child/content-page.php on line 65
|