Show Posts
Pages: 1 ... 1067 1068 [1069] 1070 1071 ... 1907
16021  Using Arduino / Programming Questions / Re: Using analogRead() on floating pin for random number generator seeding/generator on: April 26, 2012, 02:03:59 pm
But what if you build your seed from the LSBs of 32 consecutive reads?
16022  Using Arduino / Programming Questions / Re: log base 2? on: April 26, 2012, 02:02:44 pm
First principles:

logxn = logy n / logy x

Where y could be, say 10 or e
16023  Using Arduino / Programming Questions / Re: making my piezobuzzer and vibrator run simultaneously with obstacle detection on: April 26, 2012, 12:40:34 pm
When should our assignment be ready by?
16024  Using Arduino / Programming Questions / Re: Can we check the status (High or Low) of 0 pin in an attachinterrupt void ? on: April 26, 2012, 12:06:15 pm
Quote
When the car enter : we have a +1 When the car exit : we have a + 1
Your car park is going to appear to fill up very quickly
16025  Using Arduino / Programming Questions / Re: Character limit? on: April 26, 2012, 09:26:55 am
Quote
But I don't, I get this instead,
49
end
50
end
51
end
That's precisely what I'd expect you to get.
Serial comms are SLOW, you can whip around your while loop loads of times in the time it takes to receive one character (in fact, it's only your serial prints that are slowing you down)

Quote
This indicates that every other Serial.read() results in a -1 null character instead of reading the next character.
No, Serial.read returns -1 when there is nothing there to read, i.e. nothing has been received. (-1 is most definitely NOT null)


Follow your code through:
In loop, suddenly "available" returns 1 because a character has just been received.
Call ReadData, set c to zero, test to see if c is a semicolon (it isn't), so read the character that just came in.
it isn't -1, so print it.
Go back to the top of the while, see if the character was a semicolon.
It wasn't a semicolon, so read the the next character.
Oh dear. It hasn't arrived yet.
16026  Using Arduino / Programming Questions / Re: code help regarding reading multiple analog inputs on: April 26, 2012, 09:11:19 am
Quote
You only use A0 and A1 when you want to use the analogue pins as digital ones.
Sorry Mike, that's not so.

Quote
You also haven't set the analog pins to INPUT. 
analogRead implies that the pin is an input; there's no need to set pinMode
16027  Using Arduino / Programming Questions / Re: Character limit? on: April 26, 2012, 09:02:25 am
Quote
iData is a lousy name, by the way. It gives no clue what is in the array.
...and could get you into trouble with Apple.
16028  Using Arduino / Programming Questions / Re: Real help asked!!! on: April 26, 2012, 08:14:40 am
Quote
Still looking for help....
With what?

Quote
I ám not sure if i must use a startbutton to startup the whole program.
If you're not sure what your requirements are, we can't impose them on you.
16029  Using Arduino / Project Guidance / Re: Precise (in time) event logging. ~100ns required. on: April 26, 2012, 08:08:55 am
Quote
provided one sample can be taken every clock cycle.
Well, of course, there's the problem - most instructions take at least one cycle.

(BTW 1/16 000 000 = 62.5ns)
16030  Using Arduino / Programming Questions / Re: Character limit? on: April 26, 2012, 07:26:57 am
Quote
his works, but could get trapped in a infinite loop if ';' is never reached.
You could put in a timeout
16031  Using Arduino / Programming Questions / Re: Can we check the status (High or Low) of 0 pin in an attachinterrupt void ? on: April 26, 2012, 05:27:56 am
Why do you think you need an interrupt?
Whether or not a car is in a parking spot is hardly a high-priority, low-latency event.
16032  Using Arduino / Programming Questions / Re: Loop not repeating in execution on: April 26, 2012, 05:07:00 am
http://arduino.cc/forum/index.php/topic,97455.0.html
See, in particular, section 6.
16033  Topics / E-Textiles and Craft / MOVED: Global Outdoor/Expedition Apparel Brand looking to integrate Arduino Tech on: April 26, 2012, 05:01:27 am
This topic has been moved to Gigs and Collaborations.

http://arduino.cc/forum/index.php?topic=103080.0
16034  Using Arduino / Programming Questions / Re: smoothing max numReadings on: April 26, 2012, 04:53:08 am
Quote
How!?! please... do tell.
10.21 fixed point arithmetic, I'm guessing   (log22000000 = 20.931)
16035  Using Arduino / Programming Questions / Re: Real help asked!!! on: April 26, 2012, 03:06:57 am
Quote
please don't use title like "Real help asked!!!"
Perhaps s/he is a member of the Spanish monarchy.   smiley-grin
Pages: 1 ... 1067 1068 [1069] 1070 1071 ... 1907