Arduino: Sensing black and white with a CNY70

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

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

  • @arendelle_ok
    @arendelle_ok 2 месяца назад +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  Месяц назад

      @@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 8 месяцев назад

    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  8 месяцев назад +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.

  • @technochamps4218
    @technochamps4218 Месяц назад +1

    I think your cny70 sensor is fake

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

    Does this sensor work Outdoors under Sunlight?

  • @rolandorobertorivas6464
    @rolandorobertorivas6464 8 месяцев назад

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

    • @Ne10940301
      @Ne10940301  8 месяцев назад

      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.

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

    In which area should we conduct the experiment?

    • @Ne10940301
      @Ne10940301  Месяц назад

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

  • @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 ruclips.net/video/pw_R6xYrjpo/видео.html
      Same logic

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

    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  3 года назад +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  8 месяцев назад

      Duct tape on a piece of white corrugated plastic board.

  • @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.