Show Posts
Pages: 1 ... 23 24 [25] 26 27 ... 72
361  Using Arduino / Project Guidance / Re: Help please? on: January 12, 2014, 08:07:25 pm
You've defined DEBUG as a const. Don't you want it to change to true sometimes?
Nowhere have you changed it to true, so none of your if(DEBUG) statements will ever run.
362  Using Arduino / Programming Questions / Re: Blink without delay Problem on: January 09, 2014, 10:13:36 pm
jasmine2501 is right, you have to look at it in another way.

Let the loop() function run over and over again. Check the serial input, if something is available, read it and process it. If nothing is available, just let loop() run over and over again. Check the timing in the loop().

There are more than one ways to do the timing:
You remember the previousMillis and compare it with the currentMillis.
Why use the variable currentMillis when millis() is almost the same thing, but more accurate?
363  Using Arduino / Project Guidance / Re: simple button request / led activation doesn't work on: January 09, 2014, 09:38:15 pm
You're missing a resistor in the LED circuit.
You're using Pin 13 which has an onboard LED. This may be interfering with your LED. Try using a different pin for your LED.
364  Using Arduino / Project Guidance / Re: need help controlling servos using millis in sequence. on: January 03, 2014, 07:41:41 pm
Code:
void setup(){
unsigned long Startservo1 = millis();
unsigned long Startservo2 = millis();
periodservo1 = 100;
periodservo2 = 300;
}

void loop(){
//do whatever starts servo1

if (millis() - Startservo1 =>periodservo1){
//stop servo 1
}
//do whatever starts servo2

if (millis() - Startservo2 =>periodservo2){
//stop servo 2
}

365  Using Arduino / Programming Questions / Re: int var = 0, starts at 622 on: December 27, 2013, 09:52:00 pm
Is that zero or letter O?
366  Using Arduino / Project Guidance / Re: Need guidence on script to drive 2 DC motors concurrently on: December 27, 2013, 09:27:37 pm
Code:
void loop(){
   
  Serial.print("!!tick motor1 forward ");    motor1.run(FORWARD);      // turn it on going forward
  motor1.run(RELEASE);      // stopped
You start your motor, then immediately stop it. No wonder it's not turning.
Try putting a delay in between them.
367  Using Arduino / General Electronics / Re: Problem with reed switch. on: December 26, 2013, 08:56:05 pm
Or move both the switch and magnet nearer to the wheel hub for less angular velocity.
368  Using Arduino / Programming Questions / Re: Avoiding delay() in for loop on: December 25, 2013, 09:39:51 pm

One last thing, after uploading the sketch the first LED that lits is LED 2 (Pin7) not LED 1.
Code:
ledPin = ledPin +1;
if (ledPin == 14){
ledPin = 6;
Moving this code to AFTER you've turned the LED on should solve that.
369  Using Arduino / Project Guidance / Re: Store and Forward Telephone Rotary Dial Pulses on: December 21, 2013, 09:00:51 pm
while (millis - lastPulse < 750)

this gives an error

i cant find out why
Try:
Code:
while (millis() - lastPulse < 750)
370  Using Arduino / Programming Questions / Re: delay 1 day on: December 20, 2013, 09:49:32 pm
You do realise that during the delay your Arduino will not be able to do anything useful.
371  Using Arduino / Project Guidance / Re: Counting a button press during led fade cycle on: December 20, 2013, 09:16:45 pm
Get rid of the delay()s. See the 'blink without delay' example.
372  Using Arduino / Programming Questions / Re: Proof of Concept on: December 19, 2013, 08:32:27 pm
Without your code we are unable to help, as we're not mindreaders.
373  Using Arduino / Project Guidance / Re: Set up of Arduino Uno + Adafruit Motor Shield + USB Host Shield + PS3 Controller on: December 19, 2013, 08:22:12 pm
Hi there,

for a project based engineering course I would like to control in total 7 actuators (Servo, Stepper, DC Motor).
How many of each?
Quote
I would like to control this with a PS3-Controller use a LiPo-battery as a power source.

I attached my theoretical Project Set Up.  My biggest concern is to choose the right hardware. My proposal is the following. Maybe you can give me feedback on that:

- Arduino Uno
- Ardafruit Motor Shield http://www.adafruit.com/products/1438
- USB Host Shield for PS3 Controller

My Questions are:

1) Can you recommend an USB Host Shield that works fine with Arduino Uno & the Adafruit Motor Shield?
Go to the Adafruit forum and see the post which lists pins the motor shield uses.
Quote

2) If I want to stack a second Adafruit motor Shield, will it be possible, Are there enough pins?
Nope
Quote


What I basically want to do is simple: I want to use a Controller to steer 7 actuators (Servos, Stepper, DC Motors)

Thank you for your help
Daniel


374  Using Arduino / Project Guidance / Re: Model Railway Layout with Mega 2560R2 on: December 19, 2013, 08:00:57 pm
You haven't stated this, but I presume you want to control the speed and direction of your loco from the Arduino. If you use a motor shield for this you won't need relays to switch direction/track polarity, it can all be done in the programming. I suggest you start with just your Mega and a motor shield to get the loco running on a straight piece of track first and then add the servo controls for the points, leaving the lighting and sounds to last.
375  Using Arduino / Project Guidance / Re: Paranormal Investigation Equipment on: December 16, 2013, 08:34:55 pm
Good Afternoon,

I have just started investigating into the paranormal with my team in the UK.

You do realise that Ghostbusters is fiction, don't you?
Pages: 1 ... 23 24 [25] 26 27 ... 72