Raspberry Pi LESSON 42: How to Build a Simple Client Server System with Raspberry Pi

preview_player
Показать описание
Announcing the Most Awesome Raspberry Pi Lessons of All Times! This time we RUMBLE!

In this class series, we will be using the most excellent Sunfounder Ultimate Raspberry Pi kit, available here: (Affiliate Link)

In this video lesson I will show you how to Create a Client Server setup on the Raspberry Pi. The Raspberry Pi will act as the server, and your PC will act as the client. I will demonstrate this using the dht11 temperature and humidity sensor. This will work for devices connected to the same home network. This allows a simple way to control the raspberry pi remotely, and to set up a simple client server relationship.

If you want to grab those cool little straight jumper wires I am using to keep my breadboard builds neat and clean you can snag a box of them here:

If you guys are interested in the oscilloscope I am using, you can pick one up here (affiliate link):

You guys get your hardware ordered so you can follow along at home!

You will also need a Raspberry Pi. I suggest the Raspberry Pi 4. If you do not already have one, this is the most suitable gear I could find:

The Raspberry Pi's are sort of pricy right now, so you can look on ebay or elsewhere to see if there are any deals. You will need a SD card. If you do not already have one, this is a good one:

I like using a wireless keyboard and mouse to have fewer wires. You can certainly use your USB keyboard and mouse, but if you want a nice wireless one, this one works on the pi. We demonstrate this by using a button switch to control a LED.

You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:

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

I AM LEGEND! In my version of the homework, I formed the output for the user in the server app. After modifying the client app to accept input from the user, only the server app needed to change. "elif" was my friend for the mods. Thanks for another most-excellent lesson Paul!

cbrombaugh
Автор

Paul, Great Job!!! You are by far the best at teaching how to program/interface the Pi. Maybe your next lesson will include adding a time-stamp to to the data being sent, then maybe taking the data sent and creating a record with the time stamp included and saving it to a file or Db for them to create graphs down the road after a month or so. Keep up the GREAT work!

donaldhoudek
Автор

Thanks Paul Quarter-Back for all the cool computer lessons!!

magnuswootton
Автор

Awesome lesson! This is great. Paul, you're the GOAT!

genepierson
Автор

THIS was across a very excellent lesson! I will be ready for the PICO lesson when you are ready and have the time for us!

larryplatzek
Автор

Paul, I finally figured out why the DHT11 has been so difficult. I eliminated the "if result.is_valid()==False: section and added a while loop after the the if cmd=='temp':.
I did that to both the temp and the hum. Now no problems getting the data, works every time.

jameslewellen
Автор

Happy New year Paul, blessing to you and your family... thank you for all hard work you do for us I enjoy this RPI lessons....

arguedas
Автор

Im just starting on this series. Hopefully I can be consistent enough to reach to this lesson 🙏🙏

danielniels
Автор

Hello mr. paul
I like your channel very much
I learned a lot from you
But i hope you give a ros Tutorial
Thank you so much

abdulrahmanabumarae
Автор

This is a quality content. Also its kinda funny😂

bigblackcamera
Автор

Paul i would absolutely love to be able to do this on the Pico

collinb
Автор

Sir do you have any plans to start series on AutoCad?

techturbo
Автор

Hello Paul,

Could the invalid data messages be a result of not putting a delay after reading the temp and humidity values before you tead the data again. Typically you don't want to read the temp and humidity data for 1 or 2 seconds after the previou reading. What are your thoughts on this?

rickbonari
Автор

I did not do the home work because I've already done this using another system. I setup a system using MQTT. I'm not saying that MQTT is better than UDP but I have already implemented MQTT and I'm too lazy to learn UDP for the sake of learning it.

WilliamBurlingame
Автор

Talking about something that will drive you nuts, DO NOT USE same name as package for your project name, I knew better but I did it anyways accidently, was ready to trash my PI. literally

Bubby
Автор

Another great exercise, Paul!! Here is my solution to the homework assignment:
Yes. It's chilly in here lol.

DrDave
Автор

My homework, my apologies, my video editing skills are pretty much non-existent.

noweare
Автор

Here is my solution. I never know whether to leave a comment on the lesson which sets the homework or on the solution, so I've done both.

charlotteswift