Jump to content
NX01

Pcduino V1 PWM problem

Recommended Posts

I am having trouble getting PWM to work on my pcduio. I have tried the python example code from spark fun(https://learn.sparkfun.com/tutorials/programming-the-pcduino#analog-input-and-output), but it returns an error. The sys/class/leds directory is empty. I have also tried replacing the pwm.ko file as described here and tried typing "sudo modprobe pwm" in to the terminal while it does not return any errors, it does not seem to do anything. 

 

I am running ubuntu 12.04

Share this post


Link to post
Share on other sites

When you execute "sudo modprobe pwm" does it return an error?

 

See if you have a directory "/sys/devices/virtual/misc/pwmtimer/" and that it is not empty after executing above command.

Share this post


Link to post
Share on other sites

Executing "sudo modprobe pwm" does not return an error and the "/sys/devices/virtual/misc/pwmtimer/" is full of files. However the python example code still does not work, is there something else I have to do or is there some updated example code.

 

Thank you for your help.

Share this post


Link to post
Share on other sites

Shortly after pcDuino 1 was release there was a change to the linux sysfs used for PWM. There are a lot of old "tutorials" out there that will not work with the current methods.

 

Please look at this discussion. I posted some python code that I use for PWM in post #6 that should point you in the right direction.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×