Using a array fixed my problem, i was continually sending the control byte when did it separately.Code:PanRightNormal: PORTB = $1C 'STX Set Ports Low addr = $00 'Set address to write to to default (0) a[0] = $07 a[1] = $00 a[2] = $00 'gosub flashled 'Flash debug LED on PortE pause 10 'Pause 10ms between commands to allow them to go through I2CWRITE sda,scl,cont,[STR a\3] 'Write 0101|000|0 to initialise I2C comms (controlbyte|address|read/write) 'LSB of velocity byte 'gosub flashled 'Flash debug LED to show commandds ave been completed pause 10 'Pause 0.01 second return
Bookmarks