Commander-API
V2.1.0
Simple Command Parser
|
There are some premade commands already to make your development easier. Please read the documentation carefully, some commands are platform dependent.
reboot
This command reboots the device.
neofetch
This command is inspired by the original neofetch bash script. It is a visually pleasing system information tool.
micros
This command returns the number of microseconds passed since the program started.
millis
This command returns the number of milliseconds passed since the program started.
pinMode
pinMode 2 1
-> Set pin 2 to output.pinMode 3 0
-> Set pin 3 to input.This command sets the direction of any pin on the microcontroller.
digitalWrite
digitalWrite 2 1
-> Set pin 2 output state to high.digitalWrite 3 0
-> Set pin 3 output state to low.This command sets the state of any output pin.
digitalRead
digitalRead 2
-> Read the state of pin 2.digitalRead 3
-> Read the state of pin 3.This command reads the state of any input or output pin.
analogRead
analogRead 0
-> Create an ADC measurement on analog pin 0analogRead 5
-> Create an ADC measurement on analog pin 5This command creates an ADC measurement on any ADC pin.
ipconfig
Displays current TCP/IP network configuration.
wifiStat
Displays WiFi mode, signal strength and MAC address.
wifiScan
Scans for the nearby WiFi networks and print them as a list.
sin
sin 0
-> Returns 0.000000sin 1.570796
-> Returns 1.000000Calculates the sine of an angle which is given in radians.
cos
cos 0
-> Returns 1.000000cos 1.570796
-> Returns 0.000000Calculates the cosine of an angle which is given in radians.
abs
abs 10.5
-> Returns 10.500000abs -6.3
-> Returns 6.300000Calculates the absolute value of an input number.
random
random 1 5
-> Returns a random integer between 1 and 5( 5 is the upper limit, so actually 4 will be the largest number )Generates a random number between the given bounds.
not
not 0
-> Returns 1not 1
-> Returns 0not 2
-> Returns 0Generates a logical NOT from the input. It follows the C-like true-false logic, so 0 is false, everything else is true.