近日购入一台RB962UiGS-5HacT2HnT(MikroTik hAP AC)。把玩之时我发现它有一个可编程蜂鸣器,可以发出20-20000Hz的声音。既然有这么好的一个功能,我们不妨来好好利用一下嘛。
Bilibili地址(受上传码率限制,质量糟糕)
首先,怎么让它发出一个音呢?命令很简单: :beep frequency=<频率> length=<持续时间(秒)> 。不过要注意:这个命令是异步的,且下一条会立即覆盖上一条。因此,每两个音之间得加一个延迟。
下面是老少咸宜的世界著名歌曲《小星星》的脚本。偷个懒用的十二平均律。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
:beep frequency=523 length=0.5 :delay 0.7 :beep frequency=523 length=0.5 :delay 0.7 :beep frequency=783 length=0.5 :delay 0.7 :beep frequency=783 length=0.5 :delay 0.7 :beep frequency=880 length=0.5 :delay 0.7 :beep frequency=880 length=0.5 :delay 0.7 :beep frequency=783 length=1.2 :delay 1.4 :beep frequency=698 length=0.5 :delay 0.7 :beep frequency=698 length=0.5 :delay 0.7 :beep frequency=659 length=0.5 :delay 0.7 :beep frequency=659 length=0.5 :delay 0.7 :beep frequency=587 length=0.5 :delay 0.7 :beep frequency=587 length=0.5 :delay 0.7 :beep frequency=523 length=1.2 :delay 1.4 :beep frequency=783 length=0.5 :delay 0.7 :beep frequency=783 length=0.5 :delay 0.7 :beep frequency=698 length=0.5 :delay 0.7 :beep frequency=698 length=0.5 :delay 0.7 :beep frequency=659 length=0.5 :delay 0.7 :beep frequency=659 length=0.5 :delay 0.7 :beep frequency=587 length=1.2 :delay 1.4 :beep frequency=783 length=0.5 :delay 0.7 :beep frequency=783 length=0.5 :delay 0.7 :beep frequency=698 length=0.5 :delay 0.7 :beep frequency=698 length=0.5 :delay 0.7 :beep frequency=659 length=0.5 :delay 0.7 :beep frequency=659 length=0.5 :delay 0.7 :beep frequency=587 length=1.2 :delay 1.4 :beep frequency=523 length=0.5 :delay 0.7 :beep frequency=523 length=0.5 :delay 0.7 :beep frequency=783 length=0.5 :delay 0.7 :beep frequency=783 length=0.5 :delay 0.7 :beep frequency=880 length=0.5 :delay 0.7 :beep frequency=880 length=0.5 :delay 0.7 :beep frequency=783 length=1.2 :delay 1.4 :beep frequency=698 length=0.5 :delay 0.7 :beep frequency=698 length=0.5 :delay 0.7 :beep frequency=659 length=0.5 :delay 0.7 :beep frequency=659 length=0.5 :delay 0.7 :beep frequency=587 length=0.5 :delay 0.7 :beep frequency=587 length=0.5 :delay 0.7 :beep frequency=523 length=1.2 :delay 1.4 |
保存时记得加上read权限(如图所示),再点击Run Script按钮就可以听到啦。
那么怎么做闹钟呢?这就要用到Scheduler功能了。举个例子,如果我们想要每天七点响起闹钟的话,就把Start Time设为07:00:00,Interval设为24:00:00。On Event填写刚才保存的脚本名字,同样给read权限。
感觉打开了新世界的大门呢!
没有视频差评
录了一个
哈哈,你的思路很另类啊 ,有点意思,我也是routeros的忠实爱好者。
不知道主板的驱动能力有多强,换个喇叭是否能发出更好的声音。