Replaced all conn.request... blocks of code with sendMessage(message).
sendAngleValues and sendStartPosition had the same first part of the code so I deleted sendStartPosition and implemented "start = 0" default variable in sendAngleValues.
When 'start = 1', set command = 'g' which was the only difference in sendStartPosition.
Added makeDHTable function because the same code was being used in all 4 modes to make a DHTable
Replaced all conn.request... blocks of code with sendMessage(message).
sendAngleValues and sendStartPosition had the same first part of the code so I deleted sendStartPosition and implemented "start = 0" default variable in sendAngleValues. When 'start = 1', set command = 'g' which was the only difference in sendStartPosition.
Added makeDHTable function because the same code was being used in all 4 modes to make a DHTable