Go Down

Topic: Color sensor & servo control trouble using 2 Arduino's (Read 797 times) previous topic - next topic


Using the TCS230 color sensor and a servo in one single program doesn't work because they both use Timerone.h. So I used two Arduino Uno's with a simple hard-wired master-slave communication line (Tx - Rx) between them. The measured values of the color sensor are corrupted though, as soon as I connect the two units.
Even connecting digital out from the measuring unit to analog in of the servo control unit (to indicate a simple ' go to next servo position') seems to corrupt the measuring data from the color sensor, rendering it useless.
It almost looks like the pwm signal to the servo is creating too much interference... Anyone?


The example code here uses Timer2 so it might work with the Servo library:

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e


Absoloutly no need to use two arduinos.

The interference  is coming from the servo, you need supply decoupling. You should not be using PWM on a servo anyway you should be using the servo libary.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131