Timing Motors

Hi,
I am very new in Arduino programming and would appreciate any help on this:

  1. How to time motor rotation
  2. Code to sense color i.e. Red, Blue & Green
  1. You need at least one sensor on the motor output shaft. Look for "Hall Effect", or "opto-interrupter". Depends on speed.

  2. Code cannot distinguish colour - you need a sensor of some sort, possibly with an optical filter.

Can you tell us what it is you want to do?

If you read 3 LDRs with coloured filters on top (the filters that are also used on stagelights) then you can distinguish red, green and blue. Obviously this setup is very light dependant.

There is a colour sensor with built in white LED.
ADJD-S371-QR999
Miniature Surface-Mount
RGB Digital Color Sensor Module

http://ssdl.stanford.edu/ssdl/images/stories/AA236/0809A/Lab/rovercolorsensor%20-%20datasheet.pdf

I believe Sparkfun sell one mounted on a small PCB.

Thanks for help.

  1. I am developing a robot project that should detect and pick a box depending on the user specification (either Red, Green or Blue). For the type of color sensor, may I first check.
  2. I also had problems with one motor receiving more voltage & hence problems to coordinate the wheels. I did resolve this through code, but is there a better solution to this?
  3. Could anyone help with a code to enslave one Arduino board? And to interface two Duemilanove boards?
  1. I am developing a robot project that should detect and pick a box depending on the user specification (either Red, Green or Blue). For the type of color sensor, may I first check.

It sounds like you need some form of camera, CMU cam? This would allow you to both find the object and figure out what color it is.

  1. I also had problems with one motor receiving more voltage & hence problems to coordinate the wheels. I did resolve this through code, but is there a better solution to this?

Your using whats known as open loop, your telling it to go and just crossing your fingers that it works. if you get some form of encoder that counts the rotations of the tires then you know it will be spot on when it stops.

  1. Could anyone help with a code to enslave one Arduino board? And to interface two Duemilanove boards?

Im not sure what your asking for, try explaining a little more.