<commit_before># roytherobot-py
Python control module for Roemotion's Roy the Robot.

![](https://j.gifs.com/NkjlxL.gif)

This Python module allows a user to control a Roemotion Roy the Robot Arm. The serial protocol documentation for the Parallax Propeller Servo Controller can be found at <https://www.parallax.com/downloads/propeller-servo-controller-guide>. Information about Roy The Robot Arm can be found at <http://www.roemotion.com>.

This module works in Python 3.x and legacy Python 2.x. It has been tested in Windows 7, OS X and Linux (Raspbian).

### Installation
Run the following in the terminal:

```
python setup.py install
```
Windows users will need to install drivers for the Propeller. The drivers can be found at <https://www.parallax.com/usbdrivers>.
### Usage

Example of basic usage:

```python
import roytherobot

# Context manager safely closes the serial device at the end
with roytherobot.Arm('/dev/ttyUSB0') as roy:

	# Enable all of the servos
	roy.enable_all_servos()
	
	# Open Roy's pinky finger over a 0.23 second interval
	roy.move(roy.PINKY, 1100, 0.23)
	
	# Close Roy's pinky finger over a 0.33 second interval
	roy.move(roy.PINKY, 580, 0.33)
```

A full demonstration is also included in the project:

```python
import roytherobot.demo

roytherobot.demo.run_demo('COM3')
```
<commit_msg>Updated README.md.<commit_after># roytherobot-py
Python control module for Roemotion's Roy the Robot.

![](https://j.gifs.com/NkjlxL.gif)

This Python module allows a user to control a Roemotion Roy the Robot Arm. The serial protocol documentation for the Parallax Propeller Servo Controller can be found at <https://www.parallax.com/downloads/propeller-servo-controller-guide>. Information about Roy The Robot Arm can be found at <http://www.roemotion.com>.

This module works in Python 3.x and legacy Python 2.x. It has been tested in Windows 7, OS X and Linux (Raspbian).

### Installation
Run the following in the terminal:

```
python setup.py install
```
Windows users will need to install drivers for the Propeller. The drivers can be found at <https://www.parallax.com/usbdrivers>.
### Usage

Example of basic usage:

```python
import roytherobot

# Context manager safely closes the serial device at the end
with roytherobot.Arm('/dev/ttyUSB0') as roy:

	# Enable all of the servos
	roy.enable_all_servos()
	
	# Open Roy's pinky finger over 0.23 seconds
	roy.move(roy.PINKY, 1100, 0.23)
	
	# Close Roy's pinky finger over 0.33 seconds
	roy.move(roy.PINKY, 580, 0.33)
```

A full demonstration is also included in the project:

```python
import roytherobot.demo

roytherobot.demo.run_demo('COM3')
```

{'fraction_non_alphanumeric': 0.09646790733004178, 'fraction_numerical': 0.018230155715913406, 'mean_word_length': 4.310483870967742, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3154431', 'n_tokens_mistral': 911, 'n_tokens_neox': 816, 'n_words': 327}