Show Posts
Pages: 1 2 3 [4] 5 6 ... 460
46  Using Arduino / Programming Questions / Re: ENC28J60 vs WIZnet w5100 simple server code difference ? on: August 13, 2014, 06:39:17 pm
Quote
I want it to be a server using mac only to start
That's not what your current wiznet code does.  Behind your "server.begin" is ARP, IP, TCP, and other stuff that is hidden from you, but nevertheless THERE.  To get similar code to work on the ENC28J60-based network, you have to have a library that implements all of those protocols (they are implemented in hardware on the WizNet chip.)

(actually, I don't think the Wiznet code will work as shown, because it doesn't specify or acquire an IP address.  In that sense (ie "it doesn't do anything"), it should be easy to duplicate with the Microchip ethernet controller. :-) )
47  Using Arduino / Microcontrollers / Re: ATMega8a Bootloader on: August 13, 2014, 06:26:56 pm
Quote
This is because different atmega8 bootloaders work at different baud speeds.  ... Even worse, if the bootloader is not the same a change in the fuse settings and/or available memory may need to be updated for correct operation.
To be fair, this is true of the m328 as well, but there are fewer bootloaders "in common use", and all of them are at least some-what supported by someone.  Mega8 bootloaders are more of a "find one you like and make it work" thing.
48  Using Arduino / Programming Questions / Re: Arduino does not recognize new line from Matlab fprintf on: August 13, 2014, 03:50:32 pm
He's suggesting a delay.
In general, if you're expecting to read certain characters, you should replace Serial.read() calls with a function that waits for the traffic:
Code:
int getcwait() {
   while (Serial.available() == 0)
     { /* spin */ }
   return Serial.read();
}
49  Community / Bar Sport / Re: How do they weigh.... on: August 13, 2014, 03:41:22 pm
Quote
2750 psi? That's good for 30 minutes?
That was the (old-ish) standard steel tank - 72 ft^2 at 2750psi, about 30 minutes at 30 feet depth (close to an hour at the surface.)
Modern tanks are bigger and higher pressure.  80ft^2 at 3000psi typical for Aluminum, and I see some composite tanks at 4300psi. (hmm.  All are negatively buoyant when full and float when empty.)  (The SCUBA "big idea" is that you breath gas an ambient pressure.   And then exhale as bubbles.  1 Atm additional pressure for every 10m depth, approximately.  So at 30m depth, you use up your air three times faster than at the surface.)

Quote
You would have to spend the hours breathing helium+oxygen+CO2 just to get the nitrogen out of your blood before helium in your tank would do you any good.
Huh?  Nitrogen has several problems:
1) At higher pressures, nitrogen starts behaving like an anesthetic.  Individual tolerance supposedly varies, but getting "drunk" at 150ft down is "not good."
2) Nitrogen dissolves in your blood.  At higher pressures, more dissolves, and then it un-dissolves when the pressure is reduced again, resulting in the infamous "bends."  The longer you stay in high-pressure situations, the more nitrogen dissolves in your blood, and you have to make "decompression" stops where you wait at various (shallower) depths for the nitrogen to exit via your lungs instead of as bubbles in your circulatory system.
Breathing Helium/oxygen mixtures is considered "Technical diving", which is one step past "Sport diving."  I believe it's done mostly to avoid the narcosis issues; my training didn't include any helium decompression info (In the 70s when I took my first class, Helium wasn't available to amateurs.  My second class in the early 90s, it was explicitly "not included" in the sport diver training); but I recall reading that helium mixes don't entirely eliminate bends-like problems.

I've never heard of a need to purge atmospheric pressure nitrogen from your system...  (although, after diving, even without needing decompression, you are supposed to avoid low-pressure situations (like airplane flights) for quite some time...)
50  Using Arduino / Programming Questions / Re: Arduino does not recognize new line from Matlab fprintf on: August 13, 2014, 01:55:21 am
I would expect "parseint" to "eat" the character that terminates the number.  So if you send "1 2 3\n", parsing the third number will read the \n as well, leaving the next Serial.read() to return the next character AFTER that (or -1 if nothing is there.)
(This doesn't explain why it seems to work when using the serial monitor.)

If this is correct, you can probably fix it by having the matlab code send an explicit terminator before the newline ("1 2 3 \n" - note the extra space.)
51  Using Arduino / Programming Questions / Re: Compiler math bug 2*60*1000 = -11072 on: August 12, 2014, 08:42:26 pm
Quote
The compiler assumes 16 bit for the #define expressions - that is different from all other compilers I am using.
Yes, this is likely.  Most modern C compilers run on 32bit CPUs and make an "int" be 32bits long.
Since the AVR is an 8bit CPU, it only uses 16bit "ints" (which are about twice as fast and twice as small (code-size) as 32bit ints would be.  This is allowable, and is NOT a bug.  But it can be surprising.  (The original PDP/11 "C" compiler had 16bit ints too.)
52  Using Arduino / Microcontrollers / Re: Arduino Mega2560 as ISP to program another Arduino Mega2560 on: August 12, 2014, 08:34:43 pm
It is equally a bug that the "bootrst" fuse is left programmed (0) on a  m328 when you do "upload using programmer."  It only works if the sketch is short enough not to overlap where the bootloader WOULD be...

This was apparently reported a long time ago, but never understood well enough to fix.  I've added a comment to the bug.
https://github.com/arduino/Arduino/issues/388
53  Using Arduino / Microcontrollers / Re: Arduino Mega2560 as ISP to program another Arduino Mega2560 on: August 12, 2014, 05:15:26 am
It was uploading sketches via ISP that wasn't working?
It's possible that that doesn't work on 2560, but does work on 328, because the program counter wrap-around happens differently on a chip with more than 64kwords of flash.  On a 328, if you start in the "bootloader section" at 0x3F00 (where there isn't any actual code), it will execute relatively useless but unharmful instructions till it gets to 0x3FFF, and then wrap around to location 0x0, where your sketch actually begins.  On a 2560, if the bootloader section starts at 0x1F000 and muddles along to 0x1FFFF, I'm not sure whether it will wrap to 0x0 (your sketch), or to 0x10000 (middle of nowhere, where it will eventually wrap again.)

I can't find this clarified in the documentation.  Not that you need a "long" jump/call or to use EIND to change the high bit during normal program execution.
54  Community / Bar Sport / Re: Holy Crap Lightning Strike Damage! on: August 12, 2014, 12:33:12 am
Quote
what was more surprising was that it blew up my telephone and (dial-up) modem. My telephone service cable runs underground until it enters my house!
conduction of lightning strike through the ground is apparently one of the common ways to get hurt...
http://www.aharfield.co.uk/lightning-protection-services/lightning-safety
55  Community / Bar Sport / Re: How do they weigh.... on: August 12, 2014, 12:22:02 am
Quote
The moon should have more helium-2 than helium-3. The sun doesn't spit out pure heavy isotopes.
Normal Helium is Helium-4.  Helium-3 is an unusually LIGHT version of the atom...

As for "how do you weigh?": compress it until it's heavier than air, and then apply Boyle's law.
The difference in mass between compressed gasses and uncompressed gases is quite noticeable.  In my day, full SCUBA tanks (at ~2750psi) would sink, while empty ones will float.  (I'm not sure if that's held up through the revolution in tank composition (Al, carbon fiber, etc.)
56  Community / Website and Forum / Re: Sumobot forum on: August 11, 2014, 10:14:38 pm
In general, the only time to create a new topic is if that messages about that subject appear SO often in some other forum that non-interested folks start to grumble.
57  Using Arduino / Microcontrollers / Re: Arduino Mega2560 as ISP to program another Arduino Mega2560 on: August 11, 2014, 09:39:52 pm
Quote
BootRST must be set to 1.
That seems odd.  Exactly what are your (working) fuses set to, now?
58  Using Arduino / General Electronics / Re: 12v POE into arduino nano, and coin acceptor. (Jukeboxes) on: August 11, 2014, 04:17:00 am
Quote
8 port power over ethernet 12v router
If you were going to use the ethernet shields "with PoE", you should be aware that they want "real" PoE (48V, with negotiation) rather than one of the hacks that just sends DC over the spare wires.

59  Using Arduino / General Electronics / Re: Best PCB degign for beginner. on: August 11, 2014, 04:11:08 am
I'm an EAGLE user.  I like it a lot.  I'm prepared to buy a full-priced copy of it, should I ever actually do a commercial design (and one of the nice things is that I could afford to do so, even for a relatively small commercial design.)

But, If you're looking for a free program, download several, find appropriate tutorials, and try them out.
The "best for a beginner" one is probably the one whose tutorial you can manage to get working the best.
I've seen lots of people claim that Eagle is non-intuitive and has a "very old" GUI style (action/object based rather than object/action.)  It didn't bother me at all (but then. I'm rather old myself.)
EVERY cad program I've ever heard of has had someone say "it has a steep learning curve."  That may simply be because PCB/circuit design is HARD; there's a lot more to it than just a drawing program (or at least, there SHOULD be.)
(Well, perhaps not fritzing.  Fritzing has a shallow learning curve, but a steep capability CLIFF.  You can start off really easy, and then you get to a point where  you say "ok, now how do I do X", and you discover that you just CAN'T, because there is no X in fritzing.)

Quote
Clearly the best free software for a beginner is Kicad.
The OP didn't mention what kind of computer they are using.  I downloaded several copies of KiCAD for my mac, over a period of a couple years, and never could get it to work right at the most basic levels, so I gave up :-(  (maybe it's time to try again?)
60  Using Arduino / Microcontrollers / Re: Security of Software on: August 11, 2014, 03:44:31 am
Quote
Many people mistakenly believe that LGPL 2.1+ can be freely used in a closed source project/product
Apparently including the Arduino project leaders, since they state in various places that you CAN build closed source projects with the arduino libraries.  (http://arduino.cc/en/Main/FAQ )  The GPL/LGPL actual license terms are as bperrybap states, and are obnoxiously incompatible with closed-source embedded products, despite what fsf sometimes seems to say.  The ability to produce proprietary products is very much oriented toward desktop-like environments :-(  (This is why you won't see a GPL license on avr-libc, or newlib, or anything I ever write, even though they're also open source.)

(Does FSF/etc actually pursue violators of the gnu licenses on software where they are not the license holder?
I don't think I know of any project that has been called out on the LGPL re-linkability requirement.)

Providing object files of your proprietary project that are linkable with new versions of the arduino libraries is likely to be pretty spectacularly useless to almost everyone.  But the requirement does make attempts to protect the object code in the chip using the AVR hardware mechanisms technically/legally meaningless.  (OTOH, I believe that you don't have to "publish" such object files in network-retrievable form.  You just are supposed to (at least) provide them on request.)
Pages: 1 2 3 [4] 5 6 ... 460