12-31-2015, 04:31 AM
Hi,
will we able to use gpio ports via web pages stored in a web server running on the pine A64+?
will we able to use gpio ports via web pages stored in a web server running on the pine A64+?
Questions about GPIO
|
12-31-2015, 04:31 AM
Hi,
will we able to use gpio ports via web pages stored in a web server running on the pine A64+?
12-31-2015, 10:28 AM
(This post was last modified: 12-31-2015, 10:42 AM by o9guy.
Edit Reason: misspelling
)
We need GPIO exposed in /sys/class via some sort of kernel module like on the Pi (sorry to bring up the pi but that's the model that PineA64 is going to have to strive to be like for community support)
The GPIO on the Odroid C1 (which uses an allwinnder quad core SOC) requires code written in C to access the GPIO (I haven't seen access via a /sys/class/GPIO or anything) but the Pcduino series, which also use the Allwinner SOC, does have a kernel module for /sys/class access. Hopefully it won't take much to mimic this behavior. I'd be willing to port the code needed to support the GPIO and other pin-specific functions. (12-31-2015, 10:28 AM)o9guy Wrote: We need GPIO exposed in /sys/class via some sort of kernel module like on the Pi (sorry to bring up the pi but that's the model that PineA64 is going to have to strive to be like for community support) But to more directly answer igna09, once we have access to the GPIO via filesystem (i.e. /sys/class GPIO) it will be possible to control them from a webserver using CGI-BIN in python, php, etc. Here's an example of a web-based control for the Pi: http://www.instructables.com/id/Simple-a.../?ALLSTEPS It wouldn't be too hard to adjust the code for the pin convention the GPIO for the allwinner uses. After that it will be possible to make an IR receiver module that is compatible with LIRC.
02-07-2016, 01:56 PM
(This post was last modified: 02-07-2016, 01:57 PM by limitlesscodes.)
I don't mind programming in C, in fact I actually prefer it , however I am curious as to if there is a library for the GPIO yet, something like wiringPi.h?
02-07-2016, 08:25 PM
(02-07-2016, 01:56 PM)limitlesscodes Wrote: I don't mind programming in C, in fact I actually prefer it , however I am curious as to if there is a library for the GPIO yet, something like wiringPi.h? If you prefers programming in C, cgeck out this link that generate by Sunxi community: http://linux-sunxi.org/GPIO
02-10-2016, 12:25 AM
(02-07-2016, 08:25 PM)tllim Wrote:(02-07-2016, 01:56 PM)limitlesscodes Wrote: I don't mind programming in C, in fact I actually prefer it , however I am curious as to if there is a library for the GPIO yet, something like wiringPi.h? Thanks much!, are there any updates as to when ubuntu will "officially" be supported?
02-10-2016, 06:53 PM
(02-10-2016, 12:25 AM)limitlesscodes Wrote:(02-07-2016, 08:25 PM)tllim Wrote:(02-07-2016, 01:56 PM)limitlesscodes Wrote: I don't mind programming in C, in fact I actually prefer it , however I am curious as to if there is a library for the GPIO yet, something like wiringPi.h? Once the Kernel up, looking forward to happen on this month.
02-14-2016, 05:49 PM
Hey Pine64 backers! I am having difficulty figuring out how I would use C to take user input, button presses, and light LEDs with the GPIO, I understand C fairly well but have no experience with interfacing with"GPIO." Here is the best program I could think of although I believe there is a much better way to do this:
Code: /*
02-14-2016, 07:12 PM
(02-14-2016, 05:49 PM)limitlesscodes Wrote: Hey Pine64 backers! I am having difficulty figuring out how I would use C to take user input, button presses, and light LEDs with the GPIO, I understand C fairly well but have no experience with interfacing with"GPIO." Here is the best program I could think of although I believe there is a much better way to do this: You've got the right general idea. See http://falsinsoft.blogspot.com/2012/11/a...space.html and http://linux-sunxi.org/GPIO
02-15-2016, 06:05 PM
(02-14-2016, 07:12 PM)patrickhwood Wrote:I read through them, so from what I am able to understand my program would only work if the kernel supports GPIO access from sysfs, will the Pine64 support this(I really hope to hear yes)? Also, say I am trying to blink an LED, can you be so kind as to tell my a pin number on the GPIO that can do that?(02-14-2016, 05:49 PM)limitlesscodes Wrote: Hey Pine64 backers! I am having difficulty figuring out how I would use C to take user input, button presses, and light LEDs with the GPIO, I understand C fairly well but have no experience with interfacing with"GPIO." Here is the best program I could think of although I believe there is a much better way to do this:
02-16-2016, 03:15 PM
(This post was last modified: 02-16-2016, 03:31 PM by limitlesscodes.
Edit Reason: More Info and Questions to avoid over replying
)
Alright, so I kind of figured out pin assignment using the GPIO image on the wiki. I still would like to know what PC, PD, PH, etc. means and when to use them vs. others. Also I would like to know if there is any better way of exporting the pins through C rather than doing something like:
Code: //near beginning of file Code: //near end of file |
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
GPIO specifications in device tree | ramstadt | 1 | 3,511 |
01-16-2019, 03:17 PM Last Post: ramstadt |
|
+PINEBOOK Q4OS Pinebook Questions | StewB | 0 | 2,430 |
08-24-2017, 03:53 PM Last Post: StewB |
|
Low-Level-GPIO-Access | Thoams131 | 2 | 4,625 |
01-11-2017, 02:54 PM Last Post: Thoams131 |
|
PPS-GPIO | Sebastian | 11 | 18,227 |
07-12-2016, 07:25 PM Last Post: tllim |
|
C#.NET / Mono GPIO library? | abutler77 | 0 | 3,152 |
06-12-2016, 10:34 PM Last Post: abutler77 |
|
Lazarus and GPIO | gbestwick | 0 | 2,392 |
05-22-2016, 08:51 PM Last Post: gbestwick |
|
GPIO javascript library. | neeeds | 1 | 3,975 |
02-19-2016, 11:31 PM Last Post: limitlesscodes |