Open main menu

Wiki-Orange Pi β

Changes

Orange Pi Zero 3

125 bytes added, 10:53, 12 July 2023
26pin I2C test method
<ol style="list-style-type: decimal;">
<li><p>The i2c3 in 26pin is enabled by default in Android, and the corresponding device node is '''/dev/i2c-3'''</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>apollo-p2:/ # '''ls /dev/i2c-3'''</p>
<p>/dev/i2c-3</p>|}</li>
<li><p>First open the wiringOP APP on the desktop</p>
<p>[[File:media/image360.png|576x133px]]</p></li>
<li><p>Then click the '''I2C_TEST''' button to open the i2c test interface</p>
<p>[[File:media/image381.png|506x110px]]</p></li>
<li><p>The i2c test interface of wiringOP is shown in the figure below. You can see that the default i2c is '''/dev/i2c-3''', so we don’t don't need to re-select</p></li></ol>
[[File:media/image382.png|353x159px]]
</ol>
<ol start="5" style="list-style-type: decimal;">
<li><p>Then connect an i2c device to the 26pin i2c3 pin, here we take the ds1307 rtc module as an example</p>
<p>[[File:media/image186.png|121x103px]]</p></li></ol>
{| class="wikitable" style="width:800px;"
|-
| style="text-align: left;"| '''Pins of the RTC module'''
| style="text-align: left;"| '''pin 5'''
|}
</ol>
<ol start="6" style="list-style-type: decimal;">
<li><p>The i2c address of the ds1307 rtc module is 0x68. After connecting the wires, we can use the '''i2cdetect -y 3''' command in the serial port command line to check whether the i2c address of the ds1307 rtc module can be scanned. As shown in the figure below, if you can see the address 0x68, it means that the wiring of the ds1307 rtc module is correct.</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>apollo-p2:/ # '''i2cdetect -y 3'''</p>
|}
<p>[[File:media/image383.png|424x186px]]</p></li>
<li><p>Then set the address of i2c to 0x68 in wiringOP, and then click the '''OPEN''' button to open i2c3</p>