Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnN193 committed Feb 10, 2025
1 parent d75ff54 commit ad0e2bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
31 changes: 12 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

This [uln2003 module](https://app.viam.com/module/viam/uln2003) implements a [ULN2003](https://www.ti.com/product/ULN2003A), used for low-current and low-precision applications using the [`rdk:component:motor` API](https://docs.viam.com/appendix/apis/components/motor/). It supports full, half, and quarter stepping with 4096 steps in a rotation in full-step mode.

## Configure your 28byj-48 motor

> [!NOTE]
> Before configuring your motor, you must [create a machine](https://docs.viam.com/cloud/machines/#add-a-new-machine).
Navigate to the [**CONFIGURE** tab](https://docs.viam.com/configure/) of your [machine](https://docs.viam.com/fleet/machines/) in the [Viam app](https://app.viam.com/).
[Add motor / uln2003:28byj-48 to your machine](https://docs.viam.com/configure/#components).

## Configure your 28byj-48 motor

On the new component panel, copy and paste the following attribute template into your motor's attributes field:

```json
Expand Down Expand Up @@ -37,30 +37,23 @@ The following attributes are available for `viam:uln2003:28byj-48` motors:

Refer to your motor and motor driver data sheets for specifics.

## Example configuration
### Example configuration

### `viam:uln2003:28byj-48`
```json
{
"name": "<your-uln2003-28byj-48-motor-name>",
"model": "viam:uln2003:28byj-48",
"type": "motor",
"namespace": "rdk",
"attributes": {
"board": "example-board",
"pins": {
"in1": "11",
"in2": "12",
"in3": "13",
"in4": "15"
},
"ticks_per_rotation": 4096
}
"depends_on": []
"board": "example-board",
"pins": {
"in1": "11",
"in2": "12",
"in3": "13",
"in4": "15"
},
"ticks_per_rotation": 4096
}
```

### Next Steps

- To test your motor, expand the **TEST** section of its configuration pane or go to the [**CONTROL** tab](https://docs.viam.com/fleet/control/).
- To write code against your motor, use one of the [available SDKs](https://docs.viam.com/sdks/).
- To view examples using a motor component, explore [these tutorials](https://docs.viam.com/tutorials/).
4 changes: 3 additions & 1 deletion meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"models": [
{
"api": "rdk:component:motor",
"model": "viam:uln2003:28byj-48"
"model": "viam:uln2003:28byj-48",
"short_description": "the uln2003 28byj-48 stepper motor",
"markdown_link": "README.md#configure-your-28byj-48-motor"
}
],
"build": {
Expand Down

0 comments on commit ad0e2bd

Please sign in to comment.