Show Posts
Pages: 1 2 [3] 4 5 ... 100
31  Using Arduino / Programming Questions / Re: Variables - Convert 16 bit into 2x 8 bit and vice versa on: August 28, 2014, 04:17:14 pm
I think you missed a shift in your first Hi calculation.
32  Using Arduino / Programming Questions / Re: Flash Memory of Arduino Uno on: August 26, 2014, 10:27:48 am
It is the RAM you are running low on, not FLASH. Actually you should take some of the global data hogging up RAM and put it in flash. Show your code.
33  Using Arduino / Programming Questions / Re: unsigned long operations gives unexpected result on: August 26, 2014, 09:56:46 am
Or rearrange things to do the (x-xa) * (yb-ya) before dividing by (xb-xa)
34  Using Arduino / Programming Questions / Re: byte PROGMEM list[100] .. strange results on: August 25, 2014, 04:01:31 pm
Or do that. 8^)
35  Using Arduino / Programming Questions / Re: unsigned long operations gives unexpected result on: August 25, 2014, 03:59:34 pm
Yup, your "slope" calculation = 3.96, which will turn into 3.
36  Using Arduino / Programming Questions / Re: byte PROGMEM list[100] .. strange results on: August 25, 2014, 03:58:28 pm
I don't think you can use PROGMEM as an automatic variable - one defined inside a function. Move it to the global data area outside of setup().
37  Using Arduino / Project Guidance / Re: Maximum Current Pulse on: August 25, 2014, 03:13:21 pm
Bondwires fuse in a very short amount of time.
38  Using Arduino / Programming Questions / Re: unsigned long operations gives unexpected result on: August 25, 2014, 03:11:12 pm
yb-ya is negative.
39  Using Arduino / Programming Questions / Re: Strange behaviour of "return value;" on: August 25, 2014, 11:53:04 am
Unconditional? In a row?

I said in a function.
40  Using Arduino / Programming Questions / Re: Strange behaviour of "return value;" on: August 22, 2014, 06:35:04 pm
Do you KNOW what return does? If ENDS the function. Having two return statements makes no sense. The second one is never executed.

There are lots of reasons to have multiple return statements in a function. It might be an error return, or two "forks" of processing . It is one of the easy ways to avoid gotos. 8^)

Now multiple *entry* points - which almost made it into C with the original "entry" reserved keyword, I am not so sure about.
41  Using Arduino / Programming Questions / Re: timmer resseting without complete reset of counter? on: August 22, 2014, 01:13:28 pm
Your long delay calculations don't fit into an int. Add a "UL" after one of the numbers to force the calculation to be unsigned long.
Code:
delay(15*60*1000UL)
42  Using Arduino / Project Guidance / Re: Fast analog polling on: August 22, 2014, 12:35:20 pm
Don't do serial writes while polling. save the data in an array and spit it out after the event.
43  Using Arduino / Programming Questions / Re: gps guided car on: August 21, 2014, 05:30:00 pm
You better have a big track, since GPS is only good to 10 meters or so.

Gather all the characters into a string and convert it with strtod().
44  Using Arduino / Project Guidance / Re: While wiht complex condition not executing on: August 21, 2014, 10:54:25 am
The only comment is to try to put the most likely condition first, since a logical statement like that will "short circuit" when the truth of the expression can be reliably determined.

In this case, if 'H' happens more often than 'k', move it to the head of the line.
45  Using Arduino / Project Guidance / Re: transer GPS coordinates over RFM12b on: August 21, 2014, 10:50:35 am
I am not familiar with tinyGPS - I wrote my own - but it might be better to send the coordinates as text, since that is what the GPS sends to the arduino anyway. If tinyGPS does not give you access to the actual NMEA string, you might want to write your own.
Pages: 1 2 [3] 4 5 ... 100