Skip to content
 
 

Latest commit

 

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remote Server

Server to acces the Wombat's motors / servos / etc.



Protocol

The base request must contain the key type, which can either have the value get or set:

{
  "type": "get|set",
  ...
}

get

When requesting a get, the message must contain the request key, which can have following values:

  • motor
    additionally required:

    • port: int (0...3)

    returns

    • success: bool
    • value: int (-1500...1500)

  • servo_pos
    additionally required:

    • port: int (0...3)

    returns

    • success: bool
    • value: int (0...2047)

  • servo_enabled
    additionally required:

    • port: int (0...3)

    returns

    • success: bool
    • value: bool

  • digital
    additionally required:

    • port: int (0...9)

    returns

    • success: bool
    • value: bool

  • analog
    additionally required:

    • port: int (0...4)

    returns

    • success: bool
    • value: int (0...4086)

Example:

request:

{
  "type": "get",
  "request": "analog",
  "port": 0
}

return:

{
  "success": true,
  "value": 1834
}



set

When requesting a set, the message must contain the request key, which can have following values:

  • motor
    additionally required:

    • port: int (0...3)
    • velocity: int (-1500...1500)

    returns

    • success: bool

  • servo_pos
    additionally required:

    • port: int (0...3)
    • position: int (0...2047)

    returns

    • success: bool

  • servo_enabled
    additionally required:

    • port: int (0...3)
    • enabled: bool

    returns

    • success: bool

Example:

request:

{
  "type": "set",
  "request": "motor",
  "port": 0,
  "velocity": 1300
}

return:

{
  "success": true
}

About

implements a remote control for motors / servos / create

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages