modified: main/src/leds.c

modified:   main/src/sensor.c
This commit is contained in:
Sven Luethi committed 2024-08-08 23:58:37 +02:00
1 parent 075bc3e261
commit 561278883e
2 files changed
+7 -4

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ void led_blink_task(void *pvParameter)
unsigned initLEDs() {
gpio_set_direction(LED1,GPIO_MODE_OUTPUT);
gpio_set_direction(LED2,GPIO_MODE_OUTPUT);
gpio_set_direction(LED_INT,GPIO_MODE_OUTPUT);
//gpio_set_direction(LED_INT,GPIO_MODE_OUTPUT);
return 0;
}
+6 -3
View File
@@ -1,14 +1,17 @@
#include "sensor.h"
#include <stdio.h>
#include "driver/i2c.h"
#define SDA_PIN GPIO_NUM_2
#define CLK_PIN GPIO_NUM_14
#define SENSOR_ADDR 0x45 //default address is 0x44 (pin 2 logic low). We chose 0x45 with logic high
#define I2C_SDA_PIN GPIO_NUM_2
#define I2C_CLK_PIN GPIO_NUM_14
// Dummy implementations for the purpose of this example
// Replace these with actual sensor initialization and data retrieval logic
// Function to initialize the sensor
void initialize(void) {
void initSensor(void) {
// Initialize the sensor hardware
// For example, set up I2C communication, configure registers, etc.
printf("Sensor initialized.\n");