So, to be blunt with you mates I don't know shit about programming. Though, my son loves programming. He is currently working with something called "Arduino".
>inb4 feel free to correct me if wrong
So, I'm here to ask if anyone can give me code to help him get started.
>Does anyone know how to make the robot go forward turn right, then stop at a certain point?
>inb4 I may ask many questions, but won't bother you too much.
Thanks, anons.
>pic pretty related
Hello daddy. With Arduino you can make all kinds of gadgets. It's basically just a piece in the puzzle of the project your son is making. Without knowing more about his project there's nothing we could say that would help.
>>54601739
>So, I'm here to ask if anyone can give me code to help him get started.
Buy him a book , a good book and let him learn his own way.
Just give him good sources of information don't spoonfeed him.
>>54601810
What this fag said. Also including his age would've been helpful, is he a toddler or a manchild like most of us here?
Good luck bonding with your wife's son :^)
I worked with Automation in high-school in my country, and I think we had somethimg named NPN sensors. They give out voltage depending on promixity of objects/ things (such as a regular human hand or a chair)
You could connect a motor that spins some wheels for movement of the robot. Connect the sensor to one of the GPIO's.
Something like this would have needed to be coded:
pinWheel = 8 (pin that goes to the wheel)
pinSensor = 8 (pin that goes to the sensor)
while(true) //True is always true, meaning an infinite loop
{
if (pinSensor == HIGH)
pinWheel = HIGH; // == compares values, = sets values)
else
pinWheel = LOW
}
On my phone atm, stressful to write shit. If youre interested I can post some of my projects to give you a general idea.
>>54601739
You really don't know the purpose of greentext, do you?
Also buy a beginner's book on Arduino and leave him to it. I'm getting started on Arduino soon.
>>54601739
Just buy the "arduino cookbook", it's not expensive and has plenty of good stuff for your wife's son.