Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C Read Request behavior #11

Open
cbr600fsgth opened this issue Mar 19, 2016 · 0 comments
Open

I2C Read Request behavior #11

cbr600fsgth opened this issue Mar 19, 2016 · 0 comments

Comments

@cbr600fsgth
Copy link

Board:Raspberry Pi Model B
OS:Raspbian Jessie

Hi,
I tried reading data from ADXL345, but it's not successful.
Node setting below is to read DEVICE ID from the chip and it should output "229" in decimal, "0xE5" in hex.
But it outputs always 0.
Could you help me out?


Debug output:
2016/3/19 23:58:14I2C Value
msg.payload : array [1]
[ 0 ] <- This should be "229"


Using i2ctools, it is successful.

pi@raspberrypi:~ $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- 53 -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
pi@raspberrypi:~ $ i2cget -y 1 0x53 0x00 b
0xe5
pi@raspberrypi:~ $


Node setting:
[{"id":"d8bc70ea.27439","type":"nodebot","z":"62ce1900.9d31e8","name":"Accl","username":"","password":"","boardType":"raspi-io","serialportName":"","connectionType":"local","mqttServer":"","socketServer":"","pubTopic":"","subTopic":"","tcpHost":"","tcpPort":"","sparkId":"","sparkToken":"","beanId":"","impId":"","meshbluServer":"https://meshblu.octoblu.com","uuid":"","token":"","sendUuid":""},{"id":"dec004bf.213ff8","type":"gpio out","z":"62ce1900.9d31e8","name":"I2C Read","state":"I2C_READ_REQUEST","pin":"","i2cDelay":"0","i2cAddress":"83","i2cRegister":"0","outputs":1,"board":"d8bc70ea.27439","x":330,"y":620,"wires":[["a49144f0.5b6eb8"]]},{"id":"daafd17a.25503","type":"inject","z":"62ce1900.9d31e8","name":"1 Byte","topic":"","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"x":130,"y":620,"wires":[["dec004bf.213ff8"]]},{"id":"a49144f0.5b6eb8","type":"debug","z":"62ce1900.9d31e8","name":"I2C Value","active":true,"console":"false","complete":"payload","x":510,"y":620,"wires":[]}]


adxl345_register

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant