diff --git a/docs/en/uiflow/advanced.md b/docs/en/uiflow/advanced.md index 833bfa18..fa613736 100644 --- a/docs/en/uiflow/advanced.md +++ b/docs/en/uiflow/advanced.md @@ -227,4 +227,253 @@ Establish a point-to-point connection,Read the Message form other M5Stack > +# Easy I/O +__________________________ +#### Function Description + +>I/O pin configuration. + +> + +>* __analog read pin__ +Read pin analog value + +>* __analog write pin duty__ +Set duty cycle to the specified pin + +>* __digital read Value__ +Read pin digital value + +>* __digital toggle pin__ +Toggle pin value + +>* __map from low from high to low to high__ +Map values to a range proportionally + + +#### Instructions + +>Get the temperature value of the sensor to map the temperature to 0-100. + +> + + +# PIN +__________________________ + +#### Function Description + +>Pin custom configuration + +> + +>* __Init Pin mode Pull__ +Set pin mode + +>* __set HIGH__ +Set the pin high level + +>* __set LOW__ +Set the pin low level + +>* __Get Value__ +Get the value of pin + +>* __Set Value__ +Set the value of pin + + + +#### Instructions + +>Set pin 5 pull-up output high level + +> + + + +# PWM +__________________________ + +#### Function Description + +>PWM function setting + +> + +>* __Init in Pin freq duty use timer__ +Set channel pin frequency, duty cycle, and timer + +>* __set freq to__ +Change frequency + +>* __set duty to__ +Change duty cycle + +>* __Pause__ +Disable PWM function + +>* __Resume__ +Re-enable PWM function + + + +#### Instructions + +>Use the zero timer to set the PWM0 pin 25 frequency 500 duty cycle 50 +> + + + +# ADC +__________________________ + +#### Function Description + +>Analog to digital conversion + +> + +>* __Init in Pin__ +Set the sampling channel pin + +>* __set width__ +Set the sampling width + +>* __set atten__ +Set gain + +>* __read value__ +read ADC + + +#### Instructions + +>Sampling at 36 pins using the adc0 channel, reading the value + +> + + +# DAC +__________________________ + +#### Function Description + +>Digital to analog conversion + +> + +>* __Init in Pin__ +Set conversion channel + +>* __write value__ +Write da value + +>* __beep with freq duration scale__ +Set the buzzer frequency, time and range + +>* __waveform with freq type duration scale offset invert__ +Set the output waveform frequency amplitude offset + +>* __stop wave__ +stop output + +>* __set freq__ +set frequency + +#### Instructions + +>Output waveform on 25-pin using dac0 channel + +> + + + +# UART +__________________________ + +#### Function Description + +>Serial data transmission and reception + +> + +>* __set tx rx baud use uart__ +Set serial port pin and baud rate + +>* __read all__ +Read all data of serial port at one time + +>* __read characters__ +Read the specified amount of data + +>* __read line__ +Read data before \n + +>* __remain cache__ +Read buffer remaining data + +>* __write number in__ +Write numbers to the serial port + +>* __write a line in__ +Write a line to the serial port + +>* __write in__ +Write a string to the serial port + + +#### Instructions + +>Read serial data and send data to serial port + +> + + + +# I2C +__________________________ + +#### Function Description + +>set I2C port + +> + +>* __Master slave addr__ +Set the host interface and slave address + +>* __Set at sda scl slave addr__ +Custom SDA SCL and slave address + +>* __Write reg one byte__ +Write 1 byte of data to the register address + +>* __Write reg one short With encode__ +Big endian mode writes two bytes to the register address + +>* __Read reg one byte__ +Read a byte from the register address + +>* __Read reg one short with decode__ +Big endian mode reads two bytes from the register address + +>* __Read reg Read byte__ +Read several bytes from the register address + +>* __Read byte__ +Read byte + +>* __Available I2C address in list__ +Check if the I2C address is available + +>* __Scan I2C device__ +Scanning I2C devices + + +#### Instructions + +>Read data from I2C + +> \ No newline at end of file diff --git a/docs/image/Advanced module/ADC.png b/docs/image/Advanced module/ADC.png new file mode 100644 index 00000000..09375f53 Binary files /dev/null and b/docs/image/Advanced module/ADC.png differ diff --git a/docs/image/Advanced module/ADC_user.gif b/docs/image/Advanced module/ADC_user.gif new file mode 100644 index 00000000..47ffee57 Binary files /dev/null and b/docs/image/Advanced module/ADC_user.gif differ diff --git a/docs/image/Advanced module/DAC.png b/docs/image/Advanced module/DAC.png new file mode 100644 index 00000000..610078df Binary files /dev/null and b/docs/image/Advanced module/DAC.png differ diff --git a/docs/image/Advanced module/DAC_user.gif b/docs/image/Advanced module/DAC_user.gif new file mode 100644 index 00000000..71312e5e Binary files /dev/null and b/docs/image/Advanced module/DAC_user.gif differ diff --git a/docs/image/Advanced module/EasyIO.png b/docs/image/Advanced module/EasyIO.png new file mode 100644 index 00000000..0b869c4f Binary files /dev/null and b/docs/image/Advanced module/EasyIO.png differ diff --git a/docs/image/Advanced module/EasyIO_user.gif b/docs/image/Advanced module/EasyIO_user.gif new file mode 100644 index 00000000..b66ff9e5 Binary files /dev/null and b/docs/image/Advanced module/EasyIO_user.gif differ diff --git a/docs/image/Advanced module/Excute.png b/docs/image/Advanced module/Excute.png new file mode 100644 index 00000000..2970250c Binary files /dev/null and b/docs/image/Advanced module/Excute.png differ diff --git a/docs/image/Advanced module/I2C.png b/docs/image/Advanced module/I2C.png new file mode 100644 index 00000000..786186d9 Binary files /dev/null and b/docs/image/Advanced module/I2C.png differ diff --git a/docs/image/Advanced module/I2C_user.gif b/docs/image/Advanced module/I2C_user.gif new file mode 100644 index 00000000..dd26f4c6 Binary files /dev/null and b/docs/image/Advanced module/I2C_user.gif differ diff --git a/docs/image/Advanced module/PIN.png b/docs/image/Advanced module/PIN.png new file mode 100644 index 00000000..6fe7c7f4 Binary files /dev/null and b/docs/image/Advanced module/PIN.png differ diff --git a/docs/image/Advanced module/PIN_user.gif b/docs/image/Advanced module/PIN_user.gif new file mode 100644 index 00000000..e4788df5 Binary files /dev/null and b/docs/image/Advanced module/PIN_user.gif differ diff --git a/docs/image/Advanced module/PWM.png b/docs/image/Advanced module/PWM.png new file mode 100644 index 00000000..2ad15f88 Binary files /dev/null and b/docs/image/Advanced module/PWM.png differ diff --git a/docs/image/Advanced module/PWM_user.gif b/docs/image/Advanced module/PWM_user.gif new file mode 100644 index 00000000..02a00313 Binary files /dev/null and b/docs/image/Advanced module/PWM_user.gif differ diff --git a/docs/image/Advanced module/UART.png b/docs/image/Advanced module/UART.png new file mode 100644 index 00000000..f5dc0092 Binary files /dev/null and b/docs/image/Advanced module/UART.png differ diff --git a/docs/image/Advanced module/UART_user.gif b/docs/image/Advanced module/UART_user.gif new file mode 100644 index 00000000..6a2c827b Binary files /dev/null and b/docs/image/Advanced module/UART_user.gif differ diff --git a/docs/image/Hardwares/Power_user.gif b/docs/image/Hardwares/Power_user.gif index ab86af41..f554976e 100644 Binary files a/docs/image/Hardwares/Power_user.gif and b/docs/image/Hardwares/Power_user.gif differ diff --git a/docs/zh_CN/uiflow/advanced.md b/docs/zh_CN/uiflow/advanced.md index 6bd95dae..dd3b48ab 100644 --- a/docs/zh_CN/uiflow/advanced.md +++ b/docs/zh_CN/uiflow/advanced.md @@ -210,6 +210,11 @@ wifi重新连接 # P2P +__________________________ + +#### 功能说明 + +>设置点对点通信 >* __P2P Send To APIKey Msg__ 通过MQTT服务器验证APIKey发送消息实现点对点远程控制 @@ -223,7 +228,291 @@ wifi重新连接 > +# Easy I/O +__________________________ + +#### 功能说明 + +>I/O引脚配置 + +> + +>* __analog read pin__ +读取引脚模拟量 + +>* __analog write pin duty__ +设置引脚占空比 + +>* __digital read Value__ +读取引脚数字量 + +>* __digital toggle pin__ +切换引脚值 + +>* __map from low from high to low to high__ +将值进行区间映射 +#### Instructions +>将温度传感器的值映射到0-100区间 + +> + + +# PIN +__________________________ + +#### 功能说明 + +>引脚自定义配置 + +> + +>* __Init Pin mode Pull__ +设置引脚模式 + +>* __set HIGH__ +设置引脚高电平 + +>* __set LOW__ +设置引脚低电平 + +>* __Get Value__ +获取引脚值 + +>* __Set Value__ +设置引脚值 + + + +#### Instructions + +>设置引脚5上拉输出高电平 + +> + + + +# PWM +__________________________ + +#### 功能说明 + +>PWM功能设置 + +> + +>* __Init in Pin freq duty use timer__ +设置通道引脚频率、占空比和定时器 + +>* __set freq to__ +改变频率 + +>* __set duty to__ +改变占空比 + +>* __Pause__ +禁用PWM功能 + +>* __Resume__ +重新启用PWM功能 + + + +#### 使用说明 + +>使用0号定时器设置PWM0引脚25频率500占空比50 + +> + + +# ADC +__________________________ + +#### 功能说明 + +>模数转换 + +> + +>* __Init in Pin__ +设置采样通道引脚 + +>* __set width__ +设置采样宽度 + +>* __set atten__ +设置增益 + +>* __read value__ +读取adc + + +#### 使用说明 + +>使用adc0通道在36引脚进行采样,读取数值 + +> + + + +# DAC +__________________________ + +#### 功能说明 + +>数模转换 + +> + +>* __Init in Pin__ +设置转换通道 + +>* __write value__ +写入da值 + +>* __beep with freq duration scale__ +设置蜂鸣器频率,时间和振幅 + +>* __waveform with freq type duration scale offset invert__ +设置波形频率振幅偏移量 + +>* __stop wave__ +停止输出 + +>* __set freq__ +设置频率 + +#### 使用说明 + +>使用dac0通道在25引脚输出波形 + +> + + + +# UART +__________________________ + +#### 功能说明 + +>串口数据收发 + +> + +>* __set tx rx baud use uart__ +设置串口引脚和波特率 + +>* __read all__ +一次性读取串口全部数据 + +>* __read characters__ +读取指定数量的数据 + +>* __read line__ +读取\n前的数据 + +>* __remain cache__ +读取缓冲区剩余数据 + +>* __write number in__ +向串口写数字 + +>* __write a line in__ +向串口写一行字符串 + +>* __write in__ +向串口写字符串 + + + +#### 使用说明 + +>读取串口数据并向串口发送数据 + +> + + + +# DAC +__________________________ + +#### 功能说明 + +>数模转换 + +> + +>* __Init in Pin__ +设置转换通道 + +>* __write value__ +写入da值 + +>* __beep with freq duration scale__ +设置蜂鸣器频率,时间和振幅 + +>* __waveform with freq type duration scale offset invert__ +设置波形频率振幅偏移量 + +>* __stop wave__ +停止输出 + +>* __set freq__ +设置频率 + +#### 使用说明 + +>使用dac0通道在25引脚输出波形 + +> + + + +# I2C +__________________________ + +#### 功能说明 + +>I2C接口设置 + +> + +>* __Master slave addr__ +设置主机接口与从机地址 + +>* __Set at sda scl slave addr__ +自定义SDA SCL与从机地址 + +>* __Write reg one byte__ +向寄存器地址写1个字节数据 + +>* __Write reg one short With encode__ +大端模式向寄存器地址写两个字节 + +>* __Read reg one byte__ +从寄存器地址读取一个字节 + +>* __Read reg one short with decode__ +大端模式从寄存器地址读取两个字节 + +>* __Read reg Read byte__ +从寄存器地址读取若干字节 + +>* __Read byte__ +读取字节 + +>* __Available I2C address in list__ +检查I2C地址是否可用 + +>* __Scan I2C device__ +扫描I2C设备 + + +#### 使用说明 + +>从I2C读取数据 + +> \ No newline at end of file