first code update

crap code I written and Arduino ARHS code modified from kriswiner