How to use Sharp IR Distance Sensor with Arduino (download code)

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 162

  • @robertlongoria765
    @robertlongoria765 6 лет назад +2

    Excellent..I liked how you described the code and the demo was very clear.

    • @robojax
      @robojax  6 лет назад

      Thank you. I am glad you liked it.

  • @TheArtificer_
    @TheArtificer_ 4 месяца назад

    Tu as sauvé notre projet de SI !

  • @GolfSwingPlaneCoach
    @GolfSwingPlaneCoach 3 года назад +1

    Could this be used with a buzzer for just object detection?

  • @ethan073
    @ethan073 5 лет назад +1

    Thank you for the video. Clear, logical, concise and thorough!

    • @robojax
      @robojax  5 лет назад

      You are welcome.

  • @esmadejacinthvana.3185
    @esmadejacinthvana.3185 9 месяцев назад

    Hey uhmmm how about the connections? base on your code you didn't assigned any pin or analog pin for your signal in IR distance, why?

    • @robojax
      @robojax  9 месяцев назад

      it uses A0. you can watch this video ruclips.net/video/rdNCIyL6OA8/видео.html

  • @mr.anonymous8410
    @mr.anonymous8410 2 года назад +1

    Hi what is the field of view that SHARP GP2Y0A710K0F can cover

    • @robojax
      @robojax  2 года назад

      Hi, the datasheet is provided in the resources page. Please have look.

  • @threeelancer
    @threeelancer 4 года назад +1

    Thanks. Nice breakdown of these IR sensors.

    • @robojax
      @robojax  4 года назад

      Glad it was helpful!

    • @threeelancer
      @threeelancer 3 года назад

      @@robojax Actually, I purchased the GP2Y0A21YK0F (10 to 80 cm) and have it running on a 5V Arduino at about 4.5V. I ran a basic distance program that includes the Sharp library (2.0) and I can't get any data input to the Arduino over 30cm. It the floats at 16mm in the Serial Monitor when no object is present. When an object is present, I only get readings between 9cm and 23cm reliably. I rarely get 30mm. I never see 80cm lol. I read the data sheet, and I see that the output signal is non-linear and its voltage will drop the further out an object is, but I expected to least see the 80cm once in a while.
      Any idea where you might start to help boost the performance of the 20cm-80cm range of this model?
      Things I've tried:
      1. Different sensors of same model (same result)
      2. 100 µF capacitor (seems to smooth output but does not increase performance)
      3. Long object obstruction times (the 80cm never shows its face :)
      Happy holidays! And thanks for any tips!
      Narci

  • @mizraimalvarado6212
    @mizraimalvarado6212 4 года назад

    Thank you Robojax, this video was very helpful to me, excellent job.

    • @robojax
      @robojax  4 года назад +1

      You are welcome. Thank you for not skipping the ads and keep watching them. This will help me a lot.

  • @Diggnuts
    @Diggnuts 3 года назад

    Do you have an idea how directional these sensors are? And would using multiple sensors interfere?

  • @naveenearth2243
    @naveenearth2243 3 года назад

    SIR,This library is not working for 2-15cm ir sensor.

    • @robojax
      @robojax  3 года назад

      Search my channel. And I have it

  • @gurayyavuz3851
    @gurayyavuz3851 3 года назад

    Sir, these sensor read cm but I searching mm and resolution should be 1 mm and the sensor should be repeatable. No fluctuation. What sensor I should choose ?

    • @robojax
      @robojax  3 года назад

      Then use laser. ruclips.net/video/S2jaAQEv3Yo/видео.html

  • @cristiantascon2093
    @cristiantascon2093 5 месяцев назад

    Excelent video! Thanks for show it, but i have a problem, idk if you know to solve that:
    'class SharpIR' has no member named 'distance'

  • @piyushpalsania2752
    @piyushpalsania2752 3 года назад +1

    Thank you Sir for the Help

    • @robojax
      @robojax  3 года назад +1

      You are welcome

  • @junior214223
    @junior214223 5 лет назад

    Hi,
    when you plug in the numbers from the data sheet into xcel. what do you do with that equation?

    • @robojax
      @robojax  5 лет назад

      Hi, this video is to get the value and take action. I did not understand why use excel.

  • @kumarjha1729
    @kumarjha1729 3 года назад

    Can you please explain why I am getting 74 as continuous reading using GP2Y0A41SK0F, when I am putting it towards Ground. Distance between sensor and ground is around 10 cm.

    • @robojax
      @robojax  3 года назад

      perhaps that is the maximum range and Arduino is not reading anything and you get maximum. check wiring. use multimeter to read voltage that goes to Arduino.

  • @DeclanFutterer
    @DeclanFutterer 5 лет назад +1

    Thanks for the tutorial. Very helpful. I am using a GP2Y0A60SZLF Sharp Distance Sensor 10-150cm which has GND VCC EN and OUT. The code provided mentions connecting the signal pin to A0. Is the signal pin EN or OUT? Should I only use one of those pins or both? Right now the code uploads but the serial monitor is only reading 0cm nothing else.

    • @robojax
      @robojax  5 лет назад

      You are welcome. I have left nothing out. You should find the answer in video. If your module has 3 wires, this is the video for you.

  • @dedub222
    @dedub222 3 года назад

    Do you think that sensor would work off water if tilted down? Basically to measure the level of a small water container.

    • @robojax
      @robojax  3 года назад

      I have not tested it. This module operates with infrared. it should reflect if water is still. not sure about it.

  • @sarwarn2107
    @sarwarn2107 5 лет назад

    Do you know if it is possible to use this sensor with a software like opentrack to simulate head movement in 3D environment like Z axis?

    • @robojax
      @robojax  4 года назад

      Hi, I just discovered your comment without reply. This is new feature of RUclips for creators. Sorry.

  • @NatamongkolTR
    @NatamongkolTR 2 года назад

    It Error 'class SharpIR' has no member named 'distance'. What do I need to fix?

    • @NatamongkolTR
      @NatamongkolTR 2 года назад

      I have successfully installed the library.

    • @robojax
      @robojax  2 года назад

      It should work. Here is the latest video with wiring diagram ruclips.net/video/4f0UD8O768I/видео.html

    • @NatamongkolTR
      @NatamongkolTR 2 года назад

      @@robojax I tried and did it again but still stuck with this problem. I don't know how to solve this Error, I used the code from your video.

  • @426trickyrick
    @426trickyrick 3 года назад

    Can I use the sensor behind glass? Need to protect it. Want to measure level in black water tank. Thanks

    • @robojax
      @robojax  3 года назад

      Unfortunately I have not tested it. why not test it and ten type your comment here so everyone know if it works or not. I have seen this question more than 20 times now. Thanks

  • @brkakcn8481
    @brkakcn8481 3 года назад

    Can ı work this sensor with esp32 microcontroller? Esp32 3.3 v this sensor 5v

    • @robojax
      @robojax  3 года назад

      perhaps after watching this video you've learned that we are simply measuring voltage which is representative of distance. I should have video using ESP32 on how to measure voltage or potentiometer voltage just search my channel. Here is how to find Specific RUclips Video in a channel bit.ly/findRUclipsVideo

  • @kirannb5354
    @kirannb5354 5 лет назад +1

    Sir, whenever there is any object detected, I want to make an Out Put ON. How to code for that.

    • @robojax
      @robojax  5 лет назад

      There is a variable called "dis" which holds the distance, for example if distance is less than 50cm, you turn on something connected to pin 5 do it like this
      if(dis

    • @kirannb5354
      @kirannb5354 5 лет назад

      If connected sensors quantity is increased, variable values are decreasing. Is there any solution for this...?

    • @kirannb5354
      @kirannb5354 5 лет назад

      I have combined the out put of 10 sensors, and connected it to A0.

    • @kirannb5354
      @kirannb5354 5 лет назад

      And my application is a two direction moving vehicle. If the obstacles comes neer to sensors the speed of motor should be gradually decrease.

    • @kirannb5354
      @kirannb5354 5 лет назад

      Can you make a sample program for motor speed control according to the Variable "dis" values....?

  • @jasontong5343
    @jasontong5343 2 года назад

    Hi Sir, may I ask how do I get the distance in 2 decimal value ? I would like to get more accurate result such as 10.05cm or 10.54cm instead of 10cm. Could please help me , thank you very much.

    • @robojax
      @robojax  2 года назад

      Hi, use this laser sensor with resolution of 2mm ruclips.net/video/0GxFoq_zPt4/видео.html but the sharp sensor can’t do what you want.

  • @kirannb5354
    @kirannb5354 5 лет назад

    Hi sir. I am controlling a DC motor with infineon motor control shield BTN8982. The sharp sensor output is connected to A8 because up to A5 shield is covered. But at A8 there is a error. Like 'A8' was not declared in this scope. Why...?

    • @kirannb5354
      @kirannb5354 5 лет назад

      Yes. I got it. I forget to change processor from ardiuno uno to mega. Coz uno don't have A8 pin.

    • @robojax
      @robojax  5 лет назад

      Good to hear that Kiran. Don't forget to subscribe.

  • @metronom_81
    @metronom_81 4 года назад

    is it working fast ? I mean if I move it fast down and up would it send me distance chances during movements?

    • @robojax
      @robojax  4 года назад

      The speed is determined by the delay in the loop. Change (little by little) it and make it smaller (faster) and see at minimum delay you are able to read.

  • @shabanabasharat2895
    @shabanabasharat2895 2 года назад

    @Robojax hi, please guide me how to deploy the code on arduino as after i am not getting how to run sharp IR (CPP and H ) files and the file that you are showing is not in that folder that I have downloaded . kindly guide me

    • @robojax
      @robojax  2 года назад

      Hi, sorry just check it and library is there.

  • @NEWNAME666
    @NEWNAME666 Год назад

    @Robojax Do you know what is the beaming angle of that IR?

    • @robojax
      @robojax  Год назад

      The datasheet is provided in the resource page. Please have a look at that.

  • @Javii96
    @Javii96 5 лет назад +1

    Hello, I am considering using either this, or a PIR motion sensor for my project.
    I have 3 main questions for you at the bottom of my comment.
    For my project I will be detecting my cat when she gets on my window sill to eat my plants. I want to trigger a buzzer to scare her off. The reason why I don't want to do a Motion sensor is because if the cat climes up on the window, she will move very slow and I worry that it will not trigger. I would rather be able to control the trigger in my code. If I do this distance sensor, I plan to keep a rolling average of the voltage so that it can trigger if there are quick sudden changes. I do not need a wide angle. preferably a very small angle of detection like 12 degrees and the distance will be less than 2 feet. I have good coding and Arduino skills but I haven't used either of these sensors before.
    1) Does this sensor only detect a small field of view straight ahead? (I prefer if it does)
    2) Does this sensor require a flat surface, and how large does it have to be?
    3) Do you recommend choosing the Motion PIR or this distance sensor?
    Thank you very much for the video!

    • @robojax
      @robojax  5 лет назад

      Hello Xavier, 1-This detects small field of view, 2- any surface. doesn't need to be flat(have not tested on glass) 3-For your application this would be better.

    • @Javii96
      @Javii96 5 лет назад

      @@robojax Thank you for taking the time to reply! I will try this out.

    • @williamparedes7155
      @williamparedes7155 5 лет назад

      @@Javii96 Hello, I would like to ask whether it would be possible for you to give the code for my project because i have a similar project like yours and i don't know the code. Can you help me? Thankyou in advance!

    • @williamparedes7155
      @williamparedes7155 5 лет назад

      @@Javii96 Can you send the code to this email?
      @futureengineer17164@gmail.com
      I would be grateful for your reply.

    • @Javii96
      @Javii96 5 лет назад

      @@williamparedes7155 Hello, I would've been happy to share my code, but I still haven't started this project. I've been too busy lately. Sorry, but this video actually shows some sample code and how to get started if you fast forward to about 5:10. What part of the project are you having trouble with?

  • @CaioXG002
    @CaioXG002 5 лет назад

    Stupid question: how do I actually connect the sensor to the Arduino? Like, I have all the necessary hardwares, a sensor, a trio of cables that can extended it and an Arduino Mega 2560, which has a _lot_ of ports and I don't think I understand which cable goes on which port...

    • @robojax
      @robojax  5 лет назад

      no problem. I just watched the video and found that I have explained it at about 4:15 and in the code it is mentioned also as "signal pin"

  • @Motivation-w9x
    @Motivation-w9x 5 лет назад +1

    Thank you very much for the tutorial. I would like to know if it is possible to have the values of the distance in mm

    • @robojax
      @robojax  5 лет назад

      You are welcome. Very simple. the word "dis" is holding the distance. below this line int dis=SharpIR.distance(); and change it to
      int dis=SharpIR.distance() * 10;
      Now distance is multiplied by 10 to show in millimeter .

    • @Motivation-w9x
      @Motivation-w9x 5 лет назад

      @@robojax I did it and I noticed that he only multiplied by 10 without taking into account the number he could have after. I use a digital sensor GP2Y0D805Z0F

  • @snake2673
    @snake2673 4 года назад

    very good job sir ! impressing !

  • @kirannb5354
    @kirannb5354 5 лет назад

    Is it possible to connect more then one sensors to a one ardiuno..?

    • @robojax
      @robojax  5 лет назад

      I just added the link in the description on how to use 2 or more of this sensor. You could also just search my channel for the word "sharp" and you would see that I move than 4 videos on this .

  • @anoopjoseph8210
    @anoopjoseph8210 5 лет назад

    @Robojax This code doesn't work for some reason. I don't have much experience with Arduino but I don't know why it's not working

    • @robojax
      @robojax  5 лет назад +1

      This code is the simplest and unless you did incorrect wiring or changed the code, it should work. Try checking the wiring and do not change the code. Watch the video without escaping. It should work. You should get some kind of error. In the bottom window of arduino, scroll up and you will see error. Post the error under this video and I will check it for you.

    • @anoopjoseph8210
      @anoopjoseph8210 5 лет назад

      @@robojax The code worked, it was a small issue. I wanted to ask you what would happen if I use the serial plotter for this? Is there any way I could get the voltage as the output?

  • @arjunasivalingam8979
    @arjunasivalingam8979 6 лет назад +1

    can you use this sensor to prevent a robot from falling down the stairs?

    • @robojax
      @robojax  6 лет назад

      it depends how fast the robot it moving. If it is slow enough and if you install is high enough and point it down on the front of robot, it should detect end of flat surface and program your robot to take action like stop or change the course of movement.

    • @sentrion4420
      @sentrion4420 6 лет назад

      Ty very much for your quick response, I need that information for my project.

  • @tehKaito23
    @tehKaito23 4 года назад

    thank you :) worked for me

    • @robojax
      @robojax  4 года назад

      You are welcome. You haven't subscribed to my channel. The best thank you for me is to subscribe to my channel and thumb up the video. It is greatly appreciated. 🔔 😊

  • @dchavez2517
    @dchavez2517 2 года назад

    Writing to see if anyone has performed any tests with reflective adhesive tape for objects that are particularly troublesome for the Sharp IR Distance sensor. Thank You!

  • @kitkirkyen2002
    @kitkirkyen2002 2 года назад

    Sir, will this sensor operates normally when exposed to sunlight? Thank you

  • @alexandermarinov9435
    @alexandermarinov9435 3 года назад

    U r d bst!

  • @xperiencetechnologies1923
    @xperiencetechnologies1923 5 лет назад

    Excellent, does this library use delay? I mean would SharpIR.distance() function cause a delay on the code?

    • @robojax
      @robojax  5 лет назад

      I have not tested but you can use millis() to check it. I have a video on millis ruclips.net/user/robojaxTVsearch?query=millis

  • @kevinherring4631
    @kevinherring4631 4 года назад

    Thank you for this, however I think the 2-15cm sensor is missing. I have checked the library and it isn't defined there.

    • @robojax
      @robojax  4 года назад

      You are welcome. You are right. I just looked at library and it doesn't have it. I just placed order to get it and make tutorial on that. It needs to be tested and data to be created. Make sure to subscribe so when I post the video, you are notified.

    • @robojax
      @robojax  4 года назад

      Hi, I have recorded video for the 2-15cm sensor and It will be posted in 3 hours from now ruclips.net/video/rdNCIyL6OA8/видео.html more videos related to this module is coming.

  • @fantasty9999
    @fantasty9999 6 лет назад

    Hi Robojax, I'm using this sensor to measure the displacement of an object and I want to record all the data so I can use them for analysis later. Could you please give me some method that I can record the data from this measurement ? Thanks a lot

    • @robojax
      @robojax  6 лет назад +1

      Hi, You can do it in many ways. The simplest method would be to store the data using MicroSD card module. You store the data on microSD card and later read it with your computer. Here is MicroSD card www.amazon.ca/dp/B0793H4GPC

    • @fantasty9999
      @fantasty9999 6 лет назад

      Oh, maybe you misunderstood :-). I mean that how to record all the data of the experiment so that I can use them for later process. One more thing, do you know how to measure with the accuracy of 1mm. Thank you very much.

  • @quickarduinoprojects9034
    @quickarduinoprojects9034 4 года назад

    Hi your video was excellent please could you tell me in words where each pin from the sharp sensor goes in the Arduino Uno Board

    • @robojax
      @robojax  4 года назад

      I just watched the video. Wow, the wiring portion is left out. Here is see it in this video ruclips.net/video/WQ3oFyF5qeY/видео.html

  • @samuelmanurung6573
    @samuelmanurung6573 5 лет назад

    When the sensor has slope more than 45° of its object, for example 50,60°, is it works well? , and how many degree maximum the slope angle of that sensor?
    i'm sory i ask you a lot of questions, cause the price is very expensive here, so i've to know more about it before i buy it.
    Thank You

    • @robojax
      @robojax  5 лет назад

      No problem. I will do my best to reply. I don't have the circuit in hand to test it but it should work. I have provided the manufacturer website with the datasheet. Here www.sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y0a02yk_e.pdf it doesn't say anything about the angle and it should work.

    • @samuelmanurung6573
      @samuelmanurung6573 5 лет назад

      @@robojax Thank you

  • @harjunonurakbar8724
    @harjunonurakbar8724 4 года назад

    Could u tell me how can u insert the curve from the datasheet into excel?

    • @robojax
      @robojax  4 года назад

      the curve is not pure curve. it you open the library, they have equation of the line from curve. The library is made from experiment into excel sheet and then from excel equation of the line and that equation is inside library. Just open it in notepad or NotePad ++ and read it.

    • @harjunonurakbar8724
      @harjunonurakbar8724 4 года назад

      i see, thank you for the answer, i think i'm gonna make my own equation from my own experiment👍

    • @robojax
      @robojax  4 года назад

      you are welcome and good luck.

  • @ayrtontv6025
    @ayrtontv6025 2 года назад

    How do you wire it though?

    • @robojax
      @robojax  2 года назад

      Hi, please watch the latest video here ruclips.net/video/4f0UD8O768I/видео.html

  • @noorfaisal7632
    @noorfaisal7632 4 года назад

    class SharpIR' has no member named 'distance'; did you mean 'getDistance'?
    Hey there I struk with the above error!!!!

    • @robojax
      @robojax  4 года назад

      You have escaped the video. Have not installed the library. Please watch without escaping, follow exactly as I shown and it for sure will work. Good luck.

    • @noorfaisal7632
      @noorfaisal7632 4 года назад

      @@robojaxsorry to say this I have installed the library as well

  • @febindsam2089
    @febindsam2089 2 года назад

    Does this sensor Work in Sunlight?

    • @robojax
      @robojax  2 года назад

      yes it should. I have not tested the affect of sunlight though.

  • @ngkean9743
    @ngkean9743 2 года назад

    Can someone share the code since it does not work from the link?

    • @robojax
      @robojax  2 года назад

      Thank you for letting me know. I just fixed it. you can visit it now.

    • @ngkean9743
      @ngkean9743 2 года назад

      @@robojax thank you.

  • @iekleine2758
    @iekleine2758 4 года назад +1

    Hi, thanks for this tutorial! But when I set it with the same steps, the output distance is always not stable, there's approximately 5 cm discrepancy... what can I do for that? :O

    • @robojax
      @robojax  4 года назад

      It depends on the surface. I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊
      Please like 👍 the video and type simple word in the comment. It helps me a lot.

  • @roboopcbilgisayarveelektro4034
    @roboopcbilgisayarveelektro4034 3 года назад

    Bu vdieoyu hazırladığınız için çok teşekkür ederim, emeklerinize sağlık..Sharp Gp2y0a710 mesafe sensörünün arduino bağlantısıya ilgili de video çekermisiniz.. Thank you so much for this tutorial video.. can you share a new video for about Sharp Gp2y0a710 ultrasonic sensor with arduino? Selam from turkey

  • @memories6615
    @memories6615 5 лет назад

    Is there one that detects from 1 to 30 cm.

    • @robojax
      @robojax  5 лет назад

      It has been explained and if you visit the page where the code is provided, I have list of specs and pdf of the datasheet.

  • @fantasty9999
    @fantasty9999 6 лет назад

    Hi Robojax, the code you provided ran quite well. However I don't know why the distance is 1cm shorter than actual distance. And could you please show me more in detail how to implement it because I need it for my system identification with accuracy of 1mm. Thanks

    • @robojax
      @robojax  6 лет назад +1

      if you see consistent 1cm difference, then subtract it . After this line int dis=SharpIR.distance();
      dis -=1;
      this will correct it.
      But if you get various differences, then there is issue with the sensor.

    • @fantasty9999
      @fantasty9999 6 лет назад

      Can I implement it in mm, what I mean is that when I move the object, the distance will change 1mm for the smallest scale because I want to improve the precision. 1cm change is too big for my system. Thanks a lot

    • @robojax
      @robojax  6 лет назад +1

      Yes you can. this line gets the value in mm. int dis=SharpIR.distance();
      change it to int dis= (SharpIR.distance())/10;
      10mm is 1cm, I have divided by 10 (/10) and now you will get in mm. I don't know how accurate it would be in terms of mm.

    • @fantasty9999
      @fantasty9999 6 лет назад

      OK, thank you very much

    • @fantasty9999
      @fantasty9999 6 лет назад

      Well, I met another problem with this sensor. I use Matlab Simulink together with Arduino to implement the experiment. However, I can only get the raw analog value from Arduino and the result is very fluctuate and has lots of noises, I can't read the result even the distance is a constant. Do you have any experience with this kind of problems. Sorry for asking too much. Thank you

  • @gokul.r2019
    @gokul.r2019 5 лет назад

    Can i use this sensor in 3d scanner????plz reply

    • @robojax
      @robojax  5 лет назад

      No you can't because this can't be directed to a point. You need very accurate beam to be directed. VL530LX is laser based distance sensor but it doesn't have red light to tell you where it is hitting. Here are my videos on the laser distance sensor ruclips.net/user/robojaxTVsearch?query=VL53L0X

  • @AldinoPratamaBagaskara
    @AldinoPratamaBagaskara 4 года назад

    why can't it be used on wemos d1?

    • @robojax
      @robojax  4 года назад

      I would have to write library for this. The current library will not work.

    • @AldinoPratamaBagaskara
      @AldinoPratamaBagaskara 4 года назад

      @@robojax Sorry, I do not understand. What do you mean?

  • @mugumehenry5094
    @mugumehenry5094 6 лет назад

    hi ,,,,,,,,,,,,,,,,dis=SharpIR.distance(); brings me an error

    • @robojax
      @robojax  6 лет назад

      Take the screen shot of error and post it on this website onpaste.com/ and then you will have a new URL (address) and share the address here so I look at it.

  • @juanmanueldiflorio845
    @juanmanueldiflorio845 4 года назад

    Hola Buenos Días. Como hago para que el valor sea en centimetros y no en mili segundos? Gracias

    • @robojax
      @robojax  4 года назад

      porque 1 cm es 10 mm, simplemente divídalo entre 10. la variable des mantiene la distancia, así que haga esto debajo de esta línea
      int dis = SharpIR.distance ();
      Agrega esto
      des / = 10;

    • @juanmanueldiflorio845
      @juanmanueldiflorio845 4 года назад

      @@robojax Ahhh buenisimo! Muchisimas Gracias! Saludos desde Argentina

    • @robojax
      @robojax  4 года назад

      De nada. Saludos desde Canadá. Mantenerse a salvo.

    • @juanmanueldiflorio845
      @juanmanueldiflorio845 4 года назад

      @@robojax Hola Perdón por la molestia de nuevo jaja... Me dice que tengo que definir la variable des... Como la defino? Gracias

  • @kennethfajardo5121
    @kennethfajardo5121 Год назад

    Is it for cm only Sir?

    • @robojax
      @robojax  Год назад

      yes and if you want it in mm then divide it by 10. if you want it in inch multiply it by 0.393701

    • @kennethfajardo5121
      @kennethfajardo5121 Год назад

      @@robojax owww okokokok Sir thankyou. Can it have a value of (.) something or it just get whole numbers of cm units?

    • @robojax
      @robojax  Год назад

      this sensor can't give you mm accuracy. so you get cm. The decimal point (.) depends on Data Type. See this video to learn Data Type ruclips.net/video/n0z6fjww8eA/видео.html and here is the better video on Sharp which is form my Arduino course ruclips.net/video/4f0UD8O768I/видео.html

    • @kennethfajardo5121
      @kennethfajardo5121 Год назад

      @@robojax okokok thank you Sir

    • @kennethfajardo5121
      @kennethfajardo5121 Год назад

      @@robojax hello Sir I have another question do you have youtube video about ultrasonic sensors? im trying to find ultrasonic sensor for accurate mm units because i think its more cheaper

  • @davidsantiagogalvan3795
    @davidsantiagogalvan3795 2 года назад

    Thank you Robojax, but I have a question, how can I have the results in centimeters?

    • @robojax
      @robojax  2 года назад

      If it is millilitres just divide it by 10. Arduino can do that easily

  • @mathildevignon4877
    @mathildevignon4877 5 лет назад

    Des STI2D SIN en projet ?

    • @robojax
      @robojax  5 лет назад

      Désolé je n'ai pas compris

    • @mathildevignon4877
      @mathildevignon4877 5 лет назад

      @@robojax In France, at school, we have to do a big project in informatic/programmation (for the levels) ^^ STI2D is the name of this procedure
      So, thank you so much for this video ! You help me so much !

  • @zhuk462
    @zhuk462 4 года назад

    too many words, too complex tutorial. this is a simple analog sensor. You no need any library to read it and calculate the distance.

    • @robojax
      @robojax  4 года назад +1

      wrong. I've made such videos. We have to explain everything. of course you are welcome to skip and get the code. Good luck.

  • @jameselliott9397
    @jameselliott9397 6 лет назад

    I need to find someone to help me do this in code..
    //Arduino uno
    //300mm precision sensors
    // distance sensor1 value 181 to 270 degrees
    //distance sensor2 value 179 to 90 degrees
    //1 stepper Nemo 17 or 23
    //Stepper full rotation 0-359 steps (clock wise count 0 north)
    //Home 180
    //if sensor1 value oscillates
    //set sensor1 to highvalue of oscillation
    //(when direction changes.
    Oscillation at 172-173-172 would set value at 173
    // if sensor2 lowalue is = or =170
    // run stepper to 190
    // if sensor2 lowalue is = or =160
    // run stepper to 200
    // if sensor2 lowalue is or =150
    // run stepper to 210
    // if sensor2 lowalue is or =140
    // run stepper to 220
    // if sensor2 lowalue is or =130
    // run stepper to 230
    // if sensor2 lowalue is or =120
    // run stepper to 240
    // if sensor2 lowalue is or =110
    // run stepper to 250
    // if sensor2 lowalue is or =100
    // run stepper to 260
    // if sensor2 lowalue is 181, < or =190
    // run stepper to 170
    // if sensor1 highvalue is >191, < or =200
    // run stepper to 160
    // if sensor1 highvalue is >201, < or =210
    // run stepper to 150
    // if sensor1 highvalue is >211, < or =220
    // run stepper to 140
    // if sensor1 highvalue is >221, < or =230
    // run stepper to 130
    // if sensor1 highvalue is >231, < or =240
    // run stepper to 120
    // if sensor1 highvalue is >241, < or =250
    // run stepper to 110
    // if sensor1 highvalue is >251, < or =260
    // run stepper to 100
    // if sensor1 highvalue is >261
    // run stepper to 90

    • @robojax
      @robojax  4 года назад

      Hi, I just discovered your comment without reply. This is new feature of RUclips for creators. Sorry.

  • @guvenmertozdemir2993
    @guvenmertozdemir2993 5 лет назад

    he is speaking wakanda accent

  • @mx310tuda7
    @mx310tuda7 3 года назад

    POORLY explained.

    • @robojax
      @robojax  3 года назад

      Thank you.

    • @robojax
      @robojax  3 года назад

      Please watch the latest video ruclips.net/video/rdNCIyL6OA8/видео.html