Hi,
I am using a current and voltage sensor successful. First put the
following lines in firmware section:
<firmware name="fixedwing">
.
<define name="USE_ADC"/>
<define name="USE_ADC_3"/> <!-- accu voltage--> <!-- *******-->
<define name="USE_ADC_4"/> <!-- motor current-->
<define name="ADC_CHANNEL_VSUPPLY" value="ADC_3"/> <!-- *******-->
Then in Battery section:
<section name="BAT">
<define name="ADC_CHANNEL_CURRENT" value="ADC_4"/>
<define name="MilliAmpereOfAdc(adc)" value="(100*adc)"/>
<define name="VOLTAGE_ADC_A" value="0.05"/> <!-- *******-->
<define name="VOLTAGE_ADC_B" value="1"/> <!-- *******-->
<define name="VoltageOfAdc(adc)" value ="(VOLTAGE_ADC_A * adc +
VOLTAGE_ADC_B)"/> <!-- *******-->
Dont load the adc_generic module anymore.
If you don't use the voltage measurement, skip the lines marked with <!--
*******-->
Balazs
> I just put a current sensor in my Plane with my Yapa, I can read it
> correctly with the adc_generic module, but the current reading in the BAT
> or Energy messages do not change. This is the part of my airframe file I
> have:
>
> <section name="BAT">
> <define name="ADC_CHANNEL_CURRENT" value="ADC_6" />
> <define name="MilliAmpereOfAdc(adc)" value="(36.6*adc)"/>
> </section>
>
> Is there anything else I need to add to this to get it working?
>
> _______________________________________________
> Paparazzi-devel mailing list
>
address@hidden
>
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel