Arduino: Sensing black and white with a CNY70

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ม.ค. 2025

ความคิดเห็น • 20

  • @arendelle_ok
    @arendelle_ok 6 หลายเดือนก่อน +1

    Can you explain. When sensor reading grayscale gradietn color. Such as Black. Going into gray. And going into white. and vice versa. Look How it does

    • @Ne10940301
      @Ne10940301  5 หลายเดือนก่อน

      @@arendelle_ok it should work as a linear scale...
      0-3 = Black
      3-10= Dark gray
      ...
      >20 = white

  • @shubhamagarwal2548
    @shubhamagarwal2548 4 ปีที่แล้ว +2

    Helpful!

  • @crusher1337
    @crusher1337 ปีที่แล้ว

    Hello, thanks for the video! One question...
    I tried to build the same circuit and run the code but the only value the serial monitor is giving me is 1023 over and over again.
    Do you have an idea how to solve it?

    • @Ne10940301
      @Ne10940301  ปีที่แล้ว +1

      Either the transistor is broken and you need to use a different sensor (if your readings do not change at all no matter the surface in front of the sensor), or you are plugging the sensor (yellow cable) to a digital pin of your Arduino, ensure that you are connecting it to a port with the ~ symbol next to it.

  • @rolandorobertorivas6464
    @rolandorobertorivas6464 ปีที่แล้ว

    hi...can you tell me how you calculate the resistences...please....o in what book can i find?

    • @Ne10940301
      @Ne10940301  ปีที่แล้ว

      forum.arduino.cc/t/how-to-calculate-the-value-of-resistor-to-protect-led-and-arduino-pin/119048/5
      This forum can help you understand better, but if you are not doing something complicated with Arduino, you can always use 220 or 330 Ohms resistors.

  • @rampr4225
    @rampr4225 4 ปีที่แล้ว +1

    Does this sensor work Outdoors under Sunlight?

  • @technochamps4218
    @technochamps4218 6 หลายเดือนก่อน +1

    I think your cny70 sensor is fake

  • @shettyadithcreations1799
    @shettyadithcreations1799 ปีที่แล้ว

    In which area should we conduct the experiment?

    • @Ne10940301
      @Ne10940301  5 หลายเดือนก่อน

      @@shettyadithcreations1799 any flat non-transparent surface should do it

  • @mehdilaroussi1280
    @mehdilaroussi1280 4 ปีที่แล้ว

    Thank you for this Video.
    I made the same circuit and the same code but im having the same value, like many 5 or many 6 in the serial Port. and i tried with different Sensors but nothing happens, im always getting the same value even i put the light on the Sensor it doesnt change anything.
    Do you know maybe what could be the problem?
    Thank you :D

    • @Ne10940301
      @Ne10940301  4 ปีที่แล้ว +1

      Seems like the code and the circuit are not matching.
      Make sure that the sensor is connected to the same port that you declared in the code.

  • @shettyadithcreations1799
    @shettyadithcreations1799 ปีที่แล้ว

    How did you do the track?

    • @Ne10940301
      @Ne10940301  ปีที่แล้ว

      Duct tape on a piece of white corrugated plastic board.

  • @kenago2493
    @kenago2493 5 ปีที่แล้ว

    Hi, i hope you can help me how can i make the code to turn a green led when the detection its white and turn a red led when the detection its black?

    • @Ne10940301
      @Ne10940301  4 ปีที่แล้ว

      Kevin Navarro th-cam.com/video/pw_R6xYrjpo/w-d-xo.html
      Same logic

  • @nadyaslimany9444
    @nadyaslimany9444 4 ปีที่แล้ว

    could you please send me this code

    • @Ne10940301
      @Ne10940301  4 ปีที่แล้ว +1

      NADYA SLIMANY it’s a 7 lines code, copy it as you see it in the video.