Show Posts
Pages: 1 ... 69 70 [71] 72 73 ... 294
1051  Using Arduino / Programming Questions / Re: Stuck in a function programming on: February 26, 2014, 12:53:25 am
Your return needs a ;

Code:
return InputData;
1052  Using Arduino / General Electronics / Re: Why did they put this resistor here? on: February 26, 2014, 12:50:01 am
Afaik, it's to limit the current into the base.
1053  Using Arduino / Programming Questions / Re: Coding an XOR on: February 26, 2014, 12:41:29 am
Yes Nick, but I meant as a sibling to the && and || ones, not as a bitwise operator.
1054  Using Arduino / Programming Questions / Re: Coding an XOR on: February 25, 2014, 11:16:31 pm
I think that would still make sense, since XOR means only one, of however many inputs there are, is true.

Anyhoo, me off to work.... 0630 here, have to keep the wheels of commerce and industry turning.
1055  Using Arduino / Programming Questions / Re: Making a DC motor change directions? on: February 25, 2014, 11:08:49 pm
Here's an easier way to code your XOR:

Code:
if ( ( (button1 ==HIGH) &&  (button2 == LOW) ) || ( (button1 == LOW) && (button2 == HIGH) ) ){
// do XOR code
}

(attrib: CrossRoads)
1056  Using Arduino / Programming Questions / Re: Coding an XOR on: February 25, 2014, 11:06:30 pm
Ah yes, that's an easier way... I'll suggest that to the OP on the other thread.

But no built in "XX" as an XOR sibling to "&&" and "||"?
1057  Using Arduino / Programming Questions / Coding an XOR on: February 25, 2014, 10:39:42 pm
Morning fellow Arduinites....

(Well it's morning here, any way)

This line...

Code:
if (((button1State == LOW) || (button2State == LOW))  // if we're pushing button 1 OR button 2
      && !                                               // AND we're NOT
      ((button1State == LOW) && (button2State == LOW))) // pushing button 1 AND button 2
                                                        // then...
  {

.... in this thread codes an XOR longhand. I wonder if this is the best way to do it?

As a matter of interest why is XOR not available as a Boolean operator, say XX, as in...

Code:
if (((button1State == LOW) XX (button2State == LOW)) 

(Or if it is, it's not listed here.)
1058  Community / Exhibition / Gallery / Re: Electromagnetic Accelerator on: February 25, 2014, 01:33:34 pm
I was going to build one of these but there aren't enough pins on a Uno.
1059  Using Arduino / Project Guidance / Re: The stuff I'm about to buy for my first project... on: February 25, 2014, 11:04:36 am
You'll want to look at the voltage drop through whatever chip your chosen motor shield uses. From memory, the L298 for example, loses 2V minimum and up to ~4 at high currents. You need to factor in the losses.... 6V in doesn't give you 6V at the motor. (Or use chips that don't suffer from such drastic waste.)
1060  Community / Bar Sport / Re: whats with the attitude on: February 25, 2014, 09:40:36 am
Quote
“( please)  read the rules, auto-format your  code and put it in quotations or I will not help you”

BZZZZT... you mean code tags, surely  smiley-razz
1061  Using Arduino / Microcontrollers / Re: mA question on: February 25, 2014, 09:25:32 am
"They" should make a nice chart of that...
1062  Using Arduino / Project Guidance / Re: Resin dosing on: February 25, 2014, 12:31:49 am
Are the densities the same?- OP says ratio is by weight but presumably a peristaltic pump will deliver by volume?
1063  Community / Website and Forum / Re: Server clock time seems to be ~10 minutes slow on: February 25, 2014, 12:23:40 am
Testing the time.... posting this at 0733 my time, utc+2

edit.... and it's stamped 0723 my time, so yep, 10 mins out still.
1064  Using Arduino / Programming Questions / Re: A function definition is not allowed before the '{' token on: February 24, 2014, 01:12:31 pm
We have one. What is a code tag?

Read the sticky threads at the top of the board.

1065  Community / Exhibition / Gallery / Re: Electromagnetic Accelerator on: February 24, 2014, 01:04:42 pm
Well done, that's a great piece of work.
Pages: 1 ... 69 70 [71] 72 73 ... 294