Skip to content

Commit dcfa369

Browse files
committed
data reading
1 parent 62a215a commit dcfa369

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

example/Core/Src/main.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ int main(void)
9797
/* USER CODE BEGIN WHILE */
9898
while (1)
9999
{
100-
INA219_GetCurrent(&sensor);
101-
printf("Current: %d\n", sensor.current);
102-
HAL_Delay(1000);
100+
INA219_GetCurrent(&sensor, &hi2c1);
101+
INA219_GetBusVoltage(&sensor, &hi2c1);
102+
INA219_GetPower(&sensor, &hi2c1);
103+
INA219_GetShuntVoltage(&sensor, &hi2c1);
104+
HAL_Delay(500);
103105
/* USER CODE END WHILE */
104106

105107
/* USER CODE BEGIN 3 */

0 commit comments

Comments
 (0)