Show Posts
Pages: 1 2 [3] 4 5 ... 35
31  Using Arduino / Project Guidance / Re: 2 hour multpile timers help? on: August 18, 2014, 01:23:00 am
You mean millis, not micros.
32  Using Arduino / Project Guidance / Re: Image processing from arduino UNO on: August 17, 2014, 12:22:30 pm
Of course.
An absolute rotary encoder would fill that gap.
33  Using Arduino / Project Guidance / Re: Image processing from arduino UNO on: August 17, 2014, 08:49:01 am
Well, this for example.
http://www.adafruit.com/products/1733
34  Using Arduino / Project Guidance / Re: Image processing from arduino UNO on: August 17, 2014, 01:44:59 am
Let me ask again.
Why are you using camera to detect wind speed and/or direction? There devices that are designed specifically for this purpose and are much better at it.
35  Using Arduino / Project Guidance / Re: Image processing from arduino UNO on: August 16, 2014, 01:47:17 pm
To a PC.
But why are you using a camera to detect wind speed???
36  Using Arduino / Project Guidance / Re: 12 Button Keypad Minimal Matrix on: August 16, 2014, 01:15:25 pm
I'm checking if the button is pressed (<800), wait a bit, then check again and compare with intervals to determine which button is pressed. The interval for each button is eyeballed to extend roughly halfway to the next button value. I don't care if the value is dead constant, as long as it is not fluctuating too far from the sweetspot into the neighboring button's area,  but like I said, so far it appears to be good enough and I haven't seen any wrong button recognition.

Yes, this method needs more resistors than with your array idea, but consider the complexity of your PCB, too.
I'm using 0806 resistors. They take up almost no space and are cheap. You method requires either a two layer PCB with vias (not particularly fun doing in a DIY fashion) or quite a few jumpers.
37  Using Arduino / Project Guidance / Re: 12 Button Keypad Minimal Matrix on: August 16, 2014, 05:29:32 am
In the project I'm just finishing I'm using an Atmega8 with 7 buttons on one analog pin. Pin is pulled up internally. Each button has its own resistor. They are:
2K2, 5K6, 12K, 22K, 33K, 47K and 68K
Analogue values I'm getting are:
75, 150, 260, 400, 500, 580 and 660
Debounce is done in software and I have not seen any problems such as wrong button being recognized.
38  Using Arduino / Project Guidance / Re: Alt-Az Tracking Device - Astronomy Help! on: August 14, 2014, 06:10:14 am
Without gearing?
That is most definitely not the way I would approach it. It would require some pretty strong and extremely accurate servos to properly track the stars. Earth rotates once per day (duh), that means 0,004167 degrees per second. Even at medium magnification, you need several smaller adjustments each second to avoid noticeable jumps and telescope shaking. No servo of reasonable price can achieve that precision.
Gearing is the only reasonable way and to drive those gears you'd need either a DC motor with speed control and feedback or a proper stepper.
The conventional way of driving a stepper is with a microcontroller, so you can at least meet that requirement.

EDIT:
Is the alt-az mount a requirement? I would think that equatorial would be a significantly better option for star gazing.
39  Using Arduino / Project Guidance / Re: Solving angular measurements. on: August 14, 2014, 01:30:53 am
The problem you are having is because of this line:
    Serial.println(storedHeading[1] - storedHeading[0]);

You are not taking into account the direction of rotation, only the two positions where measurements are taken.
If you know you will never rotate your device for more than 179° at a time you can assume that it was rotated along the shorter direction, but that's not very nice way to do it.
Better, solution would be to check intermediate positions. You can accomplish that not by checking only when the button is pressed but continuously, and using that stream of information as a clue in which direction you are rotating your device.
40  Using Arduino / Project Guidance / Re: Can a single gps reciever get a RTK accuracy? on: August 12, 2014, 03:26:30 pm
An independent GPS unit capable of cm accuracy and costing less than (for example)  $500 would command an enormous market, so why isn't it here already?

The core of GPS system is not capable of that kind of accuracy. There is Gallileo, however.
http://en.wikipedia.org/wiki/Galileo_(satellite_navigation)
41  Using Arduino / Project Guidance / Re: Synchronized led blinking in multiple boards, wirelessly controlled on: August 12, 2014, 03:16:21 am
It's feasible.
One boards sends a ping to which the other board replies. The first board measures the time between sending and receiving the pulse, divides it by half for one way trip and applies the offset.
Assuming that the sending and receiving code is the same on both boards (takes the same amount of time) it should work.
42  Using Arduino / Project Guidance / Re: Can a single gps reciever get a RTK accuracy? on: August 11, 2014, 12:38:47 pm
Obviously not, as there would be no need for RTK system, would it?
Why not ultrasound for final approach? Much more accurate at small ranges than GPS.
43  Using Arduino / Project Guidance / Re: Game Console: Mutliple AVR work together on: August 08, 2014, 12:48:34 pm
Take a look at this:
https://www.youtube.com/watch?v=UApiKkhRDpo
44  Using Arduino / Project Guidance / Re: Two switches, one light, conditional? on: August 08, 2014, 11:58:28 am
No, not annoyed, just trying to get you into a habit of good naming as early as possible. The problem is not while you actively work on a piece of code. The problems start when you return to it after a few months and have no idea what you were thinking while writing it. Happened to me too many times. smiley-sad

You're welcome. If you need something else, you know where to find us.
45  Using Arduino / Project Guidance / Re: Two switches, one light, conditional? on: August 08, 2014, 06:54:09 am
No problem. Others helped me, all I'm trying to do is spread the love around.

Code:
      if (ledon  == LOW)
    {
      ledon = !ledon;                // toggle running variable
      digitalWrite(soundPin, ledon);      // indicate via LED
      unsigned long currentMillis = millis();
    }

Get rid of  "unsigned long".
You already declared that variable.
currentMillis = millis(); is enough.
I would advise you use a different, more descriptive, variable name, though. Something like buzzerOnMillis or similar.
Other than that, this part is good. You now know when the buzzer started to buzz.

Code:
if(currentMillis - previousMillis > three) {
    previousMillis = currentMillis;   
      if (ledon = true){
        digitalWrite(soundPin, LOW);
      }
  }
You never change the value of previousMillis so it's still 0. That means the code will enter this if statement if the buzzer was turned on more than three seconds after the power up. That is not what you want, is it?

You need to check if current time is more than three seconds after the time the buzzer was turned on.
if (millis() > currentMillis + three) or buzzerOnMillis if you chose to rename the variable.
Same condition can be expressed in more ways:
if (millis() - three > currentMillis)
if (currentMillis + three < millis())
if (currentMillis < millis() - three)
Pick the one you find the most intuitive.

You still need to add the part where you turn the flag back to LOW when the switches are in proper state.
Pages: 1 2 [3] 4 5 ... 35