Arduino Wait Function In Javascript With Parameters