Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.61 KB

File metadata and controls

39 lines (23 loc) · 1.61 KB

Raspberry-Pi-with-PC-Socket-Communication

In this repository you will find a simple Socket Communication between Raspberry Pi and PC. The Raspi will continously read data from DHT sensor and send to pc over Socket communication.

Pinout of Raspberry Pi image

Circuit Connection image

!!DHT11 vs DHT22!! image

DHT11 DATASHEET: https://www.mouser.com/datasheet/2/758/DHT11-Technical-Data-Sheet-Translated-Version-1143054.pdf

DHT22 DATASHEET: https://cdn-shop.adafruit.com/datasheets/Digital+humidity+and+temperature+sensor+AM2302.pdf

Here’s a list of parts you need to build the circuit (if you don’t have a DHT breakout board, you need a 4.7kOhm resistor):

Raspberry Pi board

DHT11 or DHT22 temperature and humidity sensor

4.7k Ohm resistor or similar value (not needed if you have a DHT breakout board) This is called pull up resistor

Breadboard

Jumper wires

Installing the Adafruit_CircuitPython_DHT Library: pip install adafruit-circuitpython-dht

If you get error on Raspi like:

**Traceback (most recent call last):

TypeError: unsupported format string passed to NoneType.format**

Then run the code again. Otherwise choose the port no manually in RPIsocket.bind((myIP, xxxx)) # Bind to any available port this part of the code