Raspberry Pi GPIO Tutorial

preview_player
Показать описание
Benchmark and tutorial on how to use the GPIO pins on the Raspberry Pi in 6 different ways:
- Raw C code writing to the registers - 17:20
- C library for the BCM2835 processor - 22:58
- Simple wiringPi C library - 26:19
- Python library (RPi.GPIO) - 30:30
- Bash terminal commands - 34:35
- GUI Python script - 36:13

The speed of each library is also compared to give an overall view (benchmark) of the different libraries.

Рекомендации по теме
Комментарии
Автор

great tutorial! I've learned a lot. I've rigged an LED to the IO-pin and seeing it blink (with a delay) filled me with emotion.

lacsapix
Автор

Wow! This was the an amazing video. I wouldn't expect a video that starts with unboxing the RPi and installing PuTTY to go so deep as to compare various GPIO usage techniques on an oscilloscope. I would love to find an in depth video of doing python programming for the GPIO. Even to the depth of using SPI and I2C libraries. Great work. Ignore the other fools who want to nitpick your every word and command.

RichardBronosky
Автор

i love the raspi board :) i can recommend to add a small heatsink on the soc. This allows it to run stable at over 950mhz at only 50°C. This increases the performance very much and makes everything perfectly smooth

Gigawipf
Автор

Hi Im a kid and I understood it. Thank you now I'm programming

jtflubber
Автор

I subscribed to your channel before I watched the video! :D

michaelmitchell
Автор

kind of awesome my friend. specially with the 3 cups of coffee. keep it up in that way because i have had learned a lot.

vladimirbendana
Автор

True. This should for sure be done if the Pi is going to be used in an environment where other users have access to the same VLAN.
But as the purpose of this video was to demonstrate the GPIO use, I didn't focus on the general configuration of the Pi.

mindthomas
Автор

Had to subscribe after seeing that! Wonderful...thank you very much. Will there be more raspberry pi videos and perhaps videos on the "Gertboard" as well?

SirSilversilk
Автор

Thank you for this video @mindthomas. This is a very insightful video. I appreciate it very much.

GozarSuMajestad
Автор

Thank you.
Let me say that I agree with you after watching the video a couple of times, putting myself into the situation as a completely newcomer.
But yet again this video explains some of the more advanced GPIO control stuff, that might not be for the completely 'newborns'.

So to sum up, I think the decision I made not to cover these 'different version parts' was good enough.

mindthomas
Автор

Very well done!
Can you recommend a source to learn more about creating the GUI control you demonstrate near the end of your video? I have a very simple program that I would like to be able to start from the RPi desktop.


tjmross
Автор

Thx a lot for this video, it was really helpful.

ugorobain
Автор

thank you very much. your tutorial was easy to follow and in nice easy steps.
thanx. pj

JoeEvansSound
Автор

Very good. You need to do an update for the wiringPi library, at this time I think is the most powerfull GPIO library for rpi.

conectadoalanada
Автор

I'm glad the guide worked out for you.
Hopefully you will soon make some BIG ADVENTUROUS projects with it ;-)

mindthomas
Автор

Excellent tutorial Thomas, I want to make an Amateur radio repeater controller with the Rpi, I don't need speed to achieve the toggling of the TX after receiveing a COR signal from the RX (COR signal may be a 5v and stays on as long as someone is talking on the repeater) I would need to add somehow a DTMF decoder to the GPIO conector to be able to remotely send commands to the Rpi. Any ideas on that particular task?

Alex XE2BSS

xebss
Автор

Yeah IDK, it's probably fine.

Point of fact it looks like YOU are actually hosting the source files? If so my point is less valid, you control whether the old files are removed, so you can prevent such problems.

While I'm here, I believe there are workable ways around the latency problem. You could use thread/process priority. You could use delays that release the CPU, xsleep(). And if you want to get extreme, you could use a RTOS or kernel patch.

Anyway great tutorial, very helpful. Thanks.

JustAnotherAlchemist
Автор

I haven't experienced this issue with the BCM2835 library so I can't give you any advise of this. But as both libraries are C-compatible there shouldn't be any issues with the 'print' command what-so-ever.

mindthomas
Автор

What are you exactly trying to? Do you want to create a webserver with the Raspberry Pi?
If so I would recommend you to install Apache on it.

mindthomas
Автор

I have installed the Raspbian image to an SD card and plugged it into the board.
Then by connecting an HDMI monitor, a USB keyboard and an Ethernet cable to the Pi, I am able to execute the shown commands.

mindthomas