Show Posts
Pages: 1 [2] 3 4 ... 1911
16  Using Arduino / Programming Questions / Re: Arduino freezing segfault? on: September 22, 2014, 09:14:26 am
Of course, you don't want to make things worse. . .
Code:
Serial.println (F(".......some message describing the problem....")) ;
17  Using Arduino / Programming Questions / Re: hazard in serial ? on: September 22, 2014, 09:00:38 am
Quote
however they never get larger than 63
on the Mega and 15 on the Uno
63 for both.
18  Using Arduino / Programming Questions / Re: Arduino freezing segfault? on: September 22, 2014, 05:46:34 am
Code:
void loop(){
uint8_t * lbuffer = new uint8_t [2500];
if(lbuffer == NULL)
Serial.println("Fatal Error: Fail to allocate memory");

for(ushort i = 0; i <2500; i++)
lbuffer[i] = 0xAA;
So, you've got a fatal error, but you carry on as if nothing had happened?
19  Using Arduino / Project Guidance / Re: Ultrasonic sensor HC-SR04 delivers wrong distance on: September 22, 2014, 05:35:21 am
Quote
but the data I get back is totally wrong . For example: The display shows 26,7cm but if I measure it manuallly I have 31cm.
Have you accurately calibrated the speed of sound at your location?
20  Using Arduino / Project Guidance / Re: Wireless baby monitor using Arduinos? on: September 22, 2014, 05:33:23 am
Consider this. By the time you've bought two Arduinos, two XBees, shields, a microphone, some speakers, and other odds and ends, you are well over the cost of a pre-made unit, and you still have a lot of work to do.
Also consider that by the time you've got all this working, Junior could be at college.
21  Using Arduino / Programming Questions / Re: PulseIn function is too slow for my Sonar on: September 22, 2014, 05:11:58 am
Have you looked at using the NewPing library?
22  Using Arduino / Storage / Re: Add Ram and Flash Memory Using SD Card on: September 22, 2014, 03:48:05 am
You can't.
23  Using Arduino / Programming Questions / Re: hazard in serial ? on: September 22, 2014, 03:08:42 am
Has anybody else than me experienced hazard in serial when pressing it to the limit ?


Never seen a problem - what's yours?
24  Using Arduino / Programming Questions / Re: Problem with large-ish arrays of strings on: September 22, 2014, 01:48:47 am
It's pointless attaching such a small amount of code, just post it between code tags.

Code:
const int dataRows = 8;

const char* refs[] = {
"REF",
"",
"R30",
"R188",
"R190",
"R189",
"R117",
"R9",
"R6",
"R2",
"R5",
"R4",
"R1",
"",
"R126",
"R133",
"R130",
"R124",
"R122",
"R109",
"R95",
"R96",
"R94",
"R105",
"R106",
"R108",
"R107",
"R97",
"R99",
"R98",
"R100",
"R110",
"R125",
"R129",
"",
"R132",
};
const char* vals[] = {
"VAL",
"",
"10K",
"470",
"1K",
"960",
"10K",
"3K",
"100K",
"470K",
"1M",
"22K",
"470K",
"",
"1K",
"100K",
"18K",
"10K",
"100K",
"1.5M",
"100K ",
"100K",
"100K ",
"47",
"820",
"820",
"47",
"100K",
"100K",
"100K",
"2.4M",
"1.5M",
"100K",
"10K",
"18K",
"100K",
"1K",
"",
"390",
"2.2K",
"2.2K",
"1K",
"150K",
"18K",
"22K",
"18K",
"18K",
"18K",
"18K",
"22K",
"18K",
"150K",
"1K",
"2.2K",
"2.2K",
"390",
"",
"20K",
"10K",
"10K",
"10K",
"",
"",
"2.2K",
"150K",
"150K",
"100K",
"1K",
"470",
"470",
"470",
"470",
"1K",
"100K",
"150K",
"150K",
"2.2K",
"",
"",
"10K",
"10K",
"10K",
"20K",
""
};
const char* notes[] = {
"NOTES",
"START PASS A",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"ROW 2",
"",
"",
"",
"",
"",
"VERTICAL",
"MATCHED 1",
"",
"MATCHED 1",
"",
"",
"",
"",
"MATCHED 2",
"",
"MATCHED 2",
"",
"VERTICAL",
"",
"",
"",
"",
"",
"ROW 3",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"ROW 4",
"",
"",
"",
"",
"",
"",
"",
"",
"",
".2 OR .3 ONLY",
"",
"",
"",
"",
"",
"",
".2 OR .3 ONLY",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"ROW 5"
};





void setup() {

  Serial.begin(9600);

}


void loop () {

  for (int a = 0; a < dataRows; a++) {
    Serial.print("\t");
    Serial.print(a);
    Serial.print("\t");
    Serial.print(refs[a]);
    Serial.print("\t");
    Serial.print(vals[a]);
    Serial.print("\t");
    Serial.print(notes[a]);
    Serial.print("\n");
    delay (100);
  }

}



25  Using Arduino / Sensors / Re: Thumbstick Potentiometer without a deadzone? on: September 22, 2014, 01:32:48 am
You can just program a dead-zone, you don't need a specific device.
26  Using Arduino / Programming Questions / Re: Excessive use of IF statements on: September 21, 2014, 11:38:11 am
Quote
it is real assertion of "code progress for dummies RAM-prodigals"
One of the key foundations of embedded debugging is that you try to minimize the impact of your trace/debug efforts on system performance.

Profligate use of RAM is utterly counter to this philosophy.
27  Using Arduino / Project Guidance / Re: Bit Shift Right Issues on: September 21, 2014, 11:02:27 am
Quote
bits = (bits << 31);          //100..00 (move to MSB)

These three lines can be shortened to

  unsigned long bits = 0x8000;
Very much a no cigar scenario.
28  Using Arduino / Programming Questions / Re: cannot connect between HC-06 and LM35 Temperature Sensor on: September 21, 2014, 10:45:51 am
Quote
. the Moderators could always just ignore the lack of code tags and see if the universe spins off its wheels
This particular reluctant moderator mostly does ignore lack of code tags, until the poster uses 'i' as an index . . .
(Or 'b', 's', 'u' . . .  you get my drift)

And then I go ape-sh*t.
29  Using Arduino / Project Guidance / Re: Throw Darts At High Velocity! on: September 21, 2014, 10:05:10 am
I like the sabot idea, but you'd have to be very careful to ensure a symmetrical separation.

( I think there was once a very similar Scrapheap Challenge solution,, but I can't quite recall the problem - repeating crossbow?)
30  Using Arduino / Programming Questions / Re: SOS using AnalogWrite on: September 21, 2014, 09:30:59 am
There aren't any (that was a clue) in the fragment I quoted.
I though that if I hovered near one curly bracket, it would show its mate.  It doesn't seem to do that
maybe you're not looking far enough away.
Pages: 1 [2] 3 4 ... 1911