I just got my Raspberry Pi 2 B (V1.1) and wanted to fool around with the Sunfounder starter kit a bit.

The "sunfounder kit" is a learning kit with a couple of electronic elements (bread-board, sensors, resistors, LEDs, ...) including a little booklet with example wirings.

The section about servos in the booklet, mentions a file in /sys/class/rpi-pwm. However, this file does not exist:

$ stat /sys/class/rpi-pwm
stat: cannot stat `/sys/class/rpi-pwm': No such file or directory

I assume this is a kernel module that needs to be loaded. But all I can find are resources about something called "occidentalis", which seems to be outdated info.

I have a default Raspbian Wheezy running.

Any ideas what I should look for?

  • 2
    What is this Sunfounder starter kit and what do you want to do? – joan Feb 18 '15 at 22:06
  • The kit is simply a beginner set with a set of electronic components and code-examples. I added a link to the one I bought to the post. I simply want to go through the booklet. In it, they don't say anything about the RPi setup. They simply open files in /sys/class/rpi-pwm and write into them. However, these files do not exist on my system. – exhuma Feb 19 '15 at 8:24

All the following is my opinion.

The rpi-pwm module seems to be special to the occidentalis distribution produced by (I think) Adafruit in the early days of the Raspberry Pi. At that time the hardware capabilities were not been used to the full and occidentalis was an attempt at exploiting some specialist underlying hardware.

Things have changed considerably over the years and the usefulness of occidentalis has faded and I believe it is now deprecated.

In this (slightly misleadingly named) thread Write floats to gpio I summarise the state of PWM on the Pi 2.

If you want to experiment with servos and general PWM I'd suggest my pigpio library is the most suitable at the moment.

| improve this answer | |
  • I gave pigpio a go and it worked straight out of the box. Thanks for the tip. – exhuma Feb 20 '15 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.