Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
help:common:robot_pan_tilt_megarobot_en [2014/02/19 13:28]
zimmerk
help:common:robot_pan_tilt_megarobot_en [2014/02/19 13:29]
zimmerk [How to control the PT unit]
Line 19: Line 19:
 fopen(ser);</​code>​ fopen(ser);</​code>​
   - You can control the PT unit by writing corresponding control bytes (see {{:​help:​common:​aimotor701_manual_megarobot.pdf|manuál}}) to the file ''​ser''​ using command ''​fwrite''​.   - You can control the PT unit by writing corresponding control bytes (see {{:​help:​common:​aimotor701_manual_megarobot.pdf|manuál}}) to the file ''​ser''​ using command ''​fwrite''​.
-  - To simplify the PT control the following function is provided:<​code>​ptmove(ser,​ pan_pos, tilt_pos);</​code>​ where ''​pan_pos''​ corresponds to the absolute rotation angle around vertical axis, ''​tilt_pos''​ corresponds to the absolute rotation angle around horizontal axis. Range of values for ''​pan_pos''​ and ''​tilt_pos''​ is from 0 to 254. covers approximately 80 degrees in a given direction. To set the unit into the initial position (i.e. the position camera optical axis is perpendicular to LCD screen) use the following values ''​pan_pos==127'',​ ''​tilt_pos==127''​.<​code>​function ptmove(ser, pan_pos, tilt_pos, speed)+  - To simplify the PT control the following function is provided:<​code>​ptmove(ser,​ pan_pos, tilt_pos);</​code>​ where ''​pan_pos''​ corresponds to the absolute rotation angle around vertical axis, ''​tilt_pos''​ corresponds to the absolute rotation angle around horizontal axis. Range of values for ''​pan_pos''​ and ''​tilt_pos''​ is from 0 to 254. It covers approximately 80 degrees in a given direction. To set the unit into the initial position (i.e. the position, where camera optical axis is perpendicular to the LCD screen) use the following values ''​pan_pos==127'',​ ''​tilt_pos==127''​.<​code>​function ptmove(ser, pan_pos, tilt_pos, speed)
     if nargin<4     if nargin<4
         speed = 3;         speed = 3;
Line 36: Line 36:
 end end
 </​code>​ </​code>​
-  - In the end, the communication is close as follows:<​code>​fclose(ser);​+  - In the end, the communication is closed ​as follows:<​code>​fclose(ser);​
 delete(ser);</​code>​ delete(ser);</​code>​
  
  
help/common/robot_pan_tilt_megarobot_en.txt · Last modified: 2018/02/03 10:49 (external edit)