made changes so it works with both pi and ftdi