Hello everyone.
I am searching the internet for a combined project. I would like to make an object avoidance vehicle, but I want to turn it on and off with the remote for the infrared sensor (just on off,no directional control). I want to use the following comonents.
1x Arduino Uno
4x DC motor
1x servor motor with ultrasonic sensor for the avoidance
1x L298N motorboard
1x infrared sensor with remote
2x power supply (I think 1 will not be enough)
I have got a chassic for 4 moters and also enough jumper wires.
Does anybody know where I can find such a project or can anybody help me building this project?
Can you post more information about the sensor? A data sheet, perhaps?
What have you tried?
Read the how to use this forum-please read sticky to see how to properly post code and some advice on how to ask an effective question. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code.
groundFungus:
Can you post more information about the sensor? A data sheet, perhaps?
What have you tried?
Read the how to use this forum-please read sticky to see how to properly post code and some advice on how to ask an effective question. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code.
I can built a moving car and a object avoidance car,to be honest I copied a robot layout from the internet and used the code, but I do understand the code (just find it hard to come up with myself!
For the infrared sensor I haven't tried anything yet but I have read several other projects where an infrared remote is used to control the movenment of the car, I also understand this code. But the biggest problem is to get the code for an onóff function, where do I place the sensor in the circuit when I use 2 power supplies and is it possible to use it only for on/óff?
The infrared sensor I have is "KY-022 INFRARED RECEIVER MODULE". I don't know how to add pictures to the post but I have a standard remote. On top blue button, up down left right and in the middle of these buttons a red "ok" button. Under these buttons there is a numpad including * and #.
Have you tried any of the examples that come with the IRremote library? The library is available in the Library Manager (look for IRremote by Shirriff ver. 2.2.2). There are other libraries, but that is the one that I have used for years.
Does your remote control work with the receiver?
Run the IRrecord.ino example. Using that sketch you can record the codes for the remote control buttons that you want to use for your commands. Then, in the robot sketch, use the recorded codes and if statements or a switch case to specify actions.