fm_transmitter | Raspberry Pi as FM transmitter
kandi X-RAY | fm_transmitter Summary
kandi X-RAY | fm_transmitter Summary
Raspberry Pi as FM transmitter
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fm_transmitter
fm_transmitter Key Features
fm_transmitter Examples and Code Snippets
Community Discussions
Trending Discussions on fm_transmitter
QUESTION
i need to execute this two shell commands in my raspberry pi through a python code:
...ANSWER
Answered 2019-Jun-12 at 19:36import os
desktop = os.path.expanduser("~/Desktop")
script_path = os.path.join(desktop, 'fm_transmitter-master', 'PiStation.py')
song_path = os.path.join(desktop, 'fm_transmitter-master', 'syria.mp3')
subprocess.call('sudo python ' + script_path + ' -f 96 ' + song_path, shell=True)
QUESTION
I am a pipefitter working in a weld shop and need music as commercial radio is very repetitive. I went and bought a RPI3 and put Raspian Stretch Lite on it with the fm_transmitter program. I got the shell script far along enough that the radio works fine but sometimes I'll get a song to play again within a short time. This is just by chance as the RANDOM_FILE variable chooses from an entire directory. I have also gotten the script to log each song that is played in a text file. I would like to use tail and grep to search the text file for the current selected RANDOM_FILE and check if it is present within the last X number of songs in the log. I want the script to restart back at the top defining a new RANDOM_FILE if the RANDOM_FILE is present in the grep command. If it isn't present, I want the script to continue, allowing the RANDOM_FILE to play through the fm_transmitter program.
I would also like for someone to check that the string defining RANDOM_FILE is in fact, truly random and correct.
Below is the script in it's current form. I believe I am close, but am going wrong somewhere as I still am getting repeats. I need help with the "if" "then" "else" and "return" commands. I am hoping this is a quick and easy solution.
Thank you in advance to anyone that takes the time to help me out.
...ANSWER
Answered 2018-Feb-21 at 22:29The issue is in this statement:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fm_transmitter
-f frequency - Specifies the frequency in MHz, 100.0 by default if not passed
acoustic_guitar_duet.wav - Sample WAV file, you can use your own
-d dma_channel - Specifies the DMA channel to be used (0 by default), type 255 to disable DMA transfer, CPU will be used instead
-b bandwidth - Specifies the bandwidth in kHz, 100 by default
-r - Loops the playback
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page