roof55
Newbie level 5
- Joined
- Jan 18, 2016
- Messages
- 9
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 77
Hi folks, new in this forum!
I was design a circuit using as pilot strobe lights for my UVA/drone.
When power on, all LED light up with 100 % brightness level. Ater 3-4 second, the pattern from my Nano started, but only with 20 % brightness. If connected other power supplies, else two 3400 mAh Li-Ion battery in serie connection, just a little change, 30 %.
The LED drivers **broken link removed**.
A buck step up convrerter **broken link removed**.
Any who can see what might wrong with my project, pleas leave information.
My code here:
I was design a circuit using as pilot strobe lights for my UVA/drone.
When power on, all LED light up with 100 % brightness level. Ater 3-4 second, the pattern from my Nano started, but only with 20 % brightness. If connected other power supplies, else two 3400 mAh Li-Ion battery in serie connection, just a little change, 30 %.
The LED drivers **broken link removed**.
A buck step up convrerter **broken link removed**.
Any who can see what might wrong with my project, pleas leave information.
My code here:
Code:
const int ledPin1 = 11; // Set pin's in use :
const int ledPin2 = 10;
const int ledPin3 = 9;
const int ledPin4 = 6;
// Variables will change :
int ledState1 = LOW; //
int ledState2 = LOW;
int ledState3 = LOW; // ledState used to set the LED LED STATUS :
int ledState4 = LOW;
long previousMillis = 0; // will store last time LED was updated :
long count = 0;
long interval = 140; // interval at which to blink (milliseconds) lower faster blinks :
void setup() {
// set the digital pin as output :
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
pinMode(ledPin4, OUTPUT);
}
void loop()
{
do
{
unsigned long currentMillis = millis();
if (currentMillis - previousMillis > interval) {
// save the last time you blinked the LED
previousMillis = currentMillis;
// if the LED is off turn it on and vice-versa :
if (ledState1 == LOW ) {
ledState1 = HIGH;
ledState2 = LOW;
}
else {
ledState1 = LOW;
ledState2 = HIGH;
count++;
// set the LED with the ledState of the variable :
}
analogWrite(ledPin1, ledState1);
analogWrite(ledPin2, ledState2);
}
} while (count < 3); //sets how many blinke, GREEN LED :
ledState2 = LOW;
analogWrite(ledPin2, ledState2);
count = 0;
//=========================================================
delay(1000); // PAUSE and sets the time beteewen set green and read
//=========================================================
do
{
unsigned long currentMillis = millis();
if (currentMillis - previousMillis > interval) {
// save the last time you blinked the LED
previousMillis = currentMillis;
// if the LED is off turn it on and vice-versa:
if (ledState3 == LOW) {
ledState3 = HIGH;
ledState4 = LOW;
}
else {
ledState3 = LOW;
ledState4 = HIGH;
count++;
// set the LED with the ledState of the variable:
}
analogWrite(ledPin3, ledState3);
analogWrite(ledPin4, ledState4);
}
} while (count < 2); //sets how many blinke, RED LED :
ledState4 = LOW;
analogWrite(ledPin4, ledState4);
count = 0;
//=========================================================
delay(1400); //sets the time between set green and read
//=========================================================
}