Orange Pi Zero PWM

Recommended Posts

Donate and support the project!


There is /dev/pwm in nanopi.
nanopi@nanopim1:~$ ls /dev/p*
/dev/ppp  /dev/psaux  /dev/ptmx  /dev/pwm
A sample code is here.


I'm trying to understand how you get from point A to point Z via that matrix repository at Github.  


That repository is intended "Nanopi2/Fire/M2" devices, yet the Orange Pi Zero is an Arm H2 device.  Remember the orange pi zero is listed as the topic for this posting.   Is the Orange Pi Zero Arm H2 really a Nanopi2 / Fire or M2 device?  How do you know that? Are these things the same? (I'd refer to the sheet at the matrix repository, but alas, that doesn't exist... sigh.)


Orange Pi Zero = Arm H2 Quad-core Cortex-A7 1.2Ghz.

Raspberry Pi Zero =A Broadcom BCM2835 application processor with 1GHz ARM11 core


(Note: no offense intended here..  I'm struggling to understand how to address the pins on the Orange Pi Zero, and I'm more than confused here...  Any hints or links to help gain and understanding? Many thanks --Zip)

Link to post
Share on other sites

how about software pwm? found this code in another site:


#include <wiringPi.h>

int main () {
  int t_on, t_off;
  int d, i;

  d= 100 ;

  t_on= 50 *d;
  t_off= 50 *( 100 -d);

  for (i= 10 ; i!= 0 ; i++) {
    digitalWrite( 1 , LOW);
    digitalWrite( 1 , HIGH);
  return ( 0 );
Link to post
Share on other sites
This topic is now closed to further replies.