mirror of
				https://github.com/alexandrebobkov/ESP-Nodes.git
				synced 2025-10-25 19:08:12 +00:00 
			
		
		
		
	esp32 temperature node
This commit is contained in:
		| @@ -31,11 +31,9 @@ | |||||||
|  |  | ||||||
| static const char *TAG = "i2c-simple-example"; | static const char *TAG = "i2c-simple-example"; | ||||||
|  |  | ||||||
| static esp_err_t i2c_driver_initialize(void) | int i2c_master_port = 0; | ||||||
| { |  | ||||||
|     int i2c_master_port = 0; |  | ||||||
|  |  | ||||||
|     i2c_config_t conf = { | i2c_config_t conf = { | ||||||
|     .mode = I2C_MODE_MASTER, |     .mode = I2C_MODE_MASTER, | ||||||
|     .sda_io_num = 21, |     .sda_io_num = 21, | ||||||
|     .sda_pullup_en = GPIO_PULLUP_ENABLE, |     .sda_pullup_en = GPIO_PULLUP_ENABLE, | ||||||
| @@ -43,10 +41,8 @@ static esp_err_t i2c_driver_initialize(void) | |||||||
|     .sda_pullup_en = GPIO_PULLUP_ENABLE, |     .sda_pullup_en = GPIO_PULLUP_ENABLE, | ||||||
|     .master.clk_speed = I2C_MASTER_FREQ_HZ, |     .master.clk_speed = I2C_MASTER_FREQ_HZ, | ||||||
|     .clk_flags= 0, |     .clk_flags= 0, | ||||||
|     }; | }; | ||||||
|  |  | ||||||
|     return i2c_param_config(i2c_master_port, &conf); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| void app_main(void) | void app_main(void) | ||||||
| { | { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user