Let's Make Robots!

Loop two things at once

This is our sketch, everything works but we want to make the two functions be able to work at the same time. Anyone who knows how to do that?

 

boolean firstTrigger=false; //tells the duino if the LDR level is below 100

const int sensor=0; //or whatever your LDR sensor is. 

const int MotorPin1 = 3; //or whatever

int buttonPin=11; // pin where the button nr 1 is connected I0

int cupHeater=5;

int buttonState=0;         // variable for reading the pushbutton status

int delayTimeOn=100;

Who can help an absolute beginner connect a motor? :)

Hello, 

I'm supposed to do a project for school (a design project - not programming)

And I'm stuck on the silly simple things - that should be simple ....but aren't yet for me. 

I hope you can help me with that. 

 

So, I have an Arduino, a motor (6-14V), a orange thingy (yebb, that's how much newbie I am!!!) and some batteries. 

But how do I connect it all without frying the arduino? :D

I've seen many "how-to's", but they all have breadboards. 

 

Can you help me?

Value changes and Arduino.

I hope you can help me - I¨m sure it's not too complicated, I just know yet how to ask my Arduino to read it. 

 

So, I'm playing peek-a-boo with my robot (arduino, light sensor and a motor)

and I need to tell my arduino to read that:

If the value of the LDR (which is usually around 600) goes below 100 (for more than 2 sec) and then above 400, it should trigger the motor. 

 

Thanks a bunch,