GithubHelp home page GithubHelp logo

Comments (3)

sbruder avatar sbruder commented on May 9, 2024

I think it works with
-rt "The time is $(date +%H:%M)"
on bash (default shell on raspbian), mksh and zsh, but if you use another shell it may not work correctly. For live time output use -ctl controlfile and write it with a command in this file.
See also "Changing PS, RT and TA at run-time" in README.md
It should look like this:
mkfifo pifm_pipe
sudo ./pi_fm_rds -ctl pifm_pipe sound.wav
in another terminal:
cat > pifm_pipe << EOF
RT The time is $(date +%H:%M)
EOF
(repeat the last step ever when you want an update of the time or use a while-loop (while sleep 60;do
cat > ... << EOF
...
EOF
done))

from pifmrds.

danielmoore123 avatar danielmoore123 commented on May 9, 2024

It works well but it doesn't change by itself.... I have a -ctl already but wish for the time to update itself without human intervention so basically, -rt "Station1 - The time is $time" and the time be changing automatically on the radiotext.... is that possible without making another -ctl?
I have an sh scrip running it, it's contents is:
`#!/bin/sh

FX='equalizer 100 50 -10 equalizer 5k 2k 0.5 compand 0.3,1 6:-70,-60,-20 -5 -65$
FREQ='107.0'
CLOCK=$(date +%H:%M)

while [ 1 ]
do
sox -V3 -t mp3 http://playout-pc:8000/feed1 -t wav - $FX | ./pi_fm_rds -freq $FREQ -pi FFFF -ps "Station1" -ctl rds_ctl -rt "It's $CLOCK - You are listening to Station1" -audio -
done
`

from pifmrds.

sbruder avatar sbruder commented on May 9, 2024

It doesn't work in one script, you must run in another terminal this script:
#!/bin/sh
while sleep 60;do
cat > rds_ctl << EOF
RT $(date +%H:%M)
EOF
done
It updates your clock forever all 60 seconds.

from pifmrds.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.