Configure a fake encoder
The fake
encoder is an encoder model for testing code without any hardware.
Navigate to the Config tab of your robot’s page in the Viam app.
Click on the Components subtab and click Create component.
Select the encoder
type, then select the fake
model.
Enter a name for your encoder and click Create.
{
"name": "<your-encoder-name>",
"type": "encoder",
"model": "fake",
"attributes": {}
}
{
"name": "myEncoder",
"type": "encoder",
"model": "fake",
"attributes": {}
}
No attributes are available for fake
encoders.
Test the encoder
Once your encoder is configured and your robot is connected, go to the Control tab and click on the encoder’s drop-down panel. The ticks count is displayed.
Have questions, or want to meet other people working on robots? Join our Community Discord.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!