Show Posts
|
|
Pages: 1 [2] 3 4 ... 24
|
|
18
|
Using Arduino / Programming Questions / Re: Using switch instead of if
|
on: September 17, 2011, 05:20:03 pm
|
|
Why do you keep saying that? Its really quite unlikely that the Arduino headers would ever redefine HIGH as 255. Despite the reason that you mentioned in your last post, it wouldn't happen for a host of reasons. First, it would break existing code, and second, even if there was an integrated D/A, so digitalwrite dealt with PWM, it would be incredibly inefficient to always use a 100% PWM for a logic high, because you would waste a timer. Not to mention that there aren't enough timers for pwm on every pin. Furthermore, 1 is the universally excepted logic high (think of boolean, true/false) not 255. So you can safely assume that the constants HIGH and LOW wont be redefined until bits are replaced with qubits.
|
|
|
|
|
20
|
Community / Bar Sport / Re: Need for an IP seeking cruise missile or good manners don't cost nuthin'!
|
on: September 17, 2011, 12:19:32 pm
|
|
I agree, and focalist said it really well. The great thing about arduino is the low barrier to entry (in terms of knowledge and price) and this forum makes it possible.
However, on the subject of manners, I think that someone showing up on the forum without doing any research whatsoever, and has literally turned to the forum before google, or any of a host of easily accessible beginner resources, and asks for their project to be done for them, is just as rude as a condescending response.
When I first got interested in electronics, I did a lot of research and reading of tutorials and books, and it payed off, and I now do a lot of engineering projects outside the scope and scale of arduino, and am learning new stuff all the time, which is a lot more fun than asking a veteran forum member to write your code and send you a schematic. I do think, for those too lazy, or who haven't had the thought to check out any of the many resources, a few sticky threads would be a good idea.
|
|
|
|
|
21
|
Using Arduino / Project Guidance / Re: XBee Shield to make slow universal USB Extender
|
on: September 10, 2011, 08:53:08 am
|
|
You should use the USB over ip hub with a cheap n router out in the woods. Put Linux on the router and you may be able to power the radios on/off. Also , if it has GPIOs you could use those for the shutter. Otherwise, connect an arduino + Ethernet shield to the router for shutter control.
Then connect your eos software - running computer to that network, and ta da!
|
|
|
|
|
22
|
Using Arduino / Project Guidance / Re: Decimal to Binary Conversion Issue
|
on: September 07, 2011, 10:02:14 am
|
and unless you know HIGH==1 and LOW==0 it is not the same as writing digitalWrite(4, ((var & B00010000) ? 1 : 0));
as digitalWrite might be programmed to turn on the output when it gets a parameter 5, or 255 or something else.
From wiring.h #define HIGH 0x1 #define LOW 0x0
It doesnt get any more constant than that.
|
|
|
|
|
28
|
Using Arduino / Project Guidance / Re: Decimal to Binary Conversion Issue
|
on: September 06, 2011, 05:59:12 pm
|
Why not just use bitread()? i.e.: int var = 13; digitalWrite(4, (bitread(var,4)); digitalWrite(5, (bitread(var,3)); digitalWrite(6, (bitread(var,2)); digitalWrite(7, (bitread(var,1)); digitalWrite(8, (bitread(var,0));
|
|
|
|
|