Added proximitysensing to arduino and fixed bugs