completely commented arduino simulator code