volume-系统音量
仅带喇叭的型号(例如X3、X5系列)支持
注意
设置volume时,会判断当前值与flash中保存的值是否一致,如果一致则不写入,如果不一致,则会写入flash中保存,因此修改volume值会消耗flash寿命
volume-示例1
1 //设置音量60%
2 volume=60

volume-示例2
1 //设置音量0%
2 volume=0

volume-示例3
1 //设置音量100%
2 volume=100

volume-示例4
1 //每次触发时音量+1%
2 volume++
3
4 //每次触发时音量+10%
5 volume+=10


volume-示例5
1 //每次触发时音量-1%
2 volume--
3
4 //每次触发时音量-10%
5 volume-=10


注意
仅x5 x3系列才支持,音量设置范围为0-100,每次设置会自动保存,断电后再开机依然有效。
音量设置过大导致供电不足可能会导致黑屏、重启等问题,此时应增大供电电流
参考
c语言示例:单片机通过串口控制串口屏音量
1 //音量设置为100%
2 printf("volume=100\xff\xff\xff");
volume-相关链接
volume-样例工程下载
演示工程下载链接: