Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- peripheral.find("modem", rednet.open)
- local protocol = "red-fm"
- print(protocol.." > Synchronisé")
- local function getAudioContent(path)
- print("Chargement et envoi du fichier "..path)
- local file = fs.open(path, "rb")
- local audioContent = file.readAll()
- file.close()
- return audioContent
- end
- print("Transmission aux postes d'écoutes")
- while true do
- rednet.broadcast(getAudioContent("red-fm-jingle.dfpwm"), protocol)
- sleep(11)
- rednet.broadcast(getAudioContent("advert"..math.random(1, 1)..".dfpwm"), protocol)
- sleep(11)
- rednet.broadcast(getAudioContent("red-fm-jingle.dfpwm"), protocol)
- sleep(11)
- rednet.broadcast(getAudioContent("music"..math.random(1, 1)..".dfpwm"), protocol)
- sleep(150)
- end
Add Comment
Please, Sign In to add comment