int x; float f; void main() { while(1) { printf("Press START\n") while(!start_button()) {} reset_system_time(); while(stop_button()==0 && mseconds()<(long)20000) { x=knob(); printf("knob is at %d\n", x); f=(float)x+150.; tone(f,f/1000.); } } }