hideki:
Hello everybody! About voltages, I checked again and it seems to be OK. I am using the collector output of phototransistor to get HI and LO data, directly using a 10K Ohm resistor. Anyway, I will try your tips and I will give you a feedback soon. Thank you, guys!
I would set up some serial prints to see what the arduino is seeing rather than using a volt meter. I built a control pad that used 4 optical switchs (tcrt5000L) my connection diagram is different than the one you posted.
Im sending 5v to the led anode then from the led cathode im using a 200 ohm resistor to ground.
on the sensor side im sending 5v to the collector then from the emitter I am going to the arduino pin and I have a 10k resistor from the emitter to ground.
If you use a digital camera or the camera on your phone you should be able to see if the led is on as it will show up as light blue.
I have the switchs behind a piece of clear plastic (so you touch the plastic to activate) and they have proven to be reliable but sometimes annoying as you can swipe and accidently hit the next one over. I also programmed them to look for statechange rather than using them as direct inputs.