I'm playing with my Raspberry Pi Zero, and I'm trying to automate an FM transmitter script.
You can run the script with sudo fm_transmitter -f [frequency] -r [.wav music file]
For example:
sudo fm_transmitter -f 103 -r star_wars.wav
My code:
musics[0] = "/home/pi/radio/fm/star_wars.wav"
sudo /home/pi/radio/fm/fm_transmitter -f 103 -r musics[0]
It gives me an error because it can't find musics[0]
.
What could be the problem here?
sh
script? Arrays are a Bash thing.music[0]
, is that an array?