2 golfed calculation (-9 bytes)
source | link

PHP, 125125 116 bytes:

function m($i){static$a;$a+=$d=($i+35$i-$a$a+10)%17;echo$d*21%17-($d>8)*3579;echo$d*21,"
";}for(;$c=ord($argv[1][$i++]);m($c%16))m($c/16|0);m(-1);

breakdown

function m($i)              // function to turn camera:
{
    static$a;                   // remember angle
    $a+=$d=($i+35-$a)%17;$a+=                        // calculateadd delta andto angle: 
 $i+1=index, add 34 $d=($i-$a+10)%17-9;         // delta: target=nibble value+1-current angle
                                // toadd adjust9, formodulo the17, modulo;-9 subtract-> currentshortest anglemovement
    echo$d*21-($d>8)*357,"\n";  // print delta*21 (-360 if           // print delta is>8)* 21 and a newlinelinebreak
}
for(;$c=ord($argv[1][$i++]);// loop through input characters
    m($c%16))                   // 2. move to low nibble value
    m($c/16|0)                  // 1. move to high nibble value
;
m(-1);                      // move back to "?"

Of course, 21 is pretty inaccurate and may fail for strings longer than 14 characters; but then ... 360/17 would be four bytes longer.

An alternative solution would have been to attach a laser pointer to the camera;
we could use all printable ascii chars and a "question" card at 3.75 degrees each with that.

Another alternative: Use 16 cards (at 22.5 degrees) with 6 characters each:
implement some sort of T9 and we can omit the high nibble. ;)

PHP, 125 bytes:

function m($i){static$a;$a+=$d=($i+35-$a)%17;echo$d*21-($d>8)*357,"
";}for(;$c=ord($argv[1][$i++]);m($c%16))m($c/16|0);m(-1);

breakdown

function m($i)              // function to turn camera:
{
    static$a;                   // remember angle
    $a+=$d=($i+35-$a)%17;       // calculate delta and angle: $i+1=index, add 34 
                                // to adjust for the modulo; subtract current angle
    echo$d*21-($d>8)*357,"\n";  // print delta*21 (-360 if delta is>8) and a newline
}
for(;$c=ord($argv[1][$i++]);// loop through input characters
    m($c%16))                   // 2. move to low nibble value
    m($c/16|0)                  // 1. move to high nibble value
;
m(-1);                      // move back to "?"

Of course, 21 is pretty inaccurate and may fail for strings longer than 14 characters; but then ... 360/17 would be four bytes longer.

An alternative solution would have been to attach a laser pointer to the camera;
we could use all printable ascii chars and a "question" card at 3.75 degrees each with that.

Another alternative: Use 16 cards (at 22.5 degrees) with 6 characters each:
implement some sort of T9 and we can omit the high nibble. ;)

PHP, 125 116 bytes:

function m($i){static$a;$a+=$d=($i-$a+10)%17-9;echo$d*21,"
";}for(;$c=ord($argv[1][$i++]);m($c%16))m($c/16|0);m(-1);

breakdown

function m($i)              // function to turn camera:
{
    static$a;                   // remember angle
    $a+=                        // add delta to angle 
    $d=($i-$a+10)%17-9;         // delta: target=nibble value+1-current angle
                                // add 9, modulo 17, -9 -> shortest movement
    echo$d*21,"\n";                 // print delta * 21 and a linebreak
}
for(;$c=ord($argv[1][$i++]);// loop through input characters
    m($c%16))                   // 2. move to low nibble value
    m($c/16|0)                  // 1. move to high nibble value
;
m(-1);                      // move back to "?"

Of course, 21 is pretty inaccurate and may fail for strings longer than 14 characters; but then ... 360/17 would be four bytes longer.

An alternative solution would have been to attach a laser pointer to the camera;
we could use all printable ascii chars and a "question" card at 3.75 degrees each with that.

Another alternative: Use 16 cards (at 22.5 degrees) with 6 characters each:
implement some sort of T9 and we can omit the high nibble. ;)

1
source | link

PHP, 125 bytes:

function m($i){static$a;$a+=$d=($i+35-$a)%17;echo$d*21-($d>8)*357,"
";}for(;$c=ord($argv[1][$i++]);m($c%16))m($c/16|0);m(-1);

breakdown

function m($i)              // function to turn camera:
{
    static$a;                   // remember angle
    $a+=$d=($i+35-$a)%17;       // calculate delta and angle: $i+1=index, add 34 
                                // to adjust for the modulo; subtract current angle
    echo$d*21-($d>8)*357,"\n";  // print delta*21 (-360 if delta is>8) and a newline
}
for(;$c=ord($argv[1][$i++]);// loop through input characters
    m($c%16))                   // 2. move to low nibble value
    m($c/16|0)                  // 1. move to high nibble value
;
m(-1);                      // move back to "?"

Of course, 21 is pretty inaccurate and may fail for strings longer than 14 characters; but then ... 360/17 would be four bytes longer.

An alternative solution would have been to attach a laser pointer to the camera;
we could use all printable ascii chars and a "question" card at 3.75 degrees each with that.

Another alternative: Use 16 cards (at 22.5 degrees) with 6 characters each:
implement some sort of T9 and we can omit the high nibble. ;)