Clyde R. Schrank

Problem with smbus on NanoPi

Recommended Posts



i was trying to connect sensors via i2c, and neither wiringPi.h nor i2c-dev.h are comiting Read/Write comands.
The file descriptor is given a value, so i think the connection worked, but functions like : i2c_smbus_read_byte_data(FILEDESCRIPTOR, (u_int8_t)REGISTERADRESS) just pop errors.
Do you guys have any idea?

Thanks for any help!



i have also included /linux/i2c.h and the function error persists.

"I2C_SMBUS_READ_BYTE_DATA was not declared in this scope"

Share this post

Link to post
Share on other sites
On 10/26/2019 at 9:04 PM, Clyde R. Schrank said:

Do you guys have any idea?


I can only assure you that I2C works. If you enable it in the armbian-config -> hardware.

I use it. But software you are trying to use (wiringpi) has nothing to do with Armbian. But I read around people use it on Armbian so its possible, but perhaps you need to adjust some things ...

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.