fm_transmitter/README.md

45 wiersze
1.7 KiB
Markdown
Czysty Zwykły widok Historia

2015-03-30 23:17:34 +00:00
# fm_transmitter
2015-07-22 15:38:41 +00:00
2016-03-10 20:25:54 +00:00
Use Raspberry Pi as FM transmitter. Works on any RPi board.
2015-07-22 15:38:41 +00:00
2015-07-22 15:42:39 +00:00
This project uses the general clock output to produce frequency modulated radio communication. It is based on idea originaly posted here: [http://icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter](http://icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter), but does not use DMA controller in order to distribute samples to output (clock generator),so sound quality is worse as in PiFm project and only mono transmition is available but this makes possible to run it on all kind of boards.
2015-07-22 15:38:41 +00:00
## How to use it
To compile this project use commands below:
2015-08-07 04:39:55 +00:00
```
sudo apt-get install make gcc g++
make
```
2015-07-22 15:38:41 +00:00
Then you can use it by typing:
```
sudo ./fm_transmitter [-f frequency] [-r] filename
2015-07-22 15:38:41 +00:00
```
### WAVE Files
You can open WAVE (.wav) files or read audio data from stdin, i.e.:
2015-07-22 15:38:41 +00:00
```
sox star_wars.wav -r 22050 -c 1 -b 16 -t wav - | sudo ./fm_transmitter -f 100.6 -
```
### USB sound-card
To use a USB sound-card type this:
```
arecord -D hw:1,0 -c1 -d 0 -r 22050 -f S16_LE | sudo ./fm_transmitter -f 100.6 -
2015-07-22 15:38:41 +00:00
```
2016-09-08 18:23:07 +00:00
Some devices have problems with this command (there is a warning in the terminal like ``` buffer overflow ``` and after a few seconds - the transmitting gets slow and will stop), then you can use the following:
```
arecord -D plughw:1,0 -c1 -d 0 -r 22050 -f S16_LE | sudo ./fm_transmitter -f 100.6 -
```
2015-07-22 15:38:41 +00:00
## Law
2015-07-22 15:38:41 +00:00
Please keep in mind that transmitting on certain frequencies without special permissions may be illegal in your country.
## New features
2016-03-10 20:25:54 +00:00
* works on RPi 1, 2 and 3
2015-07-22 15:38:41 +00:00
* reads mono and stereo files
2015-07-30 09:13:57 +00:00
* reads data from stdin
2015-07-22 15:38:41 +00:00
* based on threads