Hier gibts Beispielprogramm:
https://www.roboternetz.de/phpBB2/dl...le&file_id=267

Zusätzlicher Widerstand ist nicht notwendig.