Skip to content

Commit f3937ef

Browse files
committed
updates
1 parent ab34025 commit f3937ef

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

I2C/main.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
from machine import Pin, SoftI2C
21

2+
# Micropython version
3+
#
4+
# ESP Pin -- GY39 Pin
5+
# ---------------------
6+
# 3.3v -- VCC
7+
# GPIO_22 -- CT
8+
# GPIO_21 -- DR
9+
# GND -- GND
10+
11+
from machine import Pin, SoftI2C
12+
313
MCU_I2C_ADDR = 0X5b
414

515
i2c = SoftI2C(scl=Pin(22), sda=Pin(21))

README.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
GY-39 MCU Light Intensity Temperature Humidity Atmospheric Pressure, 4 in One Integrated Sensor Module
44

5-
<img src="./hookup_diagram.jpg">
5+
1. Communication using UART
6+
7+
<img src="./uart_hookup_diagram.jpg">
68

79
# Micropython version
810
# With My ESP32 board, UART0 and UART1 are not available
@@ -16,6 +18,19 @@ GY-39 MCU Light Intensity Temperature Humidity Atmospheric Pressure, 4 in One In
1618
# GPIO_17 -- DR
1719
# GND -- GND
1820

21+
1. Communication using I2C (S0 to GND)
22+
23+
<img src="./i2c_hookup_diagram.jpg">
24+
25+
# Micropython version
26+
#
27+
# ESP Pin -- GY39 Pin
28+
# ---------------------
29+
# 3.3v -- VCC
30+
# GPIO_22 -- CT
31+
# GPIO_21 -- DR
32+
# GND -- GND
33+
1934
Working MicroPython code for ESP32 can be downloaded from this repository and here are some outputs:
2035

2136
```

i2c_hookup_diagram.jpg

780 KB
Loading
File renamed without changes.

0 commit comments

Comments
 (0)