Show Posts
Pages: 1 [2] 3 4 ... 1917
16  Using Arduino / Programming Questions / Re: Simulation error on: September 29, 2014, 03:52:31 am
while(Serial.available() > 0) {
    serialRead =;
    while (location[0] == 0 && serialRead == 'x') {
      Serial.println("locationx =");
      location[0] =;
So, let's say the first character in the buffer is an 'x'.
Let's also say that the output buffer is empty, so the Serial.println takes almost no time at all.
Then you read another character.
17  Using Arduino / Programming Questions / Re: laser speed detector/calculator on: September 29, 2014, 03:13:14 am
but i have a timing issue if i time with micros() after about 70,000 microseconds it overflows
Use the correct data type for the return value of the function.
Post code.
Use code tags.
18  Topics / Robotics / Re: Servo Problem on: September 28, 2014, 02:03:31 pm
Can someone tell me where is the problem?
I can't see the video, but your diagram shows you're powering the servo from the Arduino.
Don't do that.
19  Using Arduino / Programming Questions / Re: (x)printf formatting question on: September 28, 2014, 01:20:17 pm
You could write your own format string with another sprintf, but that's a work around, so I won't suggest it.
20  Using Arduino / Programming Questions / Re: Arduino + 23K256 on: September 28, 2014, 01:18:21 pm
21  Using Arduino / Programming Questions / Re: How to parse a char array? on: September 28, 2014, 01:12:24 pm
22  Using Arduino / Storage / Re: EEPROM storing infromation? on: September 28, 2014, 01:05:59 pm
So, how many readings in your target time period?
How many bytes per reading?
How many bytes available?

Simple arithmetic.
23  Using Arduino / Project Guidance / Re: code advice ?! on: September 28, 2014, 08:37:58 am
I'd ditch the switch/case, and use a simple if/else with a range rather than a single threshold value.
The chances of hitting it exactly may be pretty slim.
24  Using Arduino / Storage / Re: EEPROM storing infromation? on: September 28, 2014, 08:36:09 am
But while it's true that a digital pin is a mere bit, won't you need to read a digital port (as opposed to pin) as a byte, else you'll end up writing a byte for each pin.

And the 10-bit analog pin is presumably going to cost 2x 8-bit bytes?
Not if you do things sensibly.
You may waste four bits for all six analogue inputs (60 bits, next nearest is 64 bits == 8 bytes), but that's a saving over the twelve bytes you'd use otherwise.
Depending on how many digital inputs you're saving, you may not waste even that much.
25  Using Arduino / Project Guidance / Re: Storing programs on SD card on: September 28, 2014, 08:31:20 am
See reply #1
26  Using Arduino / Programming Questions / Re: Trying to display temperature on a TFT on: September 28, 2014, 01:37:31 am
too few arguments to function 'char* dtostrf(double, signed char, unsigned char, char*)'
Error messages don't come much clearer than that.
You're still using String (incorrectly) - can it.
27  Using Arduino / Programming Questions / MOVED: EEPROM storing infromation? on: September 28, 2014, 01:34:14 am
This topic has been moved to Storage.
28  Using Arduino / Storage / Re: EEPROM storing infromation? on: September 28, 2014, 01:33:41 am
One bit per digital pin, ten bits per analogue pin.
Simple arithmetic.
29  Using Arduino / Project Guidance / Re: servo not working on external power supply on: September 27, 2014, 03:20:51 pm
Grounds connected?
30  Using Arduino / Programming Questions / Re: How to application delay code in a part on: September 27, 2014, 12:45:47 pm
The answer is, as neary always, get rid of delay, and look at the blink without delay example, or the example posted at the top of the project guidance section
Pages: 1 [2] 3 4 ... 1917