ShellAlbert / GunSight

GNU General Public License v3.0
2 stars 1 forks source link

jy901 debug related #2

Open ShellAlbert opened 5 years ago

ShellAlbert commented 5 years ago

Connect jy901b SCL/SDA to NanoPC T4 R196(I2C7_SCL_HDMI) , R199(I2C7_SDA_HDMI) Donot connect HDMI screen while using jy901b. HDMI and jy901b has the same address 0x50.

ShellAlbert commented 5 years ago

$ sudo i2cdetect -l i2c-0 i2c rk3x-i2c I2C adapter i2c-1 i2c rk3x-i2c I2C adapter i2c-2 i2c rk3x-i2c I2C adapter i2c-4 i2c rk3x-i2c I2C adapter i2c-7 i2c rk3x-i2c I2C adapter i2c-9 i2c DP-AUX I2C adapter

ShellAlbert commented 5 years ago

plug HDMI screen in,we got following result: $ sudo i2cdetect -r -y 7 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- 37 -- -- 3a -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

ShellAlbert commented 5 years ago

connect jy901b to i2c7 without HDMI screen,we got following result: $ sudo i2cdetect -r -y 7 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

it means HDMI and jy901 have the same i2c address 0x50,so unplug HDMI screen while we're using jy901b.

ShellAlbert commented 5 years ago

$ sudo i2cget Usage: i2cget [-f] [-y] I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]] I2CBUS is an integer or an I2C bus name ADDRESS is an integer (0x03 - 0x77) MODE is one of: b (read byte data, default) w (read word data) c (write byte/read byte) Append p for SMBus PEC wh@WuHuanTech:~$ sudo i2cget -f -y 7 0x50 0x1a w 0x0050 $ sudo i2cget -f -y 7 0x50 0x04 w 0x0002

ShellAlbert commented 5 years ago

$ sudo i2cset -f -y 7 0x50 0x0f 0x0002 w //set D1 to high. $ sudo i2cset -f -y 7 0x50 0x0f 0x0000 w //set D1 to low.

ShellAlbert commented 5 years ago

Connect jy901b SCL/SDA to NanoPC T4 R196(I2C7_SCL_HDMI) , R199(I2C7_SDA_HDMI) Donot connect HDMI screen while using jy901b. HDMI and jy901b has the same address 0x50.

aarch64-linux-g++ jy901b.cpp -o jy901b.bin

ShellAlbert commented 5 years ago

......Ax:fbb5(b5fb),Ay:fec4(c4fe),Az:655(5506) Ax:222.93,Ay:241.32,Az:104.15 ......Gx:0(0),Gy:0(0),Gz:0(0) Gx:0.00,Gy:0.00,Gz:0.00 ......roll:f824(24f8),pitch:17ee(ee17),yaw:1744(4417) Roll:51.99,Pitch:334.81,Yaw:95.75 ......Hx:fe72(72fe),Hy:0(0),Hz:308(803) Hx:294.38,Hy:0.00,Hz:20.51 Pressure:16800658 (pa)