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

How to install this library to Raspberry ? #9

Closed
ugrdursun opened this issue Oct 19, 2021 · 1 comment
Closed

How to install this library to Raspberry ? #9

ugrdursun opened this issue Oct 19, 2021 · 1 comment

Comments

@ugrdursun
Copy link

ugrdursun commented Oct 19, 2021

Hello, I bought the product but could not understand how to install this library and use it with raspi & phyton ??

, first download the library to Raspberry Pi, then open the routines folder. To execute one routine, demox.py, type python demox.py on the command line. To execute the get_gyro_accel_temp_data.py routine, for example, you need to type:

I dont think this is a rich explanation, Where is routines folder ?

from DFRobot_SHT3X import *
SHT3X =  DFRobot_SHT3x(iic_addr = 0x45,bus = 1)

above is from example but of course I cant import library because i could not install it. Plus, I dont know how wiring should be ...

Any support ?

Thanks

@pleasetakeup
Copy link
Member

pleasetakeup commented Mar 18, 2022

Sorry for the late reply

  1. Enable the I2C device of Raspberry Pi first, otherwise, I2C may fail to communicate normally.

  2. Download the library from git, and execute the command in the terminal: git clone https://github.com/DFRobot/DFRobot_SHT3x, then download the library to Raspberry Pi

  3. Execute the command in the terminal: cd DFRobot_SHT3x/python/raspberrypi/example/, select one of the three demos in it to execute such as python single_measurement.py
    1

  4. The code uses I2C1, so you have to connect the module's SDA and SCL to SDA.1 and SCL.1 of Raspberry Pi respectively. Raspberry Pi pinout is as shown below:
    2

@fary99 fary99 closed this as completed Mar 6, 2023
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

3 participants