Show Posts
Pages: 1 ... 23 24 [25] 26 27 ... 235
361  Using Arduino / Programming Questions / Re: MPU6050 reading values on: March 08, 2014, 12:42:39 pm
The problem that you have not shared with us is probably in the program that you have not shared with us.
362  Using Arduino / Programming Questions / Re: Leonardo R3 problem with one dosing pump on boot up on: March 08, 2014, 12:38:02 pm
What happens if you put motor 3 on pin 12 and motor 4 on pin 11 ?
Does the problem still happen and with which motor ?
363  Using Arduino / Programming Questions / Re: Leonardo R3 problem with one dosing pump on boot up on: March 08, 2014, 05:18:35 am
Is there a reason why you did not post your code here or attach it to your message ?
I am reluctant to click on links to random sites that I have never heard of.
364  Using Arduino / Programming Questions / Re: Accelerometer (X,Y,Z) values using 433mhz using virtualwire.h on: March 08, 2014, 05:16:22 am
Have you got VirtualWire.h on your PC and where is it ?
Turn on verbose output during compilation (File/Preferences) and try verifying the code.  What error messages do you get ?
365  Using Arduino / Programming Questions / Re: how to exit a sequence if variable changes on: March 08, 2014, 03:03:03 am
Quote
I've tried breaking each sequence out to its own void
I don't understand how anyone can be writing such complicated code and still refer to functions as voids.  If you saw this function
Code:
int square(int a)
{
    return a * a;
}
would you refer to it as an int ?
366  Using Arduino / Programming Questions / Re: Reverse calculation gives wrong result on: March 08, 2014, 02:53:17 am
Shouldn't xResult be a float ?
No not according to the AccelStepper library documentation, it should be a long.
http://www.airspayce.com/mikem/arduino/AccelStepper/classAccelStepper.html#ace236ede35f87c63d18da25810ec9736
Well, considering that the code you posted does not compile (yGearRatio and yMicroSteps not defined) and it does not use the AccelStepper library, I don't see the relevance of what  AccelStepper wants.
367  Using Arduino / Programming Questions / Re: UNO loop nested if else while on: March 08, 2014, 02:38:52 am
It's time for you to post all of your program and explain how things are wired.  Pull up/down resistors for instance.
368  Using Arduino / Programming Questions / Re: UNO loop nested if else while on: March 08, 2014, 02:19:22 am
Code:
        while(0)
        {
          Serial.println("manauto");
          delay(1000);
        }
This loop will never print anything because
Code:
while(0)
will never be true.

Also, the first and last curly braces in your code are not necessary.

369  Using Arduino / Programming Questions / Re: Where to Float and Trim Decimal Places on: March 08, 2014, 02:07:10 am
Using
Code:
Serial.println(difout);
I get
-1.78
-3.33
-4.28
-4.93
-5.35
-5.64
-5.82

Using
Code:
Serial.println(difout, 2);
I get
-1.78
-3.33
-4.34
-4.99
-5.41
-5.64
-5.88
-6.00
Using
Code:
Serial.println(difout, 2);
I get
-1.6631999969
-3.0888004302
-3.9204001426
-4.5144004821
-4.8114004135
-5.0490002632
-5.2272000312

I have nothing connected to the analogue pins.  Are your results different ?
370  Using Arduino / Programming Questions / Re: Arduino Pro Mini Software USB on: March 08, 2014, 01:56:03 am
I am not entirely sure what question you are asking, but I have a 328 based Pro Mini (16V, 16 MHz) and connect to USB with a device like this http://www.ebay.co.uk/itm/FT232RL-FTDI-USB-to-TTL-Serial-Converter-Adapter-Module-fr-Arduino-Mini-3-3-5V-/191081981731.

In use it is indistinguishable from using an R3 UNO once the correct board is selected in the IDE.
371  Using Arduino / Programming Questions / Re: First Project-measuring voltage programming on: March 07, 2014, 06:10:06 pm
Quote
How did you get 90 seconds from the number 900000?
By miscounting the number of zeroes !

Do you want 15 minutes between each individual reading (as you have now with the delay() inside the for loop) or 15 minutes between each set of readings (move the delay() outside of the for loop).

I don't have time right now to go into storing the data for analysis but I think that you should consider saving the data to an SD card.
372  Using Arduino / Programming Questions / Re: First Project-measuring voltage programming on: March 07, 2014, 05:46:51 pm
Code:
    delay(900000);
Do you mean to have 90 seconds between reading each sensor during which time nothing will happen ?

Quote
I am not sure that I have successfully "assigned the data as a variable" or not
You haven't.  Apart from printing the voltages what do you want to do with the values ?
373  Using Arduino / Programming Questions / Re: Little help with Arduino timed relays, Thank you! on: March 07, 2014, 05:40:24 pm
Why are you obsessed with setting millis() back to zero ?
If you use millis() correctly
Code:
if (millis() -  startTime >= interval)
  {
     //do stuff after the interval has elapsed
     startTime =millis();
  }
Then there is no need to reset millis().  The millis() value will overflow after about 41 days but the test will still work if all the variables used in the calculation are defined as unsigned long.
374  Using Arduino / Programming Questions / Re: Aritmetics Functions on: March 07, 2014, 01:16:34 pm
http://www.cplusplus.com/reference/cmath/ as a start ?
375  Using Arduino / Programming Questions / Re: Reverse calculation gives wrong result on: March 07, 2014, 12:03:51 pm
Shouldn't xResult be a float ?
Pages: 1 ... 23 24 [25] 26 27 ... 235