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.

How to control a simple dc motor with nanopi-m1 that has armbian 5.20?

Featured Replies

Hi

I have a nanopi-m1 board and connected a simple dc motor to GPIO15(pin10). I used this commands to run the mtor but nothing happend else making a folder named gpio15 in /sys/class/gpio path!

echo 15 > /sys/class/gpio/export 
echo out > /sys/class/gpio/gpio15/direction 
echo 1 > /sys/class/gpio/gpio15/value

Also I tried it with GPIO18 (pin12) and didn't work!




			

			
		
  • Author

No I didn't check voltage levels(I have no equipment at now) but my motor running with 3 to 5 volts and it works when I connect it to 3.3 or 5 volt pins.

 

I think the problem is in kernel and gpio drivers maybe!

  • Author

Very thank you guys, specially zador.blood.stained

The key of problem was this:

Also physical pin 10 is GPIO G7 which would be pin 199 for sysfs interface.

 

 

I thought(as they say in their advertise) the GPIO pins are same as what they are in raspberryPi3 but they are completely different! and it was the problem! and wasting time for 3 days!

 

Anyway, I am trying to connect a LCD to my board(as you can see here: https://github.com/notro/fbtft/issues/428)and when I changed the pins from 25->1 , 24-> 201, 18->6, in this command:

sudo modprobe fbtft_device custom name=fb_ili9341 gpios=reset:1,dc:201,led:6 speed=16000000 rotate=90 bgr=1

My problem changed from error -22(unknow device)  to error -16(Device or resource busy).

[ 1627.047442] fb_ili9341: probe of spi0.0 failed with error -16

So what I get this error and how can I fix this error?

  • Author

The problem solved when I commented this line

#gpio_sunxi 

in

 /etc/modules 

file. (I had un-commented it before)

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.