forked from Seeed-Studio/Wio_Link
/
driver_docs.json
1 lines (1 loc) · 30.1 KB
/
driver_docs.json
1
[{"Events": {}, "ID": 0, "GroveName": "Cytron 13Amp DC Motor Driver - SMD Compatible (MD13S)", "Methods": {"write_direction": {"direction": "motor direction, 0 or 1", "@brief@": "Change the motor direction. The initial direction is 0 when the module is powered on."}, "write_speed": {"speed": "motor speed, 0.0~100.0", "@brief@": "Change the motor speed. The initial speed is 0 when the module is powered on."}, "read_speed": {"speed": "motor speed, 0.0~100.0", "@brief@": "Read the motor speed. This is the PWM duty cycle and is not the actual motor speed."}, "read_speed_dir": {"direction": "motor direction, 0 or 1", "speed": "motor speed, 0.0~100.0", "@brief@": "Read the motor speed and direction together."}, "read_direction": {"direction": "motor direction, 0 or 1", "@brief@": "Read the motor direction."}, "write_speed_dir": {"direction": "motor direction, 0 or 1", "speed": "motor speed, 0.0~100.0", "@brief@": "Change the motor speed and direction together."}}}, {"Events": {}, "ID": 1, "GroveName": "Grove - 4-Digit Display", "Methods": {"write_display_point": {"display": "0: not, 1: display", "@brief@": "Display the \":\" point or not"}, "write_display_digits": {"chars": "the characters, can be 0~9,A,b,C,d,E,F,V,U.", "start_pos": "0~3, 0 is the most left", "@brief@": "Display multiple digits."}, "write_clear": {"@brief@": "Clear all digits and \":\" point."}, "write_display_one_digit": {"position": "0~3, 0 is the most left", "chr": "the character, can be 0~9,A,b,C,d,E,F,V,U.", "@brief@": "Display one digit."}, "write_brightness": {"@brief@": "Set the brightness.", "brightness": "can be 0,2,7, 7 is the brightest."}}}, {"Events": {}, "ID": 2, "GroveName": "Grove-3Axis Digital Acc(\u00b11.5g)", "Methods": {"read_acceleration": {"ay": "acceleration in y axis", "ax": "acceleration in x axis", "az": "acceleration in z axis", "@brief@": "read the acceleration in unit g"}, "read_shaked": {"shaked": "1: shaked 0: not", "@brief@": "read the status if the thing was shacked\nshake can be done in any axis"}}}, {"Events": {}, "ID": 3, "GroveName": "Grove - Air Quality Sensor", "Methods": {"read_quality": {"quality": "analog reading of this sensor, please use the data as a comparative\tquantity, because it is a qualitative results", "@brief@": "Get the analog reading of air quality. The air quality sensor is is designed for comprehensive\nmonitor over indoor air condition. It's responsive to a wide scope of harmful gases, as carbon\nmonixide, alcohol, acetone, thinner, formaldehyde and so on. Due to the measuring mechanism, this\nsensor can not output specific data to describe target gases' concentrations quantitatively. But\nit's still competent enough to be used in applications that require only qualitative results,\nlike auto refresher sprayers and auto air cycling systems. If exposed for a long time to pollution,\nit will be damaged."}}}, {"Events": {}, "ID": 4, "GroveName": "Grove-Barometer(BMP085/BMP180)", "Methods": {"read_temperature": {"temperature": "unit: Celsius degree", "@brief@": "Read a rough temperature value of the envirenment"}, "read_altitude": {"altitude": "the absolute altitude, unit: m", "@brief@": ""}, "read_pressure": {"pressure": "unit: Pa", "@brief@": ""}}}, {"Events": {}, "ID": 5, "GroveName": "Grove-Barometer(BMP280)", "Methods": {"read_temperature": {"temperature": "unit: Celsius degree", "@brief@": "Read a rough temperature value of the envirenment"}, "read_altitude": {"altitude": "the absolute altitude, unit: m", "@brief@": ""}, "read_pressure": {"pressure": "unit: Pa", "@brief@": ""}}}, {"Events": {"button_pressed": "Event which is triggered when the button is pressed,\r\nevent data is the number of PIN where the button is attached.\r"}, "ID": 6, "GroveName": "Grove-Button", "Methods": {"read_pressed": {"pressed": "1: pressed, 0: not\r", "@brief@": "Get the status of button\r"}}}, {"Events": {}, "ID": 7, "GroveName": "Grove - CO2 MH-Z16", "Methods": {"read_temperature": {"temperature": "unit: Celsius degree", "@brief@": "Get temperature."}, "read_concentration": {"concentration": "unit: PPM", "@brief@": "Get concentration"}, "read_concentration_and_temperature": {"concentration": "unit: PPM", "temperature": "unit: Celsius degree", "@brief@": "Get concentration and temperature."}}}, {"Events": {}, "ID": 8, "GroveName": "Grove-3Axis Compass", "Methods": {"read_compass_heading": {"heading_deg": "the angle of heading relative to the north, unit: degree", "@brief@": ""}}}, {"Events": {}, "ID": 9, "GroveName": "Grove-Digital Light", "Methods": {"read_lux": {"lux": "the strength of illumination, unit: lux", "@brief@": "Reading the lucency of visable light"}}}, {"Events": {}, "ID": 10, "GroveName": "Grove-Dry-Reed Relay", "Methods": {"read_onoff_status": {"@brief@": "Read back the status of relay\r", "onoff": "1: on/high, 0: off/low\r"}}}, {"Events": {}, "ID": 11, "GroveName": "Grove - Dust Sensor", "Methods": {"read_dust": {"dust": "dust concentration pcs/0.01cf.\r", "@brief@": "Read the concentration dust from the dust sensor.\r"}}}, {"Events": {}, "ID": 12, "GroveName": "Grove-EL Driver", "Methods": {"write_onoff": {"@brief@": "", "onoff": "1: on, 0: off\r"}, "read_onoff_status": {"@brief@": "Read back the status of el wire\r", "onoff": "1: on/high, 0: off/low\r"}}}, {"Events": {}, "ID": 13, "GroveName": "Grove-Electromagnet", "Methods": {"write_onoff": {"@brief@": "", "onoff": "1: on/generate electromagnetism, 0: off\r"}, "read_onoff_status": {"@brief@": "Read back the status of relay\r", "onoff": "1: on/high, 0: off/low\r"}}}, {"Events": {"encoder_position": "Report the current position when the knob idles for 100ms. The event data is the current position.\n<br>\nPLEASE NOTE: To use the encoder, you need either using battery to power the board or manually soldering to short R1 of Grove-Encoder.\nThis is due to the RX pin of UART interface is pulled up to CP2102's TX pin with a 1K resister and R1 on encoder board\nwith the value 3.3K will obstruct the encoder to correctly pull down the signal A pin."}, "ID": 14, "GroveName": "Grove - Encoder", "Methods": {"write_enable_acceleration": {"enable": "1: enable acceleration, 0: disable", "@brief@": "Enable or disable the acceleration feature of the step counting."}, "write_reset_position": {"position": "", "@brief@": "Reset the position to a specified number."}, "read_position": {"position": "", "@brief@": "Read the position of the encoder. The position can be positive or negative number.\nThe position increases when rotate clockwise and decreases when rotate anti-clockwise. <br>\n<br>\nPLEASE NOTE: To use the encoder, you need either using battery to power the board or manually soldering to short R1 of Grove-Encoder.\nThis is due to the RX pin of UART interface is pulled up to CP2102's TX pin with a 1K resister and R1 on encoder board\nwith the value 3.3K will obstruct the encoder to correctly pull down the signal A pin."}}}, {"Events": {"fire": "This is the description for event 'fire'\r\nMultipul lines are allowed.\r", "event2": "This is the description for event 'event2'\r\nMultipul lines are allowed.\r"}, "ID": 15, "GroveName": "Grove_Example", "Methods": {"read_temp": {"temp": "desc for this variable\r", "@brief@": "This is the comment for read_temp, with the format showed here\r\nMultipul lines are allowed.\r"}, "write_acc_mode": {"mode": "desc for param mode\r", "@brief@": "This is the description for write_acc_mode.\r"}}}, {"Events": {}, "ID": 16, "GroveName": "Generic Analog Input", "Methods": {"read_analog": {"analog": "The measurement of ADC, 0~1023\r", "@brief@": "Read the ADC measurement of a generic analog device. The full range is 0~1023.\r"}, "read_voltage": {"volt": "unit: V\r", "@brief@": "Read the voltage of the measuring point.\r"}}}, {"Events": {"input_changed": "From \"Generic Digital Input\", triggered when the state of the PIN changed.\r\nEvent data is the number of the PIN to which the grove is attached\r", "input_fall": "From \"Generic Digital Input\", triggered when the level of the PIN fell.\r", "input_rise": "From \"Generic Digital Input\", triggered when the level of the PIN rised.\r"}, "ID": 17, "GroveName": "Generic Digital Input", "Methods": {"read_edge_fall_since_last_read": {"@brief@": "Read the count of falling edges since last read.\r", "falls": "the count of falling edges\r"}, "read_edge_rise_since_last_read": {"rises": "the count of rising edges\r", "@brief@": "Read the count of rising edges since last read.\r"}, "read_input": {"input": "1: on, 0: off\r", "@brief@": "Read the input state of a generic digital input device\r"}}}, {"Events": {}, "ID": 18, "GroveName": "Generic Digital Output", "Methods": {"write_onoff": {"@brief@": "Control a generic digital output by writing 1 to pull it high and 0 to pull it low.\r", "onoff": "1: on/pull high, 0: off/pull low\r"}, "read_onoff_status": {"@brief@": "Read back the status of this io\r", "onoff": "1: on/high, 0: off/low\r"}, "write_high_pulse": {"ms": "milliseconds\r", "@brief@": "Output a high pulse in milliseconds\r"}, "write_low_pulse": {"ms": "milliseconds\r", "@brief@": "Output a low pulse in milliseconds\r"}}}, {"Events": {}, "ID": 19, "GroveName": "Generic PWM/Analog Output", "Methods": {"read_pwm": {"freq": "unit: Hz\r", "duty_percent": "0.0~100.0, float number\r", "@brief@": "Read back the parameters of PWM.\r"}, "write_pwm_with_freq": {"freq": "unit: Hz\r", "duty_percent": "0.0~100.0, float number\r", "@brief@": "Output a PWM wave on speicfied IO with specified frequency.\r"}, "write_pwm": {"duty_percent": "0.0~100.0, float number\r", "@brief@": "Output a PWM wave on specified IO. The default frequency is 1K Hz.\r"}}}, {"Events": {"uart_rx": "This event reports the message received from the UART port."}, "ID": 20, "GroveName": "Generic UART", "Methods": {"write_base64_string": {"b64_str": "the base64 encoded string", "@brief@": "Send base64 encoded string, with this method you can send chars like carriage return or\nURL special chars."}, "write_baudrate": {"index": "0:9600(default), 1:19200, 2:38400, 3:57600, 4:115200", "@brief@": "Change the baudrate of UART."}, "write_string": {"str": "the string, must not have URL special chars.", "@brief@": "Send a string to the UART port. URL special chars must be escaped."}}}, {"Events": {"gesture": "An event occurred when guesture detected."}, "ID": 21, "GroveName": "Grove - Gesture v1.0", "Methods": {"read_motion": {"motion": "1-right, 2-left, 3-up, 4-down, 5-forward, 6-backward, 7-clockwise, 8-countclockwise, 255-sensor initialization fail", "@brief@": "Read the motion code. The upper direction is the one in which you read the silk-screen \"U1\"."}}}, {"Events": {}, "ID": 22, "GroveName": "Grove-3-Axis Digital Gyro", "Methods": {"read_temperature": {"temp": "unit: Celsius degree", "@brief@": ""}, "write_zerocalibrate": {"@brief@": "Calibrate the static offsets, need to hold the sensor steadily."}, "read_gyro": {"@brief@": "", "gz": "unit: deg/s", "gy": "unit: deg/s", "gx": "unit: deg/s"}}}, {"Events": {"state_off": "From \"Grove - Hall Sensor\", triggered when magnetic field disappears.\r", "state_on": "From \"Grove - Hall Sensor\", triggered when magnetic field being perpendicular to the Hall sensor.\r\nEvent data is the number of the PIN to which the grove is attached\r"}, "ID": 23, "GroveName": "Grove - Hall Sensor", "Methods": {"read_vout": {"vout": "1: on, 0: off\r", "@brief@": "Read the state of the VOUT pin of this sensor.\r"}}}, {"Events": {}, "ID": 24, "GroveName": "Grove - I2C ADC", "Methods": {"read_voltage": {"volt": "unit: volt", "@brief@": "Read the voltage which is calculated against ref voltage 3.3V"}, "read_adc": {"adc_reading": "12bit adc result, max 2048 as the voltage-dividing", "@brief@": "Read the 12bit value from ADC."}}}, {"Events": {}, "ID": 25, "GroveName": "Grove - I2C FM Receiver", "Methods": {"write_mute": {"@brief@": "Toggle mute on or off.", "mute": "1: on, 0: off"}, "read_signal_level": {"rssi": "int", "@brief@": "Read current signal level."}, "read_mute_status": {"muted": "1: on, 0: off", "@brief@": "Read current mute setting."}, "read_frequency": {"frequency": "", "@brief@": "Read current frequency setting."}, "read_volume": {"@brief@": "Read current volume level setting.", "level": "0 - 15"}, "write_frequency": {"frequency": "", "@brief@": "Read current frequency setting."}, "write_volume": {"@brief@": "Set volume level.", "level": "0 - 15"}}}, {"Events": {}, "ID": 26, "GroveName": "Grove-I2C Motor Driver", "Methods": {"write_i2c_address": {"addr_7bits": "the new 7bits i2c address\r", "@brief@": "Change ths default I2C address, the default address is 0xf\r"}, "write_stepper_steps": {"steps": "number of steps to move\r", "@brief@": "Drive the stepper to move a few steps. To let the stepper rotate forever, steps = 255.\r\nIMPORTANT: Need I2C Motor Driver hardware version >= v1.3 and manually update the firmware according to the\r\nguide inside this zip file: http://www.seeedstudio.com/wiki/images/5/52/On-Chipfirmware_for_Motor_driver.zip\r"}, "write_enable_stepper_mode": {"direction": "stepper direction, 0 or 1\r", "speed": "defines the time interval the i2C motor driver change its output to drive the stepper, the actul interval time is : motorspeed * 4ms. that is , when motor speed is 10, the interval time would be 40 ms\r", "@brief@": "To drive a stepper motor, we need to change the working mode of this driver into stepper mode.\r\nIMPORTANT: Need I2C Motor Driver hardware version >= v1.3 and manually update the firmware according to the\r\nguide inside this zip file: http://www.seeedstudio.com/wiki/images/5/52/On-Chipfirmware_for_Motor_driver.zip\r\n4ms. that is , when motor speed is 10, the interval time would be 40 ms\r"}, "write_disable_stepper_mode": {"@brief@": "Disable the stepper driving mode, back to default DC motor driving mode\r"}, "write_dcmotor_speed": {"speed_m2": "0~255\r", "speed_m1": "0~255\r", "@brief@": "Change the speed of DC motor, note that the initial speed is 0 when the module is powered on.\r"}}}, {"Events": {"ir_approached": "Triggered when IR object approach the sensor.\r"}, "ID": 27, "GroveName": "Grove-IR Distance Interrupter", "Methods": {"read_approach": {"approach": "1: something approached 0: not\r", "@brief@": "Read the status if a object is approaching the sensor.\r"}}}, {"Events": {}, "ID": 28, "GroveName": "Grove - Infrared Emitter", "Methods": {"write_data_hex": {"data_hex": "a string in hex format, e.g. FFBBCC0011", "@brief@": "Send a sequence of data with the emitter, using frequency 38KHz."}, "read_protocal_parameters": {"start_l": "the length of start low signal", "@brief@": "Read the parameters of the IR protocol(NEC).", "n_short": "the length of short signal", "start_h": "the length of start high signal", "n_long": "the length of long signal"}, "write_protocol_parameters": {"start_l": "the length of start low signal", "@brief@": "Set the protocol parameters. Please don't modify this only if you know what it is.", "n_short": "the length of short signal", "start_h": "the length of start high signal", "n_long": "the length of long signal"}, "write_data_hex_in_freq": {"data_hex": "a string in hex format, e.g. FFBBCC0011", "freq_khz": "the frequency of the IR carrier wave, unit KHz.", "@brief@": "Send a sequence of data with the emitter, using a specified frequency."}}}, {"Events": {"ir_recv_data_hex": "An event which reports the data sequence IR Receiver has received, in HEX string.\r", "ir_recv_data_len": "An event which indicates the length of data IR Receiver has received.\r"}, "ID": 29, "GroveName": "Grove - Infrared Receiver", "Methods": {"read_protocol_parameters": {"start_l": "the length of start low signal\r", "@brief@": "Read the parameters of the IR protocol(NEC).\r", "n_short": "the length of short signal\r", "start_h": "the length of start high signal\r", "n_long": "the length of long signal\r"}, "read_last_data_recved": {"data": "a string in hex format, e.g. FFBBCC0011\r", "len": "the number of bytes\r", "@brief@": "Read the last IR data received. The data will be cleared after this read.\r"}}}, {"Events": {}, "ID": 30, "GroveName": "Grove - LCD RGB Backlight", "Methods": {"write_display_off": {"@brief@": "[Please notice that you must jump VCC of Grove-LCD to a 5V voltage]"}, "write_clear": {"@brief@": "[Please notice that you must jump VCC of Grove-LCD to 5V]\nClear the whole screen."}, "write_float": {"decimal": "the decimal bits", "f": "float number", "col": "0~15", "@brief@": "[Please notice that you must jump VCC of Grove-LCD to 5V]\nvoltage] Print a float number.", "row": "0~1"}, "write_backlight_color_rgb": {"@brief@": "[Please notice that you must jump VCC of Grove-LCD to 5V]\nSet the RGB color for the backlight.", "brightness": "0~255"}, "write_base64_string": {"b64_str": "base64 encoded string, the max length is 256", "col": "0~15", "@brief@": "[Please notice that you must jump VCC of Grove-LCD to 5V]\nPrint a multiline string encoded in base64. Special chars is supported.", "row": "0~7"}, "write_scroll_right": {"speed": "1~10, 10 is the fastest", "@brief@": "[Please notice that you must jump VCC of Grove-LCD to 5V]\nLet the specified rows to scroll right horizontally"}, "write_scroll_left": {"speed": "1~10, 10 is the fastest", "@brief@": "[Please notice that you must jump VCC of Grove-LCD to 5V]\nLet the specified rows to scroll left horizontally."}, "write_string": {"@brief@": "[Please notice that you must jump VCC of Grove-LCD to 5V]\nPrint a string in one line.\nNote that the char must be letter or number, special chars\nmay be ignored. To display multilines and special chars,\nplease use base64_string API.", "col": "0~15", "str": "the string to display", "row": "0~1"}, "write_integer": {"i": "the integer to display", "@brief@": "[Please notice that you must jump VCC of Grove-LCD to 5V]\nPrint a integer.", "col": "0~15", "row": "0~1"}, "write_display_on": {"@brief@": "[Please notice that you must jump VCC of Grove-LCD to a 5V voltage]"}, "write_backlight_color": {"@brief@": "[Please notice that you must jump VCC of Grove-LCD to 5V]", "color_index": "0: white, 1: red, 2: green, 3: blue"}, "write_stop_scroll": {"@brief@": "[Please notice that you must jump VCC of Grove-LCD to 5V]\nStop all scrolling rows."}}}, {"Events": {}, "ID": 31, "GroveName": "Grove - LED Bar", "Methods": {"write_level": {"@brief@": "Display a level", "level": "0~10, the decimal part will control the brightness of the last led, e.g. 9.5 will cause the 10th led light up in half brightness."}, "write_single_led": {"@brief@": "Control a single led with brightness", "led": "the index, 1~10", "brightness": "0.0~1.0, 1.0 is the brightest, 0.0 let this led off"}, "write_bits": {"bits": "each bit controls the led in that bit mask, bit value 0: off, bit value 1: on", "@brief@": "Control the leds with the bit mask of a uint16_t integer number"}, "read_bits": {"bits": "each bit indicates the led status in that bit mask, bit value 0: off, bit value 1: on", "@brief@": "Read the states of each led, return bit mask of a uint16_t integer number."}, "write_toggle": {"led": "the index, 1~10", "@brief@": "Toggle a single led on or off."}, "write_orientation": {"green_to_red": "1: green to red 0: red to green", "@brief@": "Change the orientation of the level display"}}}, {"Events": {}, "ID": 32, "GroveName": "Grove-WS2812 LED Strip 60", "Methods": {"write_clear": {"@brief@": "Set or reset or clear the led strip with a specified color.", "total_led_cnt": "the total count of this strip, max: 60(too many leds will cause the power unstable)", "rgb_hex_string": "a rgb value in hex format, e.g. AA55CC (without # or 0x)"}, "write_start_rainbow_flow": {"length": "the length of the flow, the flow will always begin with index 0.", "@brief@": "Make the strip blink in a rainbow flow", "speed": "1~10, 10 is the fastest.", "brightness": "0~100"}, "write_segment": {"start": "the start index of the segment(included)", "@brief@": "Change the color of some piece of segment of the led strip.\nWe need to specify a list of rgb hex value concatinated into a string.\nThe segment will be defined with a start index and the length.\nThe length equals rgb_hex_string's length / 6.", "rgb_hex_string": "a list of rgb hex value, e.g. FFFFFFBBBBBBCCCCCC000000111111, max length: 240 or 40 rgb hex"}, "write_stop_rainbow_flow": {"@brief@": "Stop the rainbow flow."}}}, {"Events": {}, "ID": 33, "GroveName": "Grove - Loudness Sensor", "Methods": {"read_loudness": {"uv_index": "UV Index", "@brief@": "Read intensity of ultraviolet(UV) radiation."}}}, {"Events": {}, "ID": 34, "GroveName": "Grove - Luminance Sensor", "Methods": {"read_luminance": {"lux": "light intensity", "@brief@": "Read the intensity of the ambient light."}}}, {"Events": {"mag_approached": "From \"Grove-Magnetic Switch\", triggered when magnet approached.\r\nEvent data is the number of the PIN to which the grove is attached\r"}, "ID": 35, "GroveName": "Grove-Magnetic Switch", "Methods": {"read_approach": {"approach": "1: magnet approached 0: not\r", "@brief@": "Read the status if a magnet is approaching the sensor.\r"}}}, {"Events": {}, "ID": 36, "GroveName": "Grove-Moisture", "Methods": {"read_moisture": {"moisture": "analog value, range: 0~1023", "@brief@": ""}}}, {"Events": {}, "ID": 37, "GroveName": "Grove - MP3 v2.0", "Methods": {"write_index_to_play": {"index": "1~n", "@brief@": "Play a music specified by its index."}, "write_loop_all": {"@brief@": "Loop playing all the musics in the SD card."}, "write_volume": {"volume": "0~31", "@brief@": "Tune the volume."}}}, {"Events": {}, "ID": 38, "GroveName": "Grove-Multichannel Gas Sensor", "Methods": {"read_CO": {"concentration_ppm": "the concentration of CO gas, unit: ppm", "@brief@": "Read the concentration of CO gas with unit ppm."}}}, {"Events": {}, "ID": 39, "GroveName": "Grove - OLED Display 0.96''", "Methods": {"write_clear": {"@brief@": "Clear the whole screen"}, "write_float": {"decimal": "the decimal bits", "f": "float number", "col": "0~15", "@brief@": "Print a float number", "row": "0~7"}, "write_base64_string": {"b64_str": "base64 encoded string, the max length is 256", "col": "0~15", "@brief@": "Print a multiline string encoded in base64.\nSpecial chars is supported.", "row": "0~7"}, "write_scroll_right": {"end_row": "lower row index (closed range), 0~7, must be greater or equal start_row.", "start_row": "upper row index, 0~7", "speed": "0~255", "@brief@": "Let the specified rows to scroll right horizontally"}, "write_scroll_left": {"end_row": "lower row index (closed range), 0~7, must be greater or equal start_row.", "start_row": "upper row index, 0~7", "speed": "0~255", "@brief@": "Let the specified rows to scroll left horizontally"}, "write_string": {"@brief@": "Print a string in one line.\nNote that the char must be letter or number, special chars may be ignored.\nTo display multilines and special chars, please use base64_string API.", "col": "0~15", "str": "the string to display", "row": "0~7"}, "write_integer": {"i": "the integer to display", "@brief@": "Print a integer", "col": "0~15", "row": "0~7"}, "write_rotate_display": {"rotate_or_not": "1: inverse(white background), 0: normal(black background)", "@brief@": "Set the screen to display in inverse mode."}, "write_brightness": {"@brief@": "Set the brightness for the screen", "brightness": "0~255"}, "write_inverse_display": {"inverse_or_not": "1: inverse(white background), 0: normal(black background)", "@brief@": "Set the screen to display in inverse mode."}, "write_stop_scroll": {"@brief@": "Stop all scrolling rows."}}}, {"Events": {}, "ID": 40, "GroveName": "Grove - OLED Display 1.12''", "Methods": {"write_clear": {"@brief@": "Clear the whole screen"}, "write_float": {"decimal": "the decimal bits", "f": "float number", "col": "0~11", "@brief@": "Print a float number", "row": "0~11"}, "write_base64_string": {"b64_str": "base64 encoded string, the max length is 256", "col": "0~11", "@brief@": "Print a multiline string encoded in base64.\nSpecial chars is supported.", "row": "0~11"}, "write_scroll_right": {"end_row": "lower row index (closed range), 0~11, must be greater or equal start_row.", "start_row": "upper row index, 0~11", "speed": "0~255", "@brief@": "Let the specified rows to scroll right horizontally"}, "write_scroll_left": {"end_row": "lower row index (closed range), 0~11, must be greater or equal start_row.", "start_row": "upper row index, 0~11", "speed": "0~255", "@brief@": "Let the specified rows to scroll left horizontally"}, "write_string": {"@brief@": "Print a string in one line.\nNote that the char must be letter or number, special chars may be ignored.\nTo display multilines and special chars, please use base64_string API.", "col": "0~11", "str": "the string to display", "row": "0~11"}, "write_integer": {"i": "the integer to display", "@brief@": "Print a integer", "col": "0~11", "row": "0~11"}, "write_brightness": {"@brief@": "Set the brightness for the screen", "brightness": "0~255"}, "write_inverse_display": {"inverse_or_not": "1: inverse(white background), 0: normal(black background)", "@brief@": "Set the screen to display in inverse mode."}, "write_stop_scroll": {"@brief@": "Stop all scrolling rows."}}}, {"Events": {"ir_moved": "From \"Grove-PIR Motion Sensor\", triggered when IR object moved around.\r\nEvent data is the number of the PIN to which the grove is attached\r"}, "ID": 41, "GroveName": "Grove-PIR Motion Sensor", "Methods": {"read_approach": {"approach": "1: IR object approached, 0: no IR object approached\r", "@brief@": "Detect the motion of IR object\r"}}}, {"Events": {}, "ID": 42, "GroveName": "Grove-Recorder", "Methods": {"write_play_once": {"@brief@": "Play the sound which is recorded once.\r"}}}, {"Events": {}, "ID": 43, "GroveName": "Grove-Relay", "Methods": {"write_onoff": {"@brief@": "", "onoff": "1: on, 0: off\r"}, "read_onoff_status": {"@brief@": "Read back the status of relay\r", "onoff": "1: on/high, 0: off/low\r"}}}, {"Events": {}, "ID": 44, "GroveName": "Grove-Rotary Angle Sensor", "Methods": {}}, {"Events": {}, "ID": 45, "GroveName": "Grove-Servo", "Methods": {"write_angle": {"degree": "the angle in unit degress", "@brief@": "Drive the servo to rotate a specified angle and hold on the servo driven PWM signal. <br>\nThe PWM signal maybe polluted by other PWM API calls if the others use different frequency. <br>\ne.g. Grove - Infrared Emitter may affect the action of servo as it's using 38KHz PWM."}, "write_angle_motion_in_seconds": {"seconds": "the duration of the motion", "degree": "the angle in unit degress", "@brief@": "Drive the servo to rotate a specified angle and shut down the servo driven PWM signal in specified seconds time. <br>\nFor normal servos, this API still works even if the PWM signal is off. But the servo losts the strength that holding the position. <br>\nThis API will avoid the servo from the influence of other PWM modules, e.g. Grove - Infrared Emitter"}, "read_angle": {"degree": "the angle in unit degress", "@brief@": "Read back the angle of this servo"}}}, {"Events": {}, "ID": 46, "GroveName": "Grove-Slide-Potentiometer", "Methods": {"read_analog": {"analog": "The measurement of ADC, 0~1023", "@brief@": "Read the ADC measurement of a generic analog device. The full range is 0~1023."}, "read_voltage": {"volt": "unit: V", "@brief@": "Read the voltage of the measuring point."}}}, {"Events": {}, "ID": 47, "GroveName": "Grove-Solid State Relay", "Methods": {"read_onoff_status": {"@brief@": "Read back the status of relay\r", "onoff": "1: on/high, 0: off/low\r"}}}, {"Events": {}, "ID": 48, "GroveName": "Grove - Sound Sensor", "Methods": {"read_sound_level": {"sound_level": "sound strength", "@brief@": "Read the sound strength of the environment."}}}, {"Events": {}, "ID": 49, "GroveName": "Grove - SPDT Relay(30A)", "Methods": {"read_onoff_status": {"@brief@": "Read back the status of relay", "onoff": "1: on/high, 0: off/low"}}}, {"Events": {}, "ID": 50, "GroveName": "Grove-Speaker", "Methods": {"write_sound_ms": {"duration_ms": "a duration of x microseconds during which the speaker will produce the sound", "freq": "Hz", "@brief@": ""}, "write_sound_start": {"freq": "Hz", "@brief@": "Start to produce sound with a specified frequency, and wont stop until you send the sound_stop command."}}}, {"Events": {}, "ID": 51, "GroveName": "Grove - Sunlight Sensor", "Methods": {"read_visiblelight": {"VL": "unit: Lumen\r", "@brief@": "Read visible light\r"}, "read_IR": {"IR": "unit: Lumen\r", "@brief@": "Read IR Value\r"}, "read_UV": {"UV": "unit: UV index\r", "@brief@": "Read current level of UV\r"}}}, {"Events": {}, "ID": 52, "GroveName": "Grove - Temperature Sensor", "Methods": {"read_temp": {"temperature": "celsius degree with an accuracy of 1.5\u00b0C .\r", "@brief@": "Read the celsius temperature from the temperature sensor.\r"}}}, {"Events": {}, "ID": 53, "GroveName": "Grove-Temperature&Humidity", "Methods": {"read_humidity": {"@brief@": "The basic temperature and humidity sensor will update the reading every 2 seconds.", "humidity": "0~100(%)"}, "read_temperature": {"celsius_degree": "unit: Celsius degree", "@brief@": "The basic temperature and humidity sensor will update the reading every 2 seconds."}, "read_temperature_f": {"fahrenheit_degree": "Fahrenheit degree", "@brief@": "The basic temperature and humidity sensor will update the reading every 2 seconds."}}}, {"Events": {}, "ID": 54, "GroveName": "Grove-Temperature&Humidity Pro", "Methods": {"read_humidity": {"@brief@": "", "humidity": "0~100(%)"}, "read_temperature": {"celsius_degree": "unit: Celsius degree", "@brief@": ""}, "read_temperature_f": {"fahrenheit_degree": "Fahrenheit degree", "@brief@": ""}}}, {"Events": {}, "ID": 55, "GroveName": "Grove - Temp&Humi&Barometer Sensor (BME280)", "Methods": {"read_humidity": {"@brief@": "", "humidity": "unit: %"}, "read_temperature": {"temperature": "unit: Celsius degree", "@brief@": "Read the temperature value of the envirenment"}, "read_altitude": {"altitude": "the absolute altitude, unit: m", "@brief@": ""}, "read_pressure": {"pressure": "unit: Pa", "@brief@": ""}}}, {"Events": {}, "ID": 56, "GroveName": "Grove - Ultrasonic Ranger", "Methods": {"read_range_in_inch": {"range_cm": "unit: inch\r", "@brief@": "Get the range / distance between sensor and object.\r"}, "read_range_in_cm": {"range_cm": "unit: cm\r", "@brief@": "Get the range / distance between sensor and object.\r"}}}, {"Events": {}, "ID": 57, "GroveName": "Grove - UV Sensor", "Methods": {"read_uv_index": {"uv_index": "UV Index", "@brief@": "Read intensity of ultraviolet(UV) radiation."}}}, {"Events": {}, "ID": 58, "GroveName": "Grove - Voltage Divider", "Methods": {"read_voltage_x3": {"volt": "unit: V\r", "@brief@": "Read the voltage of the input with gain 3.\r"}, "read_voltage_x10": {"volt": "unit: V\r", "@brief@": "Read the voltage of the input with gain 10.\r"}}}]