From a9307ef840d21defeebb54016b50d67d0b60e038 Mon Sep 17 00:00:00 2001 From: g-man Date: Thu, 30 Nov 2023 16:31:53 +0900 Subject: [PATCH] Update readme for CR2 --- README.md | 72 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 4446a2d..abcc27a 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,24 @@ # pywhill -pywhill is a WHILL Model CR SDK for Python.
-We also have [Model CR Technical Support repository](https://github.com/WHILL/Model_CR_Technical_Support) for current and potential Model CR users.
-For general questions and requests, please visit our [product page](https://whill.inc/jp/model-cr) . +"pywhill" is a Python SDK for WHILL Model CR series.
+We also have [Model CR Series Technical Support](https://github.com/WHILL/Model_CR_Technical_Support) for current and potential Model CR series users.
+For general questions and requests, please visit our [product page](https://whill.inc/jp/model-cr2) . +**Note:** "Model CR series" refers to Model CR and Model CR2. ## Requirements -- WHILL **Model CR** (Normal **Model C** does not support serial communication.) +- WHILL **Model CR / CR2** (Normal **Model C / C2** does not support serial communication.) - Python3.6 or later - pySerial (https://github.com/pyserial/pyserial) ## OS Support -- Windows 10 +- Windows 10 / 11 - MacOS X - Ubuntu 16.04 - Ubuntu 18.04 -## Getting Started +## Installation Clone or download this repository at any place you want, or this package is avalable on [PyPI](https://pypi.org/project/whill/). ``` @@ -34,59 +35,62 @@ from whill import ComWHILL ``` Initialize WHILL instance with SoftwareSerial. -### Communication +### Power Control ```python -.start_data_stream(interval_msec=) +.send_power_on() +.send_power_off() +.set_power(power_state_command=) ``` -Command WHILL to start reporting WHILL status. +Turn on/off a WHILL. `power_state_command` is a bool with `True` to power WHILL on. ```python -.refresh() +.set_battery_voltage_output_mode(vbatt_on_off=) ``` -Fetch serial interface and do internal process. - +Enable/Disable power supply to the interface connector. `True` to enable power supply. **For Model CR only.** +### Motor Control ```python -.stop_data_stream() +.send_joystick(front=, side=) ``` -Command WHILL to stop report WHILL status. - +Manipulate a WHILL via this command. +Both `front` and `side` are integer values with range -100 ~ 100. -### Manipulation ```python -.send_joystick(front=, side=) +.send_velocity(front=, side=) ``` -Manipulate a WHILL via this command. -Both `front` and `side` are integer values with range -100 ~ 100. +Control the speed of a WHILL directly via this command. (Available since v1.3.0) +`front` is integer values with range -500 ~ 1500 [0.004km/h]. +`side` is integer values with range -750 ~ 750 [0.004km/h]. +**Attention:** +WHILL moves so quickly using SetVelocity command and so pay enough attention to use SetVelocity command. Basically, send this command to increase speed gradually. + +### Data Fetching + ```python -.send_power_on() -.send_power_off() -.set_power(power_state_command=) +.start_data_stream(interval_msec=) ``` -Turn on/off a WHILL. `power_state_command` is a bool with `True` to power WHILL on. +Command WHILL to start reporting WHILL status. ```python -.set_battery_voltage_output_mode(vbatt_on_off=) +.refresh() ``` -Enable/Disable power supply to the interface connector. `True` to enable power supply. +Fetch serial interface and do internal process. + ```python -.send_velocity(front=, side=) +.stop_data_stream() ``` -Control the speed of a WHILL directly via this command. (Available since v1.3.0) -`front` is integer values with range -500 ~ 1500 [0.004km/h]. -`side` is integer values with range -750 ~ 750 [0.004km/h]. -**Attention:** -WHILL moves so quickly using SetVelocity command and so pay enough attention to use SetVelocity command. Basically, send this command to increase speed gradually. +Command WHILL to stop report WHILL status. -### Sensors and Status +### Data Reference +You can refer to the value fetched by the above command (Data Fetching). -### Accelerometer **(deprecated)** +#### Accelerometer **(deprecated)** Accelerometer API has been disabled since v1.2.0. #### Gyro **(deprecated)** @@ -117,7 +121,7 @@ Current selected speed mode. ```python .register_callback(event=) ``` -By registering callback functions, You can hook at status is updated. +By registering callback functions, you can hook at status is updated. See Example: [cr_example3_callback.py](https://github.com/WHILL/pywhill/blob/master/example/cr_example3_callback.py) ## License