Jump to content

Guide: Orange Pi Zero GPIOs


kasparsd

Recommended Posts

It took me a while to get this ILI9340 based LCD monitor working with the Orange Pi Zero until I found a post on this forum that explains how the H2+ ports are mapped to the GPIO numbers in the Linux kernel. So I built an online tool that does the math for you:

 

port-to-gpio-mapper-allwinner.png

 

Here is a map of all the Orange Pi Zero GPIO pins:

 

orange-pi-zero-gpio-pins-800x746.png

All the additional details are described in this blog post.

Link to comment
Share on other sites

Simple Python script :

import sys
import string

def convert(value):
	value = value.upper()
	alp = value[1]
	idx = string.ascii_uppercase.index(alp)
	num = int(value[2:], 10)
	res = idx * 32 + num
	return res

if __name__ == "__main__":
	args = sys.argv[1:]
	if not args:
		print("Usage: %s <pin>" % sys.argv[0])
		sys.exit(1)

	print("%d" % convert(args[0]))
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines