Show Posts
Pages: 1 ... 36 37 [38] 39 40 ... 98
556  Using Arduino / Programming Questions / Re: confusion with bitwise on: January 15, 2014, 12:58:30 pm
Ah, so that is what "sup" means in the editor. 8^)
557  Community / Bar Sport / Re: Good, Cheap Camera for Close Ups? Macro? on: January 15, 2014, 12:56:38 pm
You can get something like this:
http://www.bhphotovideo.com/c/product/87503-REG/Canon_2824A001_77mm_500D_Close_up_Lens.html

558  Community / Bar Sport / Re: Thomas Edison vs Tesla on: January 15, 2014, 12:50:27 pm
Quote
I can't comment on the safety aspect, but just imagine the size of the conductors in the distribution grid if we'd have gone the DC route. There wouldn't have been enough copper in the world.
Some of the super high voltage transmission lines are DC now. To bring DC to the home requires highly efficient DC-DC converters, however. In the beginning, transformers were a very nice way to transform voltages up and down. To do this with DC requires high voltage semidonductors.
559  Community / Bar Sport / Re: Big Picture Question - Arduino as a sort of "computer" ? on: January 15, 2014, 12:45:23 pm
You should probably stick Maxwell in there, too. though quantum mechanics and relativity kind of encompass that, since magnetism is a relativistic effect of the electric force.
560  Using Arduino / Programming Questions / Re: confusion with bitwise on: January 15, 2014, 12:42:34 pm
You always start from the least signifigant bit, so that 2^N tells you the value of the bit. Otherwise, bit zero could be 128, 32768 or more depending on the size of the word.
561  Using Arduino / Programming Questions / Re: Is it necessary to use pointers in Arduino C ? on: January 15, 2014, 12:01:36 pm
The word is "preprocessor abuse"
http://c-faq.com/cpp/slm.html

I understand that one of the unix shell programs was written this way, and that has made it a bear to maintain.  All languages have idioms, it is better to just learn them and not kick against the goads.

AFAIK, the designers of C had only one regret, the precedence of the logical logic operators.
562  Using Arduino / Programming Questions / Re: Is it necessary to use pointers in Arduino C ? on: January 15, 2014, 11:51:40 am
Robin2:
So should we replace '+' with 'plus' and '^' with 'XOR'?

The only bad thing is that they reused '*' and '&'. Couldn't '&' for the address operator been '@'?
563  Using Arduino / Programming Questions / Re: I need AVR Dude to erase eeprom on: January 15, 2014, 11:44:03 am
I am guessing that he does *not* want to erase the EEPROM at startup, only when he re-programs the chip.

This is only slightly more kludgey than a separate sketch, but you could program a magic number in EEPROM, and in setup() check it. If it doesn't match the number in the program erase the EEPROM, otherwise, leave it alone. __DATE__ could be used to make it happen automagically.

Pseudo code would go like this:
Get magic string from EEPROM.
Compare to __DATE__
If it does not match then erase EEPROM and put __DATE__ into magic string
else - continue on
564  Using Arduino / Programming Questions / Re: Arduino UNO hang/integer array on: January 15, 2014, 11:07:51 am
Because the way you do it the data lives in flash most of the time, it only gets put into RAM when the stack frame for the function is created. (Which is also a performance penalty, btw.)
565  Community / Bar Sport / Re: Big Picture Question - Arduino as a sort of "computer" ? on: January 15, 2014, 10:39:44 am
Go for it.
566  Using Arduino / Programming Questions / Re: TX, RX programming on: January 15, 2014, 10:37:23 am
Look in the reference for "Software Serial"
567  Using Arduino / Programming Questions / Re: Arduino UNO hang/integer array on: January 15, 2014, 10:36:34 am
You are probably running out of RAM. Those arrays are being created on the stack.
568  Using Arduino / General Electronics / Re: divede analog signal between 2 analog inputs for getting high resolution on: January 15, 2014, 10:12:14 am
I should not be so hard on xzarth, I just realized that that is essentially how flash A/D converters work. Though flash converters are not used for better *resolution*, but speed.

ETA:
I used this in college (1983!) to digitize some pots for my multimedia controller:
http://www.paia.com/ProdArticles/ek7.htm
569  Using Arduino / Programming Questions / Re: TX, RX programming on: January 15, 2014, 09:45:28 am
The arduino has no "default" program, unless you count blink which just blinks the LED. It can do nothing until you program it. There is no "passthrough" mode.
570  Using Arduino / Programming Questions / Re: Delete EEPROM every time Arduino is turned ON on: January 14, 2014, 04:08:32 pm
I know, it was a joke. 8^) I assumed that using the word "halt" would have been a big clue.
Pages: 1 ... 36 37 [38] 39 40 ... 98