A brief introduction: As a spare time project I'm trying to create an LED driver for my CC3Ds. The idea is quite simple, I'm using an ATTINY 85 to read the PWM signal from an Output (pin 5) that's linked to an AUX input (AUX1) wich is mapped to Channel 3 on my Taranis (Throttle).
That PWM value will then be used to change the blinking speed and color of the LEDs. So as I move the Throttle up the LEDs will change from blue to red and blink faster.
Here comes the problem: if I have the CC3D connected to the GCS with an USB cable I can read the PWM values and print them in the serial monitor of the Arduino IDE, but as soon as I disconnect the USB (LiPO is powering the FC) I'm unable to read the PWM signal. On the serial monitor I get low values like 4,5,4,3....
Is there a logic to this? Why do I get normal PMW values when the USB is plugged in and as soon as I disconnect it I get illogical values?
I don't have my computer nearby so at the moment I can't post pictures, but if it helps I can post them tomorrow.