Show Posts
Pages: 1 ... 126 127 [128] 129 130 ... 364
1906  Using Arduino / Programming Questions / Re: Beginner Serial Communication on: August 09, 2013, 08:19:14 am

I do not know exactly where it is wrong. I tried directly to connect the pin to 5V but not start the laser.
Arduino I have no time to check that communication is good.
I have found that Arduino pin 10 receives signal  LR4 Tx.
For now I'd settle for that arrancase laser.

The wiring looks okay to me. Testing serial voltage is easy. When not sending, the line is HIGH. Just meter the voltage between LR4 RX and ground. I would use larger value resistors for the divider just to draw less current but that is me. 10k is not too much.

Do you want the laser for range finding or just to have a laser?
http://dx.com/p/12mm-5mw-red-laser-diode-modules-black-dc-4-5v-165078
I bought a bag of these thinking they were just the diodes. Then I bought another bag when I found they are diode, optics and constant current circuit able to run on 5V. They won't pull more than 20mA, safe for Arduino pins.
No, I haven't run a test to find the lifetime of one. At 46 cents each, I got extras.


1907  Using Arduino / Programming Questions / Re: Firmata on: August 09, 2013, 08:03:36 am
I won't assume ignorance or laziness then. Just don't ask what I think now. Good luck.



 
1908  Using Arduino / Programming Questions / Re: for loop locks up on: August 09, 2013, 07:55:16 am
That's just a function you use to get the RAM value. You sketch can use it.

The snips are all the other code not shown.
Code:
.......snip............

int freeRam ()
{
  extern int __heap_start, *__brkval;
  int v;
  return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}

..... snip.........

Serial.print( "Free RAM = " );
Serial.println( freeRam() );

......snip..........

1909  Using Arduino / Programming Questions / Re: Assistance correcting code please on: August 09, 2013, 07:48:38 am
Quote
Perhaps you meant to write:

Code:
  FreqCounter::start(1000);
  while (FreqCounter::f_ready == 0)
    {/* DO NOTHING */}
  frq=FreqCounter::f_freq;

I hadn't realized that the space in between made the difference. Although, now that I have fixed that it seems to not have made any difference. My readings are jumpy and incorrect. Could it be a problem with noise? or a problem with the readings interfering with each other?

The space does not. What he wrote is equivalent to:
Code:
  FreqCounter::start(1000);
  while (FreqCounter::f_ready == 0); // the loop ENDS at the test, if true it loops again
  frq=FreqCounter::f_freq;

What you wrote is easier read as:
Code:
  FreqCounter::start(1000);
  while (FreqCounter::f_ready == 0)
  {
    frq=FreqCounter::f_freq;
  }

If you -always- put in the brackets -always- at the same indent level THEN
it will -always- be easier to check your code.

Try running the old frequency sketch just to see if the wiring has not changed.


1910  Using Arduino / Programming Questions / Re: Firmata on: August 09, 2013, 07:29:42 am
Learn to Google. Or is that too much effort?

Top link from search on 'Firmata' gets http://firmata.org/wiki/Main_Page

1911  Using Arduino / Programming Questions / Re: for loop locks up on: August 09, 2013, 07:25:04 am
I've used this with UNO and have no reason to think it won't work on a MEGA.

Code:
int freeRam () {
  extern int __heap_start, *__brkval;
  int v;
  return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}

1912  Community / Bar Sport / Re: "94 billion dollars in medical costs" on: August 09, 2013, 07:16:03 am
Healthcare as a barely regulated (joke) profit industry will always cost the most possible to give the least possible. Same as the power industry since the regs were removed, all these now companies to make things more efficient yet in the biggest energy glut in decades, consumer prices have more than doubled.
Some things should not be left to profiteers and thieves given little or no oversight. Here they have that and they get to "work with" the government to make the rules they use to steal all they can.
 
Wizdum, how can you have a free market when a few hundred people control most of everything between them?
1913  Using Arduino / Programming Questions / Re: Serial Port Error - Arduino and Processing can't run together on: August 08, 2013, 04:59:51 pm
It might depend on what you call Arduino. I call the Arduino IDE the IDE but someone might call it Arduino.

1914  Community / Bar Sport / Re: Your latest purchase on: August 08, 2013, 04:50:42 pm
I bought one of these from Amazon/STAHL for $20 to replace my Radio Shack 30W pen.
Quote
Soldering Station Features Continuously Variable Power Between 5-40W, a 1.5mm Pointed Tip
http://www.amazon.com/Soldering-Station-Features-Continuously-Variable/dp/B0029N70WM/ref=sr_1_1?ie=UTF8&qid=1375992087&sr=8-1&keywords=soldering+station

I know you pros are shaking your heads at this toy. It doesn't work right out of the box.

First thing I had to do was fix it and that took a Y-shape security tip to get the handle open after rolling & sliding the grip off. Then lift the wires and push inside until the heating element made contact with what it should have been with a nice click. Did that back and forth a few times to be sure then hot glued the wires halfway down the handle to keep it there. They should stay, they're thick, stiff wires in heat shrink.
Put back together, it works now as far as melts solder even turned down though it does take a while to heat up.

I'll see how it goes and probably get my $20 worth.
1915  Community / Bar Sport / Re: "94 billion dollars in medical costs" on: August 08, 2013, 04:38:24 pm
Proper food, no dangerous activities, the people have decided that you and others would have longer lives as industrial slaves. So far you have to be convicted of a crime to become one but with new laws upcoming your best interests will be enough.

1916  Using Arduino / Programming Questions / Re: Serial Port Error - Arduino and Processing can't run together on: August 08, 2013, 03:20:21 pm
It sort of looks almost like your Arduino is sending scientific notation.....

You might write a Processing sketch that does nothing but log and display what the Arduino is sending, including some representation of unprintable characters (lately I go for " xHH" where HH are two hex digits giving the value.

Do this to isolate the problem. Keep reducing until there can only be one answer, then see if it is that or something you didn't think of.. yet.

1917  Using Arduino / Programming Questions / Re: Beginner Serial Communication on: August 08, 2013, 01:35:15 pm
I don't have the laser device that you do, just lasers. Did you test the voltage with a meter? Did you give it 5V before and it worked? Is there some message you can send it end get a message back?

1918  Using Arduino / Programming Questions / Re: Serial Port Error - Arduino and Processing can't run together on: August 07, 2013, 07:01:49 pm
If Processing opens a COM port then serial monitor could connect to it. If the COM port is one that an Arduino usually uses, the Arduino should get a different COM port. Processing can watch for the Arduino to plug in and connect to that as well.

1919  Using Arduino / Programming Questions / Re: getting keypress output as linearity. on: August 07, 2013, 06:34:00 pm
You name the int array 'key'. It is not good to name a char 'key' as well.
What is i? Where did you declare it?
It's a good thing that p doesn't increment because there's nothing to stop it from running past the end of key[].

But don't fix those until you learn more how. You are not familiar with the code you try to write.

In your IDE click File->Examples->05 Control-> and go through all of those examples starting with Arrays. Then go do 02 Digital->BlinkWithoutDelay which tells how to deal with time on Arduino.

Code:
int key[10];
int p;

void loop()
{  
  
  key[p] = key;
  i++;
  
  char key = keypad.getKey();

  if (key != NO_KEY)
  {
     Serial.print(key);
  
  }
}

but   error shows here key = key;
1920  Using Arduino / Programming Questions / Re: Two Potentiometer Arduino to xbee to xbee to Arduino to two Led's on: August 07, 2013, 06:08:19 pm
Thank You for your help GoForSmoke and Runaway Pancake,  The Potentiometers and the Leds work great.

Thanks Much.....


BenBenBen

Okay but it's up to you to figure out how to make the code non-blocking. That will allow you to put in other features. A good start would be learning BlinkWithoutDelay.

Pages: 1 ... 126 127 [128] 129 130 ... 364