Coder Social home page Coder Social logo

tof10120's Introduction

TOF10120

TOF10120 is a Time-of-Flight ranging Sensor.

TOF10120 range sensor provides accurate and repeatable long range distance measurement for high-speed autofocus (AF). The innovative time-of-flight technology allows performance independent of object reflectance.

pins

  • software serial #1: RX = digital pin 10, TX = digital pin 11
  • software serial #2: RX = digital pin 8, TX = digital pin 9

datasheet

TOF10120.pdf TOF10120.jpg

tof10120's People

Contributors

soym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tof10120's Issues

Help

Hello, do you have any wiring diagram, mine has RX TX then SDA SCL, how to wire it with Arduino?

tof10120 code issue

when i try to run this code in my Rpi the sensor can't give me reads every time sometimes move to except what can i do to fix the code?
and sorry for the code itried to put it in code tag but it still appear like this
code:

`import smbus
import time

i2c_ch = 1
i2c_address = 0x52

bus = smbus. SMBus ( i2c_ch )

while True :

try :

    bus. write_byte ( i2c_address , 0 )
    time . sleep ( 0.01 )
   
    b1 = bus. read_byte_data ( i2c_address , 0 )
    b2 = bus. read_byte_data (i2c_address , 1 )
           
    word = ( b1 << 8 ) + b2
    print ( word )

    time . sleep ( 1 )

except OSError :
    print ( 'error' )`

best regards
sohil

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.