Skip to content

Latest commit

 

History

History
148 lines (119 loc) · 2.86 KB

File metadata and controls

148 lines (119 loc) · 2.86 KB

Analog

AX 's X means number of the analog port. (Options: A1 / A2 / A3)

Get ANG

Get analog data from analog port.

Mini.AX.getANG()

Return

  • A uint16_t result of analog data.

Get DIG

Get digital data from analog port.

Mini.AX.getDIG()

Return

  • A boolean result of digital data. (true / false)


Button

BTNX 's X means number of the Button. (Options: BTN1 / BTN2)

Get BTN

Get Button is clicked or not.

Mini.BTNX.get()

Return

  • A boolean result of BTN is clicked. (true / false)


Digital

DX 's X means number of the digital port. (Options: D1 / D2 / D3 / D4)

Get DIG

Get digital data from digital port.

Mini.DX.get()

Return

  • A boolean result of digital data. (true / false)

Get Ultrasonic

Get distance from digital port by using ultrasonic sensor.

Mini.DX.US.get()

Return

  • A float distance of ultrasonic sensor and object.


Set DIG

Set digital data to digital port.

Mini.DX.set(byte v);

Parameters

  • v is a byte which you want to set.


DC Motor

MX 's X means number of the Motor port. (Options: M1 / M2)

Set Motor

Set DC Motor speed.

Mini.MX.set(int speed);

Parameters

  • speed is a int of motor speed. (Options: 0~100)


RC Motor

RCX 's X means number of the RC port. (Options: RC1 / RC2 / RC3 / RC4)

Set RC

Set RC Servo angle.

Mini.RCX.set(int angle);

Parameters

  • angle is a int of servo angle. (Options: 0~180)


LED

RGBX 's X means number of the RGB port. (Options: RGB1 / RGB2)

Set R

Set LED red color pwm.

Mini.RGBX.setR(uint8_t PWM);

Parameters

  • PWM is a uint8_t of red color. (Options: 0~255)

Set G

Set LED green color pwm.

Mini.RGBX.setG(uint8_t PWM);

Parameters

  • PWM is a uint8_t of green color. (Options: 0~255)

Set B

Set LED blue color pwm.

Mini.RGBX.setB(uint8_t PWM);

Parameters

  • PWM is a uint8_t of blue color. (Options: 0~255)

Set RGB

Set LED RGB color pwm.

Mini.RGBX.setRGB(uint8_t PWMR, uint8_t PWMG, uint8_t PWMB);

Parameters

  • PWMR is a uint8_t of red color. (Options: 0~255)
  • PWMG is a uint8_t of green color. (Options: 0~255)
  • PWMB is a uint8_t of blue color. (Options: 0~255)

Set HSV

Set LED HSV color pwm.

Mini.RGBX.setHSV(int H, float S, float V);

Parameters

  • H is a int of hue.
  • S is a float of saturation.
  • V is a float of value.