Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Orange Pi Zero PWM

Featured Replies

I have some servo motor I would like to start but cannot find any info on how to do it. Is PWM available in Pi PC or Pi Zero?

 

Thanks

Edited by zador.blood.stained
Merged 2 threads with the same topic (Orange Pi Zero PWM)

 

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 readme.md 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)

yup. but I read somewhere that 4.9 kernel should have pwm support for h3/h2 devices.

It has the support, but it's not activated by default since hardware PWM is supported only on PA5 pin, which is used bt default serial console (UART0). So it requires some DT modifications which include moving default debug console to a different UART port.

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

 

#include <wiringPi.h>

int main () {
  wiringPiSetup();
  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);
    delayMicroseconds(t_on);
    digitalWrite( 1 , HIGH);
    delayMicroseconds(t_off);
  }
  return ( 0 );
}
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.