Show Posts
Pages: 1 ... 157 158 [159] 160 161 ... 302
2371  Using Arduino / Programming Questions / Re: Reading values from an array on: January 20, 2013, 06:17:15 pm
ooops! you found a bug, LOL!

Maybe I was wrong about being wrong....

highest: 16 8 4 2 1 -- exits on zero
level: 5 4 3 2 1 -- and if 0 then none match

And all the pins can be read in ... if I have this correct, maybe 1 or 2 cycles.

2372  Community / Bar Sport / Re: Aaron Swartz sucide on: January 20, 2013, 05:30:11 pm
There is no correcting those people. None whatsoever. They live in fact-proof bubbles.
2373  Using Arduino / Programming Questions / Re: Reading values from an array on: January 20, 2013, 05:26:29 pm
ooops! you found a bug, LOL!

It needs a bit more in case they're all zero. Maybe I spelled that kat?

2374  Using Arduino / Programming Questions / Re: what input pin is it using? on: January 20, 2013, 05:23:27 pm
I would use an Arduino to read 1 sensor on 1 pin to maybe fill an array at the tap of a button with timestamps showing state change times **just to see if I get useful data**.

If I didn't have a laptop to save those to then maybe I'd have them go to SD or EEPROM for later retrieval. Perhaps I'd think of a way to get speedometer data in there or just write that on paper.

You could have it read a pin and light up one of a row of leds to show data within different ranges. You don't have to be exact, just look for a suitable match to what you need.

What have you tested already? Do you need more complete or better data?
What can I say? I still don't know what this is for anyway.
2375  Using Arduino / Programming Questions / Re: Reading values from an array on: January 20, 2013, 04:53:57 pm
untested, and I probably spell cat wrong too

Code:
// Say this array contains {1, 0, 0, 1, 0}

byte bitArray = 0b01001; // low order bit is on the right here

byte highest = 16;
byte level = 5;

while ( highest ) // same as while ( highest > 0 )
{
  if ( bitArray >= highest )  break; // exits the loop, your answer is in 'level'
  highest /= 2;
  level--;
}

Serial.print( "The highest is #" );
Serial.println( level, DEC );


Choose your pins with care and you could load bitArray with a single Port read.
2376  Using Arduino / Programming Questions / Re: math problem on: January 20, 2013, 04:42:59 pm
Is HSL floating point?

2377  Using Arduino / Programming Questions / Re: what input pin is it using? on: January 20, 2013, 04:34:42 pm
That first link --- anyone who pays that much for a Hall sensor has more money than knowledge. Holy cow, what a ripoff!

You have sensors in place though I'm not clear what you want the data for... is it to know speed?

Again, I would gather data and see which is suitable before even starting to design a final package.
2378  Community / Bar Sport / Re: Aaron Swartz sucide on: January 20, 2013, 04:26:44 pm
It has everything to do with presumption of innocence; you probably don't understand what that actually means.

Good luck with that. Since the Police State took over, innocent until proven guilty doesn't happen until you hit court and they're working on fixing that too.

Get deep in tard-con country and you'll hear gems like "He didn't EARN his rights!". That gets Amens. Yup, and they're all patriots too. Here's to the Evangelist States of America, everyone else Howdy Now Git!

2379  Community / Bar Sport / Re: So what (grin) resistor should i use for this LED then? :D on: January 20, 2013, 03:55:26 pm
Hey, he reached equilibrium before disaster.

I've read that new leds and new solar cells lose about 10% in less than a year with normal use but the loss rate slows down after that.

2380  Community / Bar Sport / Re: Measuring the speed of light using cheese. on: January 20, 2013, 03:47:51 pm
In the show they got 6.5 cm. I think they used cheese slices for the huh? factor.

I see full episodes are up on Youtube. It should start at 41 mins into this ep:
https://www.youtube.com/watch?v=_t0EgviIbR0

Anyway this is a cheap ploy to get people to watch a very interesting series.

2381  Community / Bar Sport / Re: millis() eschatology on: January 20, 2013, 03:38:10 pm
Industry leaders are working on an if-else solution!
2382  Community / Bar Sport / Re: Scalable Efficient power storage on: January 20, 2013, 03:24:47 pm
Pumping water up into water towers has been scalable for how long? And doesn't need to get hot enough to melt salt just to start working.

I hope this works too. The opposition will be fierce though.

2383  Community / Bar Sport / Measuring the speed of light using cheese. on: January 20, 2013, 02:50:07 pm
There's a show (foreign to me so I find out a bit late) called Dara Briain's Science Club. It's interesting to say the least.

So anyway on one episode they show how to calculate the speed of light using cheese on bread in a micowave oven. The how is by disabling the turntable, cooking for a short time and measuring the distance between hot spots where the cheese started to melt. That goes into an equation... I guess based on interference (at least that's what we used in physics class 1973) to get the wavelength which multiplied by the frequency got them within 7% of the actual value.

That using a pocket scale to measure distance between 2 melt spots in cheese as the experiment data gathering is just pure brilliance to me.

2384  Using Arduino / Programming Questions / Re: what input pin is it using? on: January 20, 2013, 02:35:57 pm
3 sensors on 1 wheel? Well, it's for ABS... how to know what they measure?

Do they all measure rotation of the same wheel?
Do you have data (including time and maybe speed) from any 1 sensor?

A 28" diameter wheel turns about 12 times a second at 60 mph (88 f/s).

12 rps x 60 magnets is only 720 pulses per second, but again how long are the pulses? The hall sensor only detects the magnet for a limited time, not 1/720th of a second so you have less time than that to catch the signal.
That stated, you might be able to use pulseIn to know the speed of the wheel from just one magnet going by one (but maybe not just any one) sensor.

If I was trying to find answers, I would collect related data first.
2385  Using Arduino / Programming Questions / Re: what input pin is it using? on: January 20, 2013, 01:30:36 pm
ABS as in the braking system? So rpm is rpm of the wheel?

Do you have multiple sensors or multiple magnets activating a single sensor?

Pages: 1 ... 157 158 [159] 160 161 ... 302