Jump to content


Photo

Pcduino V1 PWM problem

pcduio v1 PWM

  • Please log in to reply
4 replies to this topic

#1 NX01

NX01

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 21 May 2015 - 04:00 AM

I am having trouble getting PWM to work on my pcduio. I have tried the python example code from spark fun(https://learn.sparkf...nput-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



#2 cwilt

cwilt

    Advanced Member

  • Members
  • PipPipPip
  • 1,012 posts

Posted 21 May 2015 - 11:04 AM

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.



#3 NX01

NX01

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 21 May 2015 - 02:18 PM

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.



#4 cwilt

cwilt

    Advanced Member

  • Members
  • PipPipPip
  • 1,012 posts

Posted 21 May 2015 - 04:37 PM

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.



#5 NX01

NX01

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 21 May 2015 - 05:30 PM

Thanks, that should help a lot.







Also tagged with one or more of these keywords: pcduio, v1, PWM

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users