In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of how to use the Ubuntu i2C testing tool, the content is detailed and easy to understand, the operation is simple and quick, and has a certain reference value. I believe you will gain something after reading this article on how to use the Ubuntu i2C testing tool. Let's take a look at it.
95.1 Migration
Download version 4.1 here, download it and copy it to Ubuntu
Decompress tar-vxf i2c-tools-4.1.tar.gz
Clean up the project, make clean
Import the cross-compilation tool chain environment and fill in the path according to the actual situation: export
CC=/usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
Perform the make compilation and go to the tools directory:
Copy the generated tool "i2cdetect i2cdump i2cget i2cset i2ctransfer" to the / bin/ directory of the development board
Copy the libi2c.so.0.1.1 under the top-level directory lib/ of the source code to the / usr/bin/ directory of the development board and change the name to libi2c.so.0
Mv libi2c.so.0.1.1 libi2c.so.0
It was successfully transplanted here.
95.2 Test
View mounted i2C devices: i2cdetect-l
Check the device on the i2C bus: i2cdetect-y. For example, enter i2cdetect-y 0MaginUU to indicate that the system has loaded this setting.
Standby, if it is numeric, it means that it is not loaded in driver. The figure shows that 0x1Ere0x500x68 has been loaded, corresponding to mpu6050
At24c02,ap3216c .
Read all register values of i2c devices: i2cdump-f-y, i2cdump-f-y 00x50, 0 is the i2C bus number
0x50 is the address value of AT24C02
The test results are shown in figure 95.2.4:
Write data to the register: i2cset-f-y
For example: i2cset-f-y 0 0x50 0x00 0x22
Write multiple data: i2ctransfer-f-y w@
I2ctransfer-f-y 0 w3@0x50 0x00 0x0a 0x0b
This is the end of the article on "how to use the Ubuntu i2C testing tool". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to use Ubuntu i2C testing tools". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.