Extract method read_ir
Fix read_ir, readd motor commands in main()
Compile error: missing variable chk