Show Posts
Pages: 1 ... 1205 1206 [1207] 1208 1209 ... 1910
18091  Using Arduino / Programming Questions / Re: Problem with mapping analog value using map() on: December 24, 2011, 03:04:15 pm
Quote
int samples[8];  // 8 is fine, but you only need to set this to 7.
I'd prefer 8, to match the for loop.
18092  Using Arduino / Programming Questions / Re: Serious Noob question, please help!! on: December 24, 2011, 03:02:50 pm
Any particular reason for not using the servo library?
18093  Using Arduino / Project Guidance / Re: Sensor Proximity on: December 24, 2011, 02:21:51 pm
That looks like an interrupter, not a proximity detector
18094  Using Arduino / Programming Questions / Re: Float decimal precision...Why only two digits? on: December 24, 2011, 02:21:11 pm
Code:
Serial.println(value, yourNumberOf PlacesHere);
But, as noted, floats are not good for more than about 6.
18095  Using Arduino / Programming Questions / Re: Delay in main loop causes crash on: December 24, 2011, 01:19:54 pm
I don't think you're using cbit outside of the interrupt, so no need for it to be declared volatile.
The reason for declaring variables as volatile is if they could otherwise be reasonably optimized out by the compiler.
18096  Using Arduino / Programming Questions / Re: Delay in main loop causes crash on: December 24, 2011, 12:58:24 pm
I think you've been a bit liberal with the use of "volatile".
Some of those variables are not shared between interrupt context and normal context.
18097  Topics / Robotics / MOVED: Arduino based autonomous radio control model car on: December 24, 2011, 11:56:08 am
This topic has been moved to Exhibition / Gallery.

http://arduino.cc/forum/index.php?topic=84400.0
18098  Using Arduino / Programming Questions / Re: Problem with mapping analog value using map() on: December 24, 2011, 10:46:11 am
k is still zero.
18099  Topics / Science and Measurement / Re: Ultrasonic Sensor not working - my fault oder malfunction? on: December 24, 2011, 10:35:54 am
The pdf suggests that the device is more like a Ping, with trigger and echo sharing a single pin, but your code is more like it is intended for a SRF04.
18100  Using Arduino / Programming Questions / Re: Adding 2 relays to clock for on -off times on: December 24, 2011, 10:21:24 am
Where is your code?
18101  Using Arduino / Programming Questions / Re: Problem with mapping analog value using map() on: December 24, 2011, 09:46:08 am
Samples is a pointer.
A constant.
(k is initialised, it was set to zero because it is a global.)
18102  Using Arduino / Programming Questions / Re: Newbie Syntax issues, HELP! on: December 23, 2011, 04:57:56 pm
RightPin has the value 9.
It is always true.
18103  Using Arduino / Programming Questions / Re: Reverse geocache code on: December 23, 2011, 04:24:55 pm
What does the serial debug output tell us?
18104  Using Arduino / Programming Questions / Re: Combine two bytes into one integer to get a 12-bit value. on: December 23, 2011, 02:32:08 pm
Bitwise AND?
18105  Using Arduino / Programming Questions / Re: how to switch variables around on: December 23, 2011, 09:28:24 am
Don't sweat it - the compiler would probably have cleaned it up for you.
Pages: 1 ... 1205 1206 [1207] 1208 1209 ... 1910