This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| 
                    doc:crazyflie:client:pycfclient:zmq [2015-07-14 11:25] macke created  | 
                
                    doc:crazyflie:client:pycfclient:zmq [2020-05-12 14:28] (current) kimberly  | 
            ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | <WRAP center round important 60%> | ||
| + | This page has deprecated and moved to the new documentation framework of the main Bitcraze website. Please go to [[https:// | ||
| + | </ | ||
| + | |||
| + | |||
| + | The [[doc: | ||
| + | |||
| + | Here's a list of the ports/ | ||
| + | ^ Port ^ Type ^ Functionality ^ | ||
| + | | 1213 | REQ | Set parameters | | ||
| + | | 1214 | PUSH | LED-ring memory  | ||
| + | | 1212 | PULL | Input device  | ||
| + | |||
| + | |||
| + | ====== Parameters ====== | ||
| + | The parameter back-end gives access to setting parameters in the Crazyflie. The back-end is enabled by default. | ||
| + | |||
| + | ===== Protocol ===== | ||
| + | <WRAP group> | ||
| + | <WRAP half column> | ||
| + | Available fields: | ||
| + | ^  Field  ^  Format  | ||
| + | | version | int | Should be set to 1 | | ||
| + | | cmd | string | Command to send (currently only set is supported) | | ||
| + | | name | string | The name of the parameter | | ||
| + | | value | string | The value of the parameter | | ||
| + | </ | ||
| + | <WRAP half column> | ||
| + | Example of setting the // | ||
| + | < | ||
| + | { | ||
| + |   " | ||
| + |   " | ||
| + |   " | ||
| + |   " | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ====== LED-ring ====== | ||
| + | The LED-ring back-end gives access to the LED-ring memory driver where the user can write the RGB values for all 12 LEDs on the ring. The back-end is enabled by default. | ||
| + | |||
| + | ===== Protocol ===== | ||
| + | <WRAP group> | ||
| + | <WRAP half column> | ||
| + | Available fields: | ||
| + | ^  Field  ^  Format  | ||
| + | | version | int | Should be set to 1 | | ||
| + | | rgbleds | array of 3 item arrays of int | R/G/B value for each LED (starting at 1) | | ||
| + | </ | ||
| + | <WRAP half column> | ||
| + | Example of setting all LEDs off: | ||
| + | < | ||
| + | { | ||
| + |   " | ||
| + |   " | ||
| + | [0, 0, 0], | ||
| + | [0, 0, 0], | ||
| + | [0, 0, 0], | ||
| + | [0, 0, 0], | ||
| + | [0, 0, 0], | ||
| + | [0, 0, 0], | ||
| + | [0, 0, 0], | ||
| + | [0, 0, 0], | ||
| + | [0, 0, 0], | ||
| + | [0, 0, 0], | ||
| + | [0, 0, 0], | ||
| + | [0, 0, 0] | ||
| + | ] | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ====== Input device ====== | ||
| + | If you don't want to use the API and you don't want to bother about scanning/ | ||
| + | |||
| + | By default this is disabled in the configuration file and needs to be enabled. The configuration file parameter is named // | ||
| + | |||
| + | ===== Protocol ===== | ||
| + | <WRAP group> | ||
| + | <WRAP half column> | ||
| + | Available fields: | ||
| + | ^  Field  ^  Format  | ||
| + | | version | int | Should be set to 1 | | ||
| + | | client_name | string | Name of the client (currently unused) | | ||
| + | | ctrl | dict | A dictionary with keys and values that match the internal names of controls in the client  | ||
| + | |||
| + | Available keys for the //ctrl// dictionary: | ||
| + | ^  Field  ^  Range  ^  Unit  ^  Comments  | ||
| + | | roll | N/A | degrees | | | ||
| + | | pitch | N/A | degrees | | | ||
| + | | yaw | N/A | degrees/ | ||
| + | | thrust | 0-100 | Percent | | | ||
| + | | estop | T/F | boolean | Used to stop the Crazyflie and disable the control | | ||
| + | | alt1 | T/F | boolean | Alt1 is internally mapped to functionality like switching LED-ring effect | | ||
| + | | alt2 | T/F | boolean | Alt2 is internally mapped to functionality like switching LED-ring headlights on/off | | ||
| + | </ | ||
| + | <WRAP half column> | ||
| + | Example: | ||
| + | < | ||
| + | { | ||
| + |     " | ||
| + |     " | ||
| + |     " | ||
| + |         " | ||
| + |         " | ||
| + |         " | ||
| + |         " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | **NOTE1**: Altitude hold is currently not working. | ||
| + | |||
| + | **NOTE2**: The values are used at 100Hz in the client, no matter at what rate they are sent via ZMQ | ||