Show Posts
Pages: 1 ... 27 28 [29] 30 31 ... 79
421  Using Arduino / Programming Questions / Re: Multiple baud rates on arduino on: November 12, 2013, 06:30:03 pm
Each SoftSerial should be independent. Just create two instances of SoftSerial. However, only one can be listening at a time.
422  Using Arduino / Programming Questions / Re: splitting decimal number to 2 pieces on: November 12, 2013, 06:21:38 pm
you can also use dtostrf() to create a character string out of it, and simply look for the '.' so you can pick it apart and send it, since you need a character anyway.
423  Using Arduino / Programming Questions / Re: is it possible to Serial.println(number,BIN) with leading 0's? on: November 12, 2013, 05:58:13 pm
i = whatever is "changing i inside the expression". It is taking the right side and assigning it to i.

the expression is:
Code:
i=i*2;
not
Code:
i*2

"A single expression should not cause the same object to be modified twice or to be modified and then inspected" C programming FAQs by Steve Summit.

so both
Code:
i = i++;
// and
a[i] = i++;

are both undefined, and undefined is the strongest language used in the C standard to describe stuff that you should never do.
424  Using Arduino / Programming Questions / Re: switch statement and const from class on: November 12, 2013, 11:20:16 am
The only time it matters (assuming that myFaderOne is in scope) is when you need a constant integer expression, i.e., one that is known at compile time, like the switch/case syntax. The designers of C could have relaxed that requirement and quietly created an if/else chain if the case statements are not constant, but they wanted to be able to create jump tables.
425  Using Arduino / Programming Questions / Re: MIDI.h library help on: November 11, 2013, 02:37:13 pm
Or just send your own custom message with the AllNotesOff bits.

You might also ask in the Audio and Midi sub-forum down below.
426  Using Arduino / Programming Questions / Re: MIDI.h library help on: November 11, 2013, 02:15:18 pm
I think it would be easier to keep track of the notes you sent.
427  Using Arduino / Project Guidance / Re: i need help by building a cloud/arduino based computer on: November 11, 2013, 01:38:13 pm
Quote
How does "cloud" fit into this?
Marketing 8^)
428  Using Arduino / General Electronics / Re: Why are the maximum ratings in negative volts? on: November 11, 2013, 01:21:45 pm
It's not redundant, it is what you *measure*. If you used a curve tracer in NPN mode to test a PNP you would see nothing because the trace would go below the screen.

What is wrong with negative voltage?

The only way to do it properly would be to have a BVcbo test for NPN's and a BVbco test for PNP's, which I think is more wrong.
429  Using Arduino / Programming Questions / Re: MIDI.h library help on: November 11, 2013, 11:21:16 am
Is there a question?
430  Using Arduino / Programming Questions / Re: Arduino Uno zero crossing strange behavior on: November 11, 2013, 11:20:29 am
Do not do delays in an interrupt!
If the zero crossing occurs, set a global flag and get out.
Use loop() to toggle the LED.
431  Using Arduino / General Electronics / Re: Why are the maximum ratings in negative volts? on: November 11, 2013, 10:39:21 am
Because it is a PNP and the base is the reference (ground) terminal.

If you reverse the polarity, you will forward bias the junction and get a small voltage.
432  Using Arduino / General Electronics / Re: Can you stack, or daisy chain many transformers for high voltage? on: November 11, 2013, 10:37:39 am
fungus, we will assume that that was a typo.
433  Using Arduino / General Electronics / Re: Can you stack, or daisy chain many transformers for high voltage? on: November 11, 2013, 10:15:42 am
To *really* impress the girls you need a Z-Machine:
http://www.sandia.gov/z-machine/
434  Using Arduino / Programming Questions / Re: Can Arduino handle 8 bit ASCII? on: November 07, 2013, 07:10:57 pm
Quote
8 is not a valid octal digit.

It was in the first versions of C descibed in K&R1!

9 was, too. ANSI straightened that out.
435  Using Arduino / Programming Questions / Re: Code Question on: November 07, 2013, 07:07:53 pm
Quote
Oh yes, that reminds me, some people seem to think that "return" in C needs
parentheses, when it doesn't...   

sizeof doesn't either in some contexts.
Pages: 1 ... 27 28 [29] 30 31 ... 79