DC Brushed Motor Not Running Correctly
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- odonohoe
- Posts: 21
- Joined: Wed Mar 09, 2016 8:37 pm
Re: DC Brushed Motor Not Running Correctly
Dear Support , thank you for the information. I am using a circuit constructed on a breadboard with a transister and a diode. Do you think that this is okay for driving a DC motor in one direction with a 9 volt battery? thanks
- odonohoe
- Posts: 21
- Joined: Wed Mar 09, 2016 8:37 pm
Re: DC Brushed Motor Not Running Correctly
Code: Select all
#include <Servo.h>
Servo esc;
int arm = 1000
int speedvalue;
int steady = 300
int initiate = 0
void setup() {
// put your setup code here, to run once:
esc.attach(6);
esc.writeMicroseconds(arm);
delay(2000);
esc.writeMicroseconds(1200);
delay(15);
esc.writeMicroseconds(1300);
delay(15);
}
void loop()
// put your main code here, to run repeatedly:
if(initiate<1{
throttleUp();
initiate = 1;
}
esc.detach();
}
1. expected unqualified id before numeric constant
2. expected , or ; before "int"
3. expected initializer before "if"
4. "esc" does not name a type
5. expected declaration before } token Thanks if you can help
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: DC Brushed Motor Not Running Correctly
That depends on the motor and what kind of performance and run time you expect.Do you think that this is okay for driving a DC motor in one direction with a 9 volt battery? thanks
In general, 9v batteries are a poor power source for motors. They have relatively low capacity and a very high internal resistance, so they drain quickly and do not perform well with high current loads.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: DC Brushed Motor Not Running Correctly
C++ statements require a semicolon terminator. The semicolon is missing on several of these statements....but I still have errors...
Code: Select all
int arm = 1000
int speedvalue;
int steady = 300
int initiate = 0
- masha
- Posts: 7
- Joined: Thu Mar 16, 2017 9:36 am
Re: DC Brushed Motor Not Running Correctly
Dear Support, Can an esc and brushless motor in a quad copter kit be programmed to run off an arduino uno for autonomous not RC control without flashing the firmware on the esc?
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: DC Brushed Motor Not Running Correctly
@masha - Better to start a new thread for this question,
Please be positive and constructive with your questions and comments.