# Methods
# Connection
Enables network functionality and setup.
# Skills
Enables movement and other skills.
# forward
Move one step forward with specific speed
.
# Arguments:
- speed
Type:Integer
Default:speed
# Example
amsel.forward(80)
# <amsel-moves-forward-with-speed-80>
# Class Reference
# backward
Move one step backward with specific speed
.
# Arguments:
- speed
Type:Integer
Default:speed
# Example
amsel.backward(80)
# <amsel-moves-backward-with-speed-80>
# Class Reference
# left
Move one step left with specific speed
.
# Arguments:
- speed
Type:Integer
Default:speed
# Example
amsel.left(80)
# <amsel-moves-left-with-speed-80>
# Class Reference
# right
Move one step right with specific speed
.
# Arguments:
- speed
Type:Integer
Default:speed
# Example
amsel.right(80)
# <amsel-moves-right-with-speed-80>
# Class Reference
# stop
Stop all movement.
# Example
amsel.stop()
# <amsel-stops>
# Class Reference
# go
Start an automatic run. To end it hit ctrl-C
.
# Example
amsel.go()
# <amsel-drives-infinitely>
# Class Reference
Use to print something on the display
# Arguments:
- message
Type:String
# Example
amsel.print('Hello World!')
# <"Hello World!"-is-rendered-on-the-display>
# Class Reference
# clear
Clear the display
# Example
amsel.clear()
# <display-is-cleared>
# Class Reference
# Utilities
Methods used by other methods.
# use
Specify this to set a newIP
.
# Arguments:
- newIP
Type:String
# Example
amsel.use('192.168.4.1')
# Amsel CLI uses now 192.168.4.1 as IP
# Class Reference
# setSpeed
Sets new default speed
.
# Arguments:
- newSpeed
Type:Integer
# Example
amsel.setSpeed(80)
# Amsel CLI used 100 as default speed now it uses 80
# Class Reference
# getSpeed
Returns the current default speed
value.
# Example
amsel.getSpeed()
# 100
# Class Reference
# getDistance
Returns the current distance.
# Example
amsel.getDistance()
# 18
# Class Reference
# get
Performs a get request and returns the response. This can be used to call specific functions. Use their API endpoint
as path to trigger it.
# Arguments:
- endpoint
Type:String
# Example
amsel.get('/forward?speed=100')
# <amsel-moves-forward>
# Class Reference
# IP
Returns the current IP.
# Example
amsel.IP()
# Amsel CLI uses 192.168.4.1 as IP
# Class Reference
# address
Returns the current address.
# Example
amsel.address()
# Amsel CLI uses amsel.local as network address
# Class Reference
# sleep
When called the robot doesn't care about anything for the passed duration
. It will just continue the running command. Also it does not take new commands.
WARNING
This method can't be aborted. Cut power supply when necessary.
# Arguments:
- duration
Type:Integer
# Example
amsel.sleep(10)
# <amsel-waits-10s>