Thank you for this video. Very instructive and easy to follow. It definitively helps people like me who are starting with arduino. I tried your code and found that I had to replace the line const sensorPin = 7; with const sensorPin = A7; for the programme to work on my nano board; see video at minute 3.26. Although you mentioned in your video analog pin 7, the code refers to digital pin 7, which made me think that my phototransistor was broken or that I had done something incorrectly in the schematics, since my readings did not make any sense. After I made the change my readings started making sense and I could move to the next step. I hope this can help others who might want to use the code for their projects. Thank you again and keep posting such videos, which I follow very often.
Hi this is awesome and powerful. Just a quick question, what is the distance unit and how the sensor calculates the distance? I'm trying to control the revolution of geared D.C. motor. Thanks a lot
Good evening sir ! can I ask a question ? can I use different board like Gizduino board instead of using arduino nano on these sensor projects ? because me as a student is practically for me to use Gizduino. I have my project on our school performing sensor projects using Gizduino. I hope you understand my situation. Thank you very much sir ! :)
your code says: IF ( we read a value above the threshold value) we toggle the current_color & we increment distance ELSE IF ( we read a value below the threshold value) we toggle the current_color & we increment distance..no sens wrong code because of the wrong braces..there are 2 closed braces before ELSE , you should remove one.
Matt Baker Don't feel bad, feel great. Your comment will help many others from getting confused until we can get things updated. We love getting feedback & thanks for the nice words.
Also, the A7 pin should be on the other side of the photo transistor. That's a big mistake, and that is 2 mistakes on this important circuit, and that makes me wonder. There is so much disinfo out there when it comes to electronic circuilts, and computer code. It is always wrong. Most of it. It is statistically impossible for it to be that way in a real world. Our world is not real at all. But even with the mistakes, intentional or not, it is still a good video in that he tackles the problem we are all trying to solve on the cheap, and there are no really any other videos out there like this one that really lays things out well. One keys is knowing to use an IR LED and a phototransitor and not a regular LED with a photoresistor. ...although that still may work. But not as well, and it would be harder to control the light. An IR LED is a great idea. And it teaches you that you can match the IR LED with the photoresistor. To build the housing for the IR LED and phototransistor will be a bit tricky though.
Thank you for this video. Very instructive and easy to follow. It definitively helps people like me who are starting with arduino.
I tried your code and found that I had to replace the line const sensorPin = 7; with const sensorPin = A7; for the programme to work on my nano board; see video at minute 3.26.
Although you mentioned in your video analog pin 7, the code refers to digital pin 7, which made me think that my phototransistor was broken or that I had done something incorrectly in the schematics, since my readings did not make any sense.
After I made the change my readings started making sense and I could move to the next step. I hope this can help others who might want to use the code for their projects.
Thank you again and keep posting such videos, which I follow very often.
that was a really well made tutorial, good job.
Hi this is awesome and powerful.
Just a quick question, what is the distance unit and how the sensor calculates the distance? I'm trying to control the revolution of geared D.C. motor.
Thanks a lot
Wait so can I made the black and white stripes as small as possible? Did you test how accurate you can make this?
One question please..If I want to make an encoder of 3 bits of resolution, how do I do it?
This thing is good but it has a problem ? or maybe my lack of knowledge ، Can it encode the motor in night or where there isnt good light ?
yes, they are infrared components.
you can watch the video below to get an idea.
ruclips.net/video/XIUrnR8bLAI/видео.html
Good evening sir ! can I ask a question ? can I use different board like Gizduino board instead of using arduino nano on these sensor projects ? because me as a student is practically for me to use Gizduino. I have my project on our school performing sensor projects using Gizduino. I hope you understand my situation. Thank you very much sir ! :)
the color's comment in definition contradicts the one in loop
definition : black=0 , white =1
loop : black=1, white =0
your code says: IF ( we read a value above the threshold value) we toggle the current_color & we increment distance
ELSE IF ( we read a value below the threshold value) we toggle the current_color & we increment distance..no sens
wrong code because of the wrong braces..there are 2 closed braces before ELSE , you should remove one.
IR led wrong way round @ 3:13 ?
Matt Baker Yea. Rookie mistake >_
PyroElectro I feel bad as I love your tutorials :)
Matt Baker Don't feel bad, feel great. Your comment will help many others from getting confused until we can get things updated. We love getting feedback & thanks for the nice words.
Also, the A7 pin should be on the other side of the photo transistor. That's a big mistake, and that is 2 mistakes on this important circuit, and that makes me wonder. There is so much disinfo out there when it comes to electronic circuilts, and computer code. It is always wrong. Most of it. It is statistically impossible for it to be that way in a real world. Our world is not real at all. But even with the mistakes, intentional or not, it is still a good video in that he tackles the problem we are all trying to solve on the cheap, and there are no really any other videos out there like this one that really lays things out well. One keys is knowing to use an IR LED and a phototransitor and not a regular LED with a photoresistor. ...although that still may work. But not as well, and it would be harder to control the light. An IR LED is a great idea. And it teaches you that you can match the IR LED with the photoresistor. To build the housing for the IR LED and phototransistor will be a bit tricky though.
Awesome!!!!
Thank You.
Turrets on tanks... only an american would come up with two examples, one of which is a gun!