Hello everyone, I am studying my last degree before going to university, I never saw Arduino programming so it is difficult for me, however they ask me to do a project with that. Please I want to know if it is possible to make an engine move every time the proximity sensor detects something and lights a led.
It would be of great help for me your comments, thank you very much for your time, I really help.
Martineri40:
if it is possible to make an engine move every time the proximity sensor detects something and lights a led.
Yes, but you'll need to give more details of the "engine" (presumably an electric motor of some sort?, but is it a tiny toy dc one, or a huge industrial thing, or a servo or a stepper or or or) and also more details of what it means to "move" (turn on and never turn off? rotate a certain amount? run for a certain time? or or or)
elvon_blunden:
Yes, but you'll need to give more details of the "engine" (presumably an electric motor of some sort?, but is it a tiny toy dc one, or a huge industrial thing, or a servo or a stepper or or or) and also more details of what it means to "move" (turn on and never turn off? rotate a certain amount? run for a certain time? or or or)
Hello, thanks for taking the time to respond. It is a servomotor (sorry for the confusion), I want the infrared sensor to detect something to turn on a led and at the same time move the servo motor (sorry for my english)
I have seen videos but they occupy a remote control and I want it without that, please, if you can help me, I would appreciate it very much
You'll need to start working through the tutorials, especially the servo ones, and also statechangedetect. The latter will help you see how to read the sensor to see when the sensor sees a "new" object; but details will depend on the exact sensor.
You'll need to start working through the tutorials, especially the servo ones, and also statechangedetect. The latter will help you see how to read the sensor to see when the sensor sees a "new" object; but details will depend on the exact sensor.
Thank you very much for your help, I read what you sent me but in that one uses a momentary switch and I do not know how to change the code to not use that. I want it to be by passing my hand for example.
Could you help me? How can I contact you? I would really appreciate it very much, i am new at this
Martineri40:
that one uses a momentary switch and I do not know how to change the code to not use that. I want it to be by passing my hand for example.
You didn't specify what sensor you (will) have. If for example it's one like this, then the output is digital and just goes up and down depending on your hand. In that sense it's exactly like the button in that example. It goes low when obstructed, and you can use the state change detect to see when that happens.
Martineri40:
Could you help me?
Keep it in the forum rather. That way you get input from many sources, different ideas, not just mine. And nobody (not just me) is likely to commit to being available to help when there are other things on the go, like family and work and sleep
So, you give it a try, post your code and schematic if you have problems, and someone is sure to help. But it's best if you go first.
(Unless Blackfin is around; s/he may well provide bespoke code off the cuff.)
elvon_blunden:
Off topic, but I'm keen to know what it means to have degress before going to uni?
Probably subject, or separate project. Those things are quite common in secondary schools.
For the OP:
There are lots of examples with the IDE, including some servo examples. Do read through them and make sure you understand what's going on. Most of those examples are really well documented, and then there's the quite extensive documentation of all the Arduino functions on this site.