![]() I2cdetect -y 1 # Rev 2 Functions available Just remember that on a Rev 1 Raspberry pi it’s device 0, and on a Rev. You can still use the standard system commands to check the I2C devices, and I recommend you do so – e.g. Programs need to be linked with -lwiringPi as usual. To use the I2C library, you need to: #include ![]() If you need a baud rate other than the default 100Kbps, then you can supply this on the command-line: gpio load i2c 400 Under Raspbian: sudo apt-get install libi2c-devīefore you can use the I2C, you need to load the kernel modules and you can use the gpio utility to load the I2C drivers into the kernel: gpio load i2c You need to install the I2C development libraries and re-build. If you are using these helper functions and you get link errors, it means that wiringPi is not installed with the I2C helper functions. Not all systems have the I2C development libraries and headers installed, and when you build wiringPi, it detects this at build time. WiringPi includes a library which can make it easier to use the Raspberry Pi’s on-board I2C interface.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |