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



Recommended Posts


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!

Link to post
Share on other sites

Donate and support the project!

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: 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?

Link to post
Share on other sites

This topic is now closed to further replies.