1

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?

Saran
  • 293
  • 3
  • 18

1 Answers1

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.

Whiskey
  • 126
  • 3