物理变量---->能量得到功率

#include <stdio.h>

//多个变量共同作用才能得到一个值  最终才能得到我们想要效果   
typedef struct _device_power
{
    float voltage;
    float current;
    float direction;
    float power;
}Device_power;

static Device_power component; 

int main(void) {
    
    float power = component.power;
    
    while(1)
    {
        //通过万用表 电压档 得到电压 
        //通过万用表 电流档 得到电流
        component.voltage = 3.46f;
        component.current = 1.2f;
        power = component.voltage * component.current;
        printf("power is %f
",power);
        
        usleep(10000);
        
    }
    
        
    return 0;
}

功率的意义: 人都要吃饭,吃了饭才能上班,才能工作和学习,才能做其他事情;功率重不重要;通过功率大小我们就能适配我们设备需要多大功率的东西;
比如笔记本,人,电风扇,LED灯,手机,手表;
方向的物理意义非常明确,表示我是吃饭的,还是造饭的;从生物角度,是生产者(草 木 花),还是消费者;是厂商还是客户;
一勤天下无难事。
原文地址:https://www.cnblogs.com/nowroot/p/13199627.html