Running PiFm

82 views
Skip to first unread message

John Miller

unread,
May 24, 2017, 3:06:37 PM5/24/17
to ICRobotics
Hello! I am still getting used to Raspberry Pi. But, I have a breadboard hooked up via an Adafruit T-Cobbler, and have run a blink.py test, which has worked.


I have opened up a terminal, changed directory to Pifm, done sudo python and import PiFm, which worked.

Next is where I am having a problem, when I enter PiFm.play_sound("sound.wav"), I get this:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "PiFm.py", line 7, in play_sound
    call(["./pifm", filename])
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

If you could please help me with this, I would appreciate it.

Thank you!

For reference, here is the full list from my open terminal:

pi@raspberrypi:~ $ cd Pifm
pi@raspberrypi:~/Pifm $ sudo python
Python 2.7.9 (default, Sep 17 2016, 20:26:04) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PiFm
>>> PiFm.play_sound("sound.wav")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "PiFm.py", line 7, in play_sound
    call(["./pifm", filename])
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied
>>> 

John Miller
Raspbian Jessie with Pixel
Raspberry Pi 2 Model B

Oliver Mattos

unread,
May 24, 2017, 3:27:20 PM5/24/17
to ICRobotics

Sudo chmod +x pifm
Should fix that error

But...   I think pifm only works on the raspberry pi 1.  Pi2 and pi3 don't work, although I think there are forks of my project which do.

Hope that helps
Oliver


--
You received this message because you are subscribed to the Google Groups "ICRobotics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icrobotics+...@googlegroups.com.
To post to this group, send email to icrob...@googlegroups.com.
Visit this group at https://groups.google.com/group/icrobotics.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

John Miller

unread,
May 24, 2017, 7:21:04 PM5/24/17
to ICRobotics
Oliver,

Oh, okay. So, the original Raspberry Pi with the 26-pin GPIO is the only one this will run on?

If that is the case, do you know where to find those forks of your project that would run on a Raspberry Pi 2?

Thank you again for your help, and for creating this!

I was thinking of maybe getting a first-generation Pi, since they are still available through Canakit. I have a GPIO extension board that came in a prototyping kit that would work with the Pi 1. So, I could put that, and your original code to use!

John Miller
Raspbian Jessie with Pixel
Raspberry Pi 2 Model B

Oliver Mattos

unread,
May 25, 2017, 5:17:52 AM5/25/17
to ICRobotics

John Miller

unread,
May 25, 2017, 6:11:54 AM5/25/17
to ICRobotics
Thank you! Very cool. I will read through it.

I appreciate your help with this. I look forward to making a Pi FM Transmitter happen. :-)
Reply all
Reply to author
Forward
0 new messages