Show Posts
Pages: 1 ... 126 127 [128] 129 130 ... 304
1906  Community / Bar Sport / Re: a look into the arduino factory on: March 16, 2013, 11:37:42 am
Nice!

1907  Community / Bar Sport / Re: Your latest purchase on: March 16, 2013, 11:33:29 am
They also have no other device they claim is the "real thing".  Why wouldn't you go for the higher priced Mega?  Leonardo?  I mean, if you are going to steal, make it worth it, you know?  So strange.

Couple things.

I think they have production lines using and warehouses full of older parts they're selling off cheap just to hit certain marks on production economies. Tooling and setting up is expensive. You gotta complete so many runs to pay that off. What can I say? I wrote estimation and bidding packages back when we still made things here, made fixtures and jigs, set up and worked parts myself.

That was in a job shop where a shorts run was 10's of something. The real gains are in the millions+ and thinking way down the road.
But what a lot of places don't think about is change, often for the sake of change as much as anything regardless of market rhetoric. The old stuff that does what it always did and suits a huge range of tasks becomes a matter of fashion whether it's clothes, cars or chips.

One reason I got into Arduino instead of using the money to upgrade my PC is because Arduino is simple and I liked my time with simpler computing and know it has value. I can program a 328P with an UNO and use that same DIP 328P all on it's lonesome to do amazing things for cheap.

I also think that the language and culture barrier West to East does count. Let them know with some tact and they may change the labeling. How many things of theirs have we grabbed onto labels and used without knowing the full significance? Probably more than we know if we include corporate interactions. As a country we can't even get terms between our own sub-cultures straight much of the time, with predictable (ongoing bigot-test) results, so give them a chance!
1908  Using Arduino / Programming Questions / Re: Float precision 6-7 digits, is it 6 or 7? on: March 16, 2013, 11:02:12 am
From the Wikipedia page:

Quote
Any integer with absolute value less than 2^24 can be exactly represented in the single precision format, and any integer with absolute value less than 2^53 can be exactly represented in the double precision format

I'll give you the "minus one" but it is saying absolute value less than 2^24.

So you should be able to store -16777215 to +16777215. Not half of that.


When I talk about places I only count the digits that can be 0 to 9. The above has 7 places. Yet the Reference doc says 6-7 and that gives me the feeling that there's values where it's true.

32 bit signed or unsigned I call 9 places.
1909  Using Arduino / Programming Questions / Re: Wait for real end of serial transmission on: March 16, 2013, 10:52:01 am
Of you want to run the newest then run it but some of us would rather the use quirks we know.

1910  Using Arduino / Programming Questions / Re: Float precision 6-7 digits, is it 6 or 7? on: March 16, 2013, 12:49:40 am
Try with negatives.
1911  Using Arduino / Programming Questions / Re: Wait for real end of serial transmission on: March 15, 2013, 08:32:08 pm
So it's pretty quick until you have more string than hardware buffer?

Wow. I write Serial.available() driven routines... if I want the most responsive code doing much text-out it would make sense to manage what I feed Serial when, on a BlinkWithoutDelay scale.  smiley-lol

1912  Using Arduino / Programming Questions / Re: Wait for real end of serial transmission on: March 15, 2013, 08:19:19 pm
Does flush() block?

1913  Using Arduino / Programming Questions / Re: sprintf with two char buffers >> not working? on: March 15, 2013, 08:16:00 pm
Preferably a small sketch that only runs in setup(). This one's got to be easy.
1914  Using Arduino / Programming Questions / Re: Accessing serial data stored in a buffer using a char pointer ? on: March 15, 2013, 08:13:12 pm
And I'll toast ya with ale next time I'm down at Big Jim's. It's cups there but at least it's ale.

1915  Community / Bar Sport / Re: Your latest purchase on: March 15, 2013, 08:05:30 pm
Another reason I like my Teensy 2.0's, they do pay towards the project and cost less even w/pins.

But mostly it's about AVR w/USB including a Mega2560-class version.
I don't even try to solder pins to those after I &%@$-ed up one of their micro-SD adapters.
1916  Using Arduino / Programming Questions / Re: Float precision 6-7 digits, is it 6 or 7? on: March 15, 2013, 04:50:09 pm
It's IEEE floating point. Count on 6 places and sometimes 1 will be .9999999.

If you're good with numbers and remember the by-hand ways then you can achieve more accuracy using 32 and 64 bit integer fixed-point --- in general faster than using floats on AVR-based Arduinos.

Really, 9 places with type long and 19 places with type long long.

My suggestion is if you want like meters to 6 places then use micrometers as your unit and only print the decimal point for human use.

There are ways to use integers to get greater range but since I don't need them I forget the details. Try looking up the Big Number library just for fun, number of places is arbitrary and may be as large as you have RAM and time.

Here's more than you want to know about floating point:
http://introcs.cs.princeton.edu/java/91float/
1917  Using Arduino / Programming Questions / Re: Switch-case loop problem?! on: March 15, 2013, 04:17:08 pm
First, let me say; You've done a good job utilizing loop() and timers correctly. It's like fresh air not to be typing "learn BlinkWi....".

But in this case I think you've overdone it with the control variables. It needs to be simpler.

Code:
 case 1:
      if( millis() - prag_tm1 > 3000) // this keeps being true
    {
      flag_tm1 = 1;
    }
    if( millis() - prag_tm2 > 10000) // even when this is true
    {
      flag_tm2 = 1;
      var = 0;
    }
  break;

You have 1 variable for gate to go up and another for gate to go down.
And then here you have the gate-up variable being set every time after 3 seconds.

I suggest that you have twice the control variables and timers that you need.
Just use one gate movement variable with 0=no move, 1=up, 2=down.
Just use one timer. Where do they ever get set different?
Increase the number of states that var can have to 2 and break up case 1 into 2 cases.

Possibly use 1 control variable with more than 3 states to combine var and the gate control.

Possibly in a block of comments, outline the action in steps and use pseudocode as needed to make the needed steps clear. You can check your code against that.


1918  Using Arduino / Programming Questions / Re: Accessing serial data stored in a buffer using a char pointer ? on: March 15, 2013, 03:43:34 pm
And a Happy Saint Patrick's Weekend to ya! Drink a Jameson's for me, willya?

One thing, just to make sure as I'm not. Make buffer[], and any arrays and variables referred to by different functions as global by defining them right up near the top above setup() even. A static inside loop() should not be visible outside loop().
1919  Using Arduino / Project Guidance / Re: infrared sensor connecting to computer on: March 15, 2013, 10:20:32 am
That's different. Use IR leds and detectors. Put the detectors in tubes or behind apertures or both.
Cost should be small.

1920  Using Arduino / Project Guidance / Re: infrared sensor connecting to computer on: March 15, 2013, 09:15:54 am
With light, a simple pair of beams to interrupt your player would not be able to aim to break.

With IR light you might be able to make two 'fans' of IR and try to catch the reflection as the ball passes through. I do say "try" because I give this almost no chance to work.

It would be much simpler to listen for the hand to hit the ball and the ball to hit the wall and compute with speed of sound and distances (player to wall, player to mic, wall to mic) data.

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