generate code to toss into arduino file