0

I'm trying to get my DC motor to work according to this tutorial from Adafruit:

I'm running Occidentalis v0.2 (from day 1, which was some 4 months ago) and never had a similar issue. This is the problem:

$ sudo ls /sys/class/rpi-pwm
ls: cannot access /sys/class/rpi-pwm: No such file or directory

Also:

$ ls -lR /sys/class | grep -c rpi-pwm
0

Seems PWM kernel module is not installed!? How come and how can I fix that, please?

1

I had the same problem after doing an update. The entire pwm and servo module has disappeared. Maybe because it is a kernel module and the update pulled in a new (non-occidentalis kernel).

Anyway, I fixed it by putting the old kernel back. You can find instructions on how to do that in the details page for Occicentalis v.02, last section at the bottom: Kernel Source.

Basically you need to download their Kernel+Modules tgz file, extract it and install it by copying the files:

  • tar -zxvf mykernel.tgz
  • sudo cp tmp/kernel.img /boot/
  • sudo cp -R tmp/modules/lib/* /lib/
  • rm -rf tmp

Then reboot and /sys/class/rpi-pwm should be present again.

  • Sounds sensible. I'll check it and let you know. – Saran Mar 18 '14 at 14:02
  • Great walkthrough, @Whiskey. New output: sudo ls /sys/class/rpi-pwm pwm0. Now I just have to remember what I needed that 4 months ago for ^_^ – Saran May 25 '14 at 15:00

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.