-
- Posts: 21
- Joined: Wed Apr 18, 2012 6:25 pm
Re: Whats the point of Gpio pins?
Whats the point of Gpio pins? The only use I have seen for them is blinking LED lights. Is there a practical use for them?
-
- Posts: 4277
- Joined: Sun Jan 15, 2012 1:11 pm
Re: Whats the point of Gpio pins?
Search the forum for "GertBoard", and, in particular, find and view the video that he made, which demonstrates what the GertBoard can do.
And some folks need to stop being fanboys and see the forest behind the trees.
(One of the best lines I've seen on this board lately)
(One of the best lines I've seen on this board lately)
Re: Whats the point of Gpio pins?
firstplacefranz said:
Whats the point of Gpio pins? The only use I have seen for them is blinking LED lights. Is there a practical use for them?
Practical use? Blinking LED lights. Especially blue ones.
Whats the point of Gpio pins? The only use I have seen for them is blinking LED lights. Is there a practical use for them?
Practical use? Blinking LED lights. Especially blue ones.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
- gordon@drogon.net
- Posts: 2023
- Joined: Tue Feb 07, 2012 2:14 pm
- Location: Devon, UK
- Contact: Website Twitter
Re: Whats the point of Gpio pins?
firstplacefranz said:
Whats the point of Gpio pins? The only use I have seen for them is blinking LED lights. Is there a practical use for them?
The point is sharp and if you stab yourself with them then it'll hurt...
OK... maybe not!
I think the answer is "because we can". And to make it easier to connect it up to other stuff like motors, sensors to make the whole device a bit more exciting for newbies to get into.
And I think it's good to have some sort of programmable IO back in a "PC" again. In ye olden days of the Apple II (what I started with) there was the game connector - it was actually 4 analogue inputs, 3 digital inputs and I think 1 or 2 digital outputs. Then the BBC Micro came along and we had the User port with 8 digital IO pins, the joystick port with more analogue and digitial inputs - the printer port - and I'm probably not the only one who used it as extra outputs and so on.
Modern computers lack the hackability of those early machines, so this is giving a little back.
At least that's my intrepretation!
Gordon
Whats the point of Gpio pins? The only use I have seen for them is blinking LED lights. Is there a practical use for them?
The point is sharp and if you stab yourself with them then it'll hurt...
OK... maybe not!
I think the answer is "because we can". And to make it easier to connect it up to other stuff like motors, sensors to make the whole device a bit more exciting for newbies to get into.
And I think it's good to have some sort of programmable IO back in a "PC" again. In ye olden days of the Apple II (what I started with) there was the game connector - it was actually 4 analogue inputs, 3 digital inputs and I think 1 or 2 digital outputs. Then the BBC Micro came along and we had the User port with 8 digital IO pins, the joystick port with more analogue and digitial inputs - the printer port - and I'm probably not the only one who used it as extra outputs and so on.
Modern computers lack the hackability of those early machines, so this is giving a little back.
At least that's my intrepretation!
Gordon
--
Gordons projects: https://projects.drogon.net/
Gordons projects: https://projects.drogon.net/
- nick.mccloud
- Posts: 1134
- Joined: Sat Feb 04, 2012 4:18 pm
Re: Whats the point of Gpio pins?
firstplacefranz said:
Whats the point of Gpio pins? The only use I have seen for them is blinking LED lights. Is there a practical use for them?
Interfacing to anything in the outside world - temperature, light, dark, voltage, pressure, humidity, turning things on or off - the possibilities are endless and far greater than just displaying stuff on a monitor. Imagine being able to click a button on a web page to turn on your heating before you leave the office so it's warm when you get home. Or monitor the river levels in the south part of Britain from up here in the slightly damp and well watered north.
Whats the point of Gpio pins? The only use I have seen for them is blinking LED lights. Is there a practical use for them?
Interfacing to anything in the outside world - temperature, light, dark, voltage, pressure, humidity, turning things on or off - the possibilities are endless and far greater than just displaying stuff on a monitor. Imagine being able to click a button on a web page to turn on your heating before you leave the office so it's warm when you get home. Or monitor the river levels in the south part of Britain from up here in the slightly damp and well watered north.
Pico/RP2040 ≠ Arduino
Pico = hot rod kit car, Arduino = hot rod kit car wrapped in cotton wool with buoyancy aids & parachute
Pico = hot rod kit car, Arduino = hot rod kit car wrapped in cotton wool with buoyancy aids & parachute
Re: Whats the point of Gpio pins?
The GPIO pins allow the RPi to be programmed to interact with the outside world. It allows sensor inputs and actuator outputs to be used. There is an IO expansion board called the Gert Board.
There are various robot projects that will use GPIO, as well as some interesting sensor projects.
It"s from this that people can get experience in Embedded System Software and maybe designing the electronics to connect to the GPIO.
So lots of good reason for it .
There are various robot projects that will use GPIO, as well as some interesting sensor projects.
It"s from this that people can get experience in Embedded System Software and maybe designing the electronics to connect to the GPIO.
So lots of good reason for it .
Re: Whats the point of Gpio pins?
JamesH said:
Especially blue ones.
Nooooooooooooooooooo.....................
Especially blue ones.
Nooooooooooooooooooo.....................
Re: Whats the point of Gpio pins?
I thought that GPIO pins are something for the hardware person in us all to play with. Also they are for letting the software do something more than play games, surf the net and display porn. Without io the pi would be more of a flan.
-
- Posts: 21
- Joined: Wed Apr 18, 2012 6:25 pm
Re: Whats the point of Gpio pins?
Didnt know they were that useful, thanks guys... Ill have to come up with some good projects.
BTW. anyone know when the gertboard will be ready?
BTW. anyone know when the gertboard will be ready?
- johnbeetem
- Posts: 945
- Joined: Mon Oct 17, 2011 11:18 pm
- Location: The Mountains
- Contact: Website
Re: Whats the point of Gpio pins?
Along with general-purpose digital I/O, there are some nifty low-level peripheral interfaces:
UART: you can use this to talk to a serial terminal.
I2C: medium-speed interface to lots of cute ICs including real-time clocks and pressure/temperature sensors.
SPI: faster interface to lots of other cute ICs including analog-to-digital converters.
UART: you can use this to talk to a serial terminal.
I2C: medium-speed interface to lots of cute ICs including real-time clocks and pressure/temperature sensors.
SPI: faster interface to lots of other cute ICs including analog-to-digital converters.
Re: Whats the point of Gpio pins?
GordonH said:
And I think it's good to have some sort of programmable IO back in a "PC" again.
.
.
Modern computers lack the hackability of those early machines, so this is giving a little back.
Gordon
I agree! This is long overdue, once the USB era was established, we lost the ability to hack stuff using the hardware ports.
One word of warning though, this is an operating system based computer, not a real time microcontroller like say an Arduino for example. So you can't be sure on the precise timing or prioritization when sending bits to the GPIO ports. For some projects that need a nearly instant reaction time between receiving a signal, interpreting it, and then acting on it (some kind of closed-loop application) you are better off with a different kind of device that works at a lower level, and just having your R Pi just send commands to that lower level real-time controller.
And I think it's good to have some sort of programmable IO back in a "PC" again.
.
.
Modern computers lack the hackability of those early machines, so this is giving a little back.
Gordon
I agree! This is long overdue, once the USB era was established, we lost the ability to hack stuff using the hardware ports.
One word of warning though, this is an operating system based computer, not a real time microcontroller like say an Arduino for example. So you can't be sure on the precise timing or prioritization when sending bits to the GPIO ports. For some projects that need a nearly instant reaction time between receiving a signal, interpreting it, and then acting on it (some kind of closed-loop application) you are better off with a different kind of device that works at a lower level, and just having your R Pi just send commands to that lower level real-time controller.
Re: Whats the point of Gpio pins?
I'd agree, the easiest approach for real-time stuff is to use an Arduino or similar. However there are several "Real-Time" versions of Linux including ADEOS, ART Linux, KURT, Linux/RK, QLinux, RED-Linux, RTAI, RTLinux, Xenomai. In the future, some of these might be ported to RasPi(?) If the kernel is preempted by a RTOS that will cause some tradeoffs in keeping up with other CPU tasks, of course. See also: http://www.linuxfordevices.com.....nce-Guide/
Re: Whats the point of Gpio pins?
k3v1nc said:
One word of warning though, this is an operating system based computer, not a real time microcontroller like say an Arduino for example. So you can't be sure on the precise timing or prioritization when sending bits to the GPIO ports.
Though presumably only for Linux or another OS - run bare metal code and it should be as good and deterministic as any other microcontroller, with a lot more speed and memory to play with.
Though the focus is on Linux, bare metal programming resources will come in due course.
One word of warning though, this is an operating system based computer, not a real time microcontroller like say an Arduino for example. So you can't be sure on the precise timing or prioritization when sending bits to the GPIO ports.
Though presumably only for Linux or another OS - run bare metal code and it should be as good and deterministic as any other microcontroller, with a lot more speed and memory to play with.
Though the focus is on Linux, bare metal programming resources will come in due course.
- mahjongg
- Forum Moderator
- Posts: 13675
- Joined: Sun Mar 11, 2012 12:19 am
- Location: South Holland, The Netherlands
Re: Whats the point of Gpio pins?
The R-PI has on its GPIO header:
8 GPIO parallel I/O pins, that can control:
* Relays
* motors
* Dynamite sticks
* buzzers
* lamps
* heating elements
And thousands of other things, and as inputs can read (detect)
* Switches and pushbuttons
* light levels shining on LDR's
* Status signals from digital devices
* Water levels
* trip wires
* Rocks thrown into ponds.
And millions of other slightly digital input signals (with help from the right sensors)
It also has a UART (Universal Asynchronous Receiver Transmitter) (actually it seems to have several), which can be used for bidirectional communication with a zillion other devices and micro-controllers, for keyboards, mouse, joystick and not to forget via a level converter to RS232 signals. Probably the most useful use will be to control arduino's, used as "real time interface controllers".
It has I2C (inter IC bus) useable (as the name implies) to connect to all kinds of digital IC's, its heavily used inside all kinds of devices, Originally invented to be used inside TV,s as a connection between the main controller, the remote control interface, the front touch buttons, the Teletext receiver the Real Time Clock, etc etc. Today is use has exploded in thousands of devices, making it possible that all kinds of subparts in a device can talk to each other. For example in a satellite its often used as the internal "bus" so that the main controller can talk with the "maximum power point tracker", the gyroscope, and the "star tracker". To mention just a few devices inside a sattelite.
SPI (serial peripheral interface) allows a single "master" (the R-PI) to "talk to" a number of "slave devices" (in case of the raspberry two, but the number can be expanded) at high speed. Its use is the fast transfer of lots of data, for example its the basic interface mode for SD-Cards (so it could be used to connect a second SD-cardslot to the R-PI). Its used for all kind of high speed connections (except for sound for which other specialized standards exists).
Although a bit hidden the R-PI also has a PWM (pulse width modulation) output, these can be used as simple analog to digital converters (but generally not for sound), But the most common use is for controlling servo motors.
GPIO pins can also be combined to create new kinds of interfaces, and the possibilities of those are endless.
8 GPIO parallel I/O pins, that can control:
* Relays
* motors
* Dynamite sticks
* buzzers
* lamps
* heating elements
And thousands of other things, and as inputs can read (detect)
* Switches and pushbuttons
* light levels shining on LDR's
* Status signals from digital devices
* Water levels
* trip wires
* Rocks thrown into ponds.
And millions of other slightly digital input signals (with help from the right sensors)
It also has a UART (Universal Asynchronous Receiver Transmitter) (actually it seems to have several), which can be used for bidirectional communication with a zillion other devices and micro-controllers, for keyboards, mouse, joystick and not to forget via a level converter to RS232 signals. Probably the most useful use will be to control arduino's, used as "real time interface controllers".
It has I2C (inter IC bus) useable (as the name implies) to connect to all kinds of digital IC's, its heavily used inside all kinds of devices, Originally invented to be used inside TV,s as a connection between the main controller, the remote control interface, the front touch buttons, the Teletext receiver the Real Time Clock, etc etc. Today is use has exploded in thousands of devices, making it possible that all kinds of subparts in a device can talk to each other. For example in a satellite its often used as the internal "bus" so that the main controller can talk with the "maximum power point tracker", the gyroscope, and the "star tracker". To mention just a few devices inside a sattelite.
SPI (serial peripheral interface) allows a single "master" (the R-PI) to "talk to" a number of "slave devices" (in case of the raspberry two, but the number can be expanded) at high speed. Its use is the fast transfer of lots of data, for example its the basic interface mode for SD-Cards (so it could be used to connect a second SD-cardslot to the R-PI). Its used for all kind of high speed connections (except for sound for which other specialized standards exists).
Although a bit hidden the R-PI also has a PWM (pulse width modulation) output, these can be used as simple analog to digital converters (but generally not for sound), But the most common use is for controlling servo motors.
GPIO pins can also be combined to create new kinds of interfaces, and the possibilities of those are endless.
Re: Whats the point of Gpio pins?
hippy said:
k3v1nc said:
One word of warning though, this is an operating system based computer, not a real time microcontroller like say an Arduino for example. So you can't be sure on the precise timing or prioritization when sending bits to the GPIO ports.
Though presumably only for Linux or another OS - run bare metal code and it should be as good and deterministic as any other microcontroller, with a lot more speed and memory to play with.
Though the focus is on Linux, bare metal programming resources will come in due course.
This is true, although the same could be said about nearly any computer, one could write machine or assembly code and execute it directly without an OS. I would very much like to see a real-time OS distribution and/or SDK be made available for those interested in these type of uses of the RaspberryPi. Although it will be quite limited in IO as compared to an ArduinoMEGA, but IO expansion boards could overcome that to some extent.
I just hope people become more educated about the difference between running something on top of an OS vs directly on the processor. This is especially relevant to robotics applications that require precision. Can you imagine someone using a physical limit switch wired to a GPIO pin that's read by a process running on top an OS? let's hope it wasn't moving too fast or eek broken machine parts!
k3v1nc said:
One word of warning though, this is an operating system based computer, not a real time microcontroller like say an Arduino for example. So you can't be sure on the precise timing or prioritization when sending bits to the GPIO ports.
Though presumably only for Linux or another OS - run bare metal code and it should be as good and deterministic as any other microcontroller, with a lot more speed and memory to play with.
Though the focus is on Linux, bare metal programming resources will come in due course.
This is true, although the same could be said about nearly any computer, one could write machine or assembly code and execute it directly without an OS. I would very much like to see a real-time OS distribution and/or SDK be made available for those interested in these type of uses of the RaspberryPi. Although it will be quite limited in IO as compared to an ArduinoMEGA, but IO expansion boards could overcome that to some extent.
I just hope people become more educated about the difference between running something on top of an OS vs directly on the processor. This is especially relevant to robotics applications that require precision. Can you imagine someone using a physical limit switch wired to a GPIO pin that's read by a process running on top an OS? let's hope it wasn't moving too fast or eek broken machine parts!
Re: Whats the point of Gpio pins?
hippy said:
Though presumably only for Linux or another OS - run bare metal code and it should be as good and deterministic as any other microcontroller, with a lot more speed and memory to play with.
Not exactly, even without an OS you still have a complex memory heirachy which is shared with the GPU. This makes it FAR FAR harder to determine how long instructions will take than on a microcontroller where all memory is equal.
Though presumably only for Linux or another OS - run bare metal code and it should be as good and deterministic as any other microcontroller, with a lot more speed and memory to play with.
Not exactly, even without an OS you still have a complex memory heirachy which is shared with the GPU. This makes it FAR FAR harder to determine how long instructions will take than on a microcontroller where all memory is equal.
Re: Whats the point of Gpio pins?
But most important of all is You can blink leds with them.
Re: Whats the point of Gpio pins?
+2 for blue blinky LEDS
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB
http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB
http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
Re: Whats the point of Gpio pins?
mahjongg said:
The R-PI has on its GPIO header:
8 GPIO parallel I/O pins, that can control:
...
* Dynamite sticks
...
* trip wires
I sometimes worry about people on this forum.
The R-PI has on its GPIO header:
8 GPIO parallel I/O pins, that can control:
...
* Dynamite sticks
...
* trip wires
I sometimes worry about people on this forum.
Re: Whats the point of Gpio pins?
plugwash said:
hippy said:
Though presumably only for Linux or another OS - run bare metal code and it should be as good and deterministic as any other microcontroller, with a lot more speed and memory to play with.
Not exactly, even without an OS you still have a complex memory heirachy which is shared with the GPU. This makes it FAR FAR harder to determine how long instructions will take than on a microcontroller where all memory is equal.
Good point; the SoC is CPU+GPU, not just a CPU.
Is how timing may be affected described anywhere ? I suppose the main question is does it it just add a few instruction cycles or does it stall everything for prolonged periods, can the GPU access be disabled ?
I imagine any non-deterministic variance for bare metal code would be in the order of microseconds whereas it could be milliseconds with an OS on top; would that generally be correct ?
hippy said:
Though presumably only for Linux or another OS - run bare metal code and it should be as good and deterministic as any other microcontroller, with a lot more speed and memory to play with.
Not exactly, even without an OS you still have a complex memory heirachy which is shared with the GPU. This makes it FAR FAR harder to determine how long instructions will take than on a microcontroller where all memory is equal.
Good point; the SoC is CPU+GPU, not just a CPU.
Is how timing may be affected described anywhere ? I suppose the main question is does it it just add a few instruction cycles or does it stall everything for prolonged periods, can the GPU access be disabled ?
I imagine any non-deterministic variance for bare metal code would be in the order of microseconds whereas it could be milliseconds with an OS on top; would that generally be correct ?
- exartemarte
- Posts: 376
- Joined: Sat Mar 03, 2012 3:51 pm
- Location: Middle England
- Contact: Website
Re: Whats the point of Gpio pins?
Don't underestimate the satisfaction of blinking an LED!
I've been using microcontrollers, as well as PCs, for longer than I care to remember, but with any new device/language/whatever the first thing I do is blink an LED. As, I suspect, do most other hardware hackers.
They're also handy for testing and debugging - in the early stages it's often useful to substitute an LED for the motor, detonator, Large Hadron Collider or whatever else is eventually going to be controlled.
Talking of which, have we all seen these rapid prototyping LED arrays? Very useful on a breadboard.
I've been using microcontrollers, as well as PCs, for longer than I care to remember, but with any new device/language/whatever the first thing I do is blink an LED. As, I suspect, do most other hardware hackers.
They're also handy for testing and debugging - in the early stages it's often useful to substitute an LED for the motor, detonator, Large Hadron Collider or whatever else is eventually going to be controlled.
Talking of which, have we all seen these rapid prototyping LED arrays? Very useful on a breadboard.
Re: Whats the point of Gpio pins?
I wonder how many hobbyists are going to burn out the GPIO pins trying to drive things without proper voltage/current considerations… it might take awhile before you can get your hands on a replacement board, so be careful with your first one, and properly isolate the Raspberry Pi when attempting to control things with the GPIO pins!
Re: Whats the point of Gpio pins?
exartemarte said:
Don"t underestimate the satisfaction of blinking an LED!
I"ve been using microcontrollers, as well as PCs, for longer than I care to remember, but with any new device/language/whatever the first thing I do is blink an LED. As, I suspect, do most other hardware hackers.
They"re also handy for testing and debugging – in the early stages it"s often useful to substitute an LED for the motor, detonator, Large Hadron Collider or whatever else is eventually going to be controlled.
Talking of which, have we all seen these rapid prototyping LED arrays? Very useful on a breadboard.
Everyone"s a fan of of the Blinkenlights. It seems quite appropriate given that the goal is to offer the world an opportunity to go back to the technology environment of the 70s and 80s that fostered computer tinkering, and being excited by writing a program that controlled an led with your computer.
Check this guy"s project out, he re-created a Kenbak-1 computer using an Arduino to emulate the hardware, and then gave it a miniaturized version of the original case complete with blinkenlights and pushbutton machine code programming: http://www.funnypolynomial.com.....enbak.html
That project is a use case for IO pins and LEDs if I've ever seen one.
Don"t underestimate the satisfaction of blinking an LED!
I"ve been using microcontrollers, as well as PCs, for longer than I care to remember, but with any new device/language/whatever the first thing I do is blink an LED. As, I suspect, do most other hardware hackers.
They"re also handy for testing and debugging – in the early stages it"s often useful to substitute an LED for the motor, detonator, Large Hadron Collider or whatever else is eventually going to be controlled.
Talking of which, have we all seen these rapid prototyping LED arrays? Very useful on a breadboard.
Everyone"s a fan of of the Blinkenlights. It seems quite appropriate given that the goal is to offer the world an opportunity to go back to the technology environment of the 70s and 80s that fostered computer tinkering, and being excited by writing a program that controlled an led with your computer.
Check this guy"s project out, he re-created a Kenbak-1 computer using an Arduino to emulate the hardware, and then gave it a miniaturized version of the original case complete with blinkenlights and pushbutton machine code programming: http://www.funnypolynomial.com.....enbak.html
That project is a use case for IO pins and LEDs if I've ever seen one.
-
- Posts: 21
- Joined: Wed Apr 18, 2012 6:25 pm
Re: Whats the point of Gpio pins?
How are the pins numbered. In the Code on the wiki the GPIO pins are numbered, GPIO 1, GPIO 0, ect. What is the ordering of these pins? which is 0, and 1?
- mahjongg
- Forum Moderator
- Posts: 13675
- Joined: Sun Mar 11, 2012 12:19 am
- Location: South Holland, The Netherlands
Re: Whats the point of Gpio pins?
bredman said:
mahjongg said:
The R-PI has on its GPIO header:
8 GPIO parallel I/O pins, that can control:
...
* Dynamite sticks
...
* trip wires
I sometimes worry about people on this forum.
LOL
mahjongg said:
The R-PI has on its GPIO header:
8 GPIO parallel I/O pins, that can control:
...
* Dynamite sticks
...
* trip wires
I sometimes worry about people on this forum.
LOL