Show Posts
Pages: 1 ... 57 58 [59] 60 61 ... 64
871  Using Arduino / Installation & Troubleshooting / Re: Need Help flashing Mega 2560 with new USB firmware. on: April 27, 2011, 10:24:06 am
First, I don't have an answer to your problem, but I do understand what you're describing.  It looks like you have 4 solder pads where the picture with the instructions shows only two.  In your case, there is even a set of pads in exactly the equivalent position, but another set of pads to the right.  Extremely confusing. 

What you may try is to check out where the pads go with an ohm meter and compare it to the function of the pads on the instructions.  That's assuming no one steps up and helps.
872  Topics / Home Automation and Networked Objects / Re: Go Online with my project on: April 26, 2011, 10:01:34 pm
<hijack>

It's possible to use a dynamic ip address.  The idea is that you register the ip with a name service and then, every time the ISP changes it, you reregister the new ip.  Dyndns is only one of the services that will handle this for you.  Some of the services have client code you can run on a home computer that periodically checks your ip address and compares it to what is registered and updates as necessary.  However, my experience has been that my ISP changes my darn ip address as much as 6 times a freaking day!  So it takes my system around 15 minutes to notice it and then it updates the ip address and a few minutes later stuff starts working again.

So, since it costs nothing to try it out, get a dynamic ip name service and try it out.  If it doesn't work for you, then fork out the money for a static ip.

One thing in our favor is that you can use the ip address (static or dynamic) as the address of your router and use port forwarding to direct traffic to your arduino.  That way you can still have a hard-coded address on the arduino and talk over the internet both in and out.  You can also redirect traffic to another device by changing the port forwarding.  The one thing that will drive you nuts is what's called NAT Loopback (google it); if your router doesn't support it, you won't be able to address your arduino from inside your network.  You have to use an outside machine.  You can use a proxy service to test from the outside to be sure it's visible.

I'm eventually going to have to go to the static ip address, the ISP changing my address so often is a real pain.  Or, maybe a different ISP.  I've even built code into my arduino to sample the ip address and update dyndns because of this.

</hijack>
873  Using Arduino / Networking, Protocols, and Devices / Re: In Search of a Workable, Affordable WiFi Solution on: April 23, 2011, 10:33:04 am
Yep, you're right.  There just isn't a solution out there that meets the criteria you have.  That's my reason for reevaluating the ideas I had in terms of another transport layer.  Unfortunately, changing the transport layer means you'll probably be rewriting a bunch of code and learning about devices that you really didn't want to spend time on.  Maybe spend a few hours looking at serial to wifi devices could help.  I don't have much experience with them and they seem to cost too much also.

One thing I did notice though is that DHCP, DNS and the IP stack eat a lot of code and ram space.  I tried it once with a WiShield and decided to take it back out.  There wasn't enough room left over for my own stuff.  I could serve a simple web page but not much else.  If you go with a 2560 processor, there is plenty of room, but there's the expense factor again.
874  Using Arduino / Networking, Protocols, and Devices / Re: Why does my Ethernet Shield not work? on: April 23, 2011, 10:15:52 am
Wow, that LED makes it sound like you do have a power problem.  Get a voltmeter from someone for a couple of hours and take a look at the voltages.  A person can usually find a cheap one at various stores around town and that could tell you what is going on.  Try a different computer's USB port; maybe sneak the boards into a store with a cable and plug it in for a minute to see if it lights up more there.

Also, on two different occasions I've had USB cables that wouldn't supply the current I needed to run an arduino and shield.  It wasn't the ethernet card, but one of those multipurpose cards.  The cables can make a difference, even if they work well with some other devices.  The signals get through and they are wired right, but they just won't supply the current.
875  Using Arduino / Networking, Protocols, and Devices / Re: Get IP Address of Anyone Connected to my Arduino set up as server on: April 23, 2011, 02:16:36 am
I'm running IDE 21 and I have the ip of the incoming printing just fine using code I took from this thread.

to Client.cpp I added:

void Client::getRemoteIP_address(uint8_t * addr){ // added by me
   W5100.readSnDIPR(_sock, addr);    // replaces the getSn_DIPR(_sock, addr); V18 and below
}

and to Client.h:

  void getRemoteIP_address(uint8_t * addr);//added by me

Then in my code to get the address:

  uint8_t clientIp[4];

  incoming.getRemoteIP_address(&clientIp[0]);

to format the ip address so you can display it you can call the routine below:

// format an IP address. (I stole this)
const char* ip_to_str(const uint8_t* ipAddr)
{
  strcpy_P(Dbuf2,PSTR("%d.%d.%d.%d\0"));
  sprintf(Dbuf, Dbuf2, ipAddr[0], ipAddr[1], ipAddr[2], ipAddr[3]);  //see how its a 4 byte array?
  return (Dbuf);
}

Dbuf and Dbuf2 are string arrays declared at the beginning of the program and used as scratch buffers throughout.  Call the routine like this to see what you get:

Serial.println(clientIp);  // where clientIp is the result of the incoming.getRemoteIP_address above

I do not recommend converting the ip address to a long or anything else except a string for display.  Use it as a 4 byte array since that is the way it is handed to the various ethernet routines.  The format routine above will create a nnn.nnn.nnn.nnn type of string so you'll see 192.168.0.25 or some such for addresses inside your router.  You can even compare it in the array form.  For example:

#define maskcmp(addr1, addr2, mask) \
(((((uint16_t *)addr1)[0] & ((uint16_t *)mask)[0]) == \
             (((uint16_t *)addr2)[0] & ((uint16_t *)mask)[0])) && \
            ((((uint16_t *)addr1)[1] & ((uint16_t *)mask)[1]) == \
             (((uint16_t *)addr2)[1] & ((uint16_t *)mask)[1])))

This mess of a macro (just copy and paste it, do not try to type that crap in) will compare the ip address (as an array) using the netmask to tell you if the machine that is coming in is inside your router or outside.  If you call it like this:

maskcmp(incomingIp,thisBoardsIp,subnet_mask)

will return true if it is a local address.  Nice for protecting something from the outside.

DON'T GIVE UP !  You can do this and it will make a cool display that you can brag about for months.

876  Using Arduino / Networking, Protocols, and Devices / Re: Why does my Ethernet Shield not work? on: April 23, 2011, 01:45:23 am
I have a V5 ethernet shield attached to a mega 2560 and it works really well.  The 'official' arduino was modified especially to work with the mega boards, and at least in my case, does.  The fact that you don't have a light on the router when you plug it in and power it up probably means the board itself is actually bad.  The ethernet board will interact to a small degree with a router with only power supplied and no program at all on the arduino.  Additionally, there have been reports of seemingly official arduino ethernet boards that were very different from the V5 cards pictured on this site; they even came in the cardboard box.

I recommend you contact the supplier, they'll probably work with you on this. 
877  Using Arduino / Networking, Protocols, and Devices / Re: In Search of a Workable, Affordable WiFi Solution on: April 23, 2011, 01:32:01 am
I'm not trying to be silly, but in looking around, it is actually easier to use wired ethernet to a wifi-capable router configured as an access point.  I have two WiShields in service, they work fine but were expensive.  On each of the attached arduinos I had to quit adding code and take special means to preserve ram to get what I needed on them.  The software to support tcp/ip, as you pointed out, was too darn large for these little devices and complex applications.  So, I used a wired board and a router I picked up off ebay for a while; that worked really well and saved me some money.  Later, I started playing with XBee and that is the direction I'm moving now.  I can implement pretty serious applications in a home XBee mesh then hook up an arduino (currently working with the 2560) grab the XBee traffic and forward whatever I need onto the web.

I'm not saying the wifi solutions for arduino are poorly done.  I love my little WiShield boards, too bad they've been discontinued.  The clones will probably do the job equally well, but I've found a couple of alternatives and these methods have other possibilities as well.

Now, if your objective is to do a really cool project with a custom wifi arduino, nothing I've said is relevant.  I've done many a project simply because it was cool, practicality wasn't even part of the equation. smiley-wink
878  Using Arduino / Programming Questions / Re: Regarding the TimeAlarm Library on: April 22, 2011, 02:02:02 am
Oliver: Nice job.  For my particular application I'm using a GPS receiver so I have the time available without needing to use a RTC.  Also, it's a cool use of technology since the GPS carries its own RTC inside and I just leverage it.  What I want to do is really mundane, stuff like turning lights on and off, starting motors, that kind of thing.  It's interesting that there isn't something like that heavily used and advertised since everyone builds a clock with an arduino at some point.

Bill: Cool little hint for me to use google.  Problem is that the first item on the list (I'm assuming that was your intent since the script ended there) doesn't mention the TimeAlarm library so I'm not sure the author intended it to be used.  I've looked at that page several times and the dates on the files inside go back over a year.  That's millennia in arduino development time.

It's interesting how I can't seem to find mention of the alarm library in the playground; just in various postings.  It must be there somewhere just not obvious to me.   If someone that has used it more recently doesn't respond, I'll give it a try and see how it holds up.  There's been a number of changes in the IDE and board since the library was put in place.
879  Using Arduino / Programming Questions / Regarding the TimeAlarm Library on: April 21, 2011, 08:25:42 pm
There used to be an Alarm library that worked with the time library.  I've read the posts about it.  User Mem wrote it I believe.  This sounds like exactly the thing I need for a device I'm working on.  What happened to it?  I can't find it in the playground or any mention of it in there.

Mem, are you still supporting it?  Did it go away?
880  Using Arduino / Networking, Protocols, and Devices / Re: XBee transceiver on: April 18, 2011, 10:08:18 pm
Help me understand.  The picture is of an XBee mounted to what appears to be a digi development board.  To get the model number, unplug the XBee, turn it over and read the number printed on the shield over the transmitter.  Next, what do you mean by drivers?  An XBee attached to an arduino doesn't use drivers, you get a library or you write code to make it work. 

I'm having a little trouble understanding.
881  Using Arduino / Installation & Troubleshooting / Re: Please help, errors with using parallel port on: April 17, 2011, 12:54:09 pm
It sounds like the 328 chip could be bad.  Especially since it gets hot under normal use.  However, there may be other things wrong also.  Check the 5V supply on the board to be sure it hasn't failed.  Measure the current the board is using, it may be pulling too much power.

However, if the 328 if toasted, you cannot load it.  It will continue to fail until you replace it.   You might be able to load the board using a different device if the usb to serial device (8U2 or ftdi chip) is bad, but that doesn't seem to be your problem.
882  Using Arduino / Installation & Troubleshooting / Re: Mega 2560 - avrdude: stk500_2_ReceiveMessage():timeout - Even after new firmware on: April 17, 2011, 10:30:36 am
Take a look at my thread http://arduino.cc/forum/index.php/topic,58341.0.html.  I've been fighting this problem since I got the board.  My solution is to change the code a bit in the area where I made my last change, the thread will explain why.

Reflashing the board won't make any difference, changing it to be what it already is doesn't seem useful.
883  Topics / Home Automation and Networked Objects / Re: Go Online with my project on: April 17, 2011, 10:13:15 am
Go look at dyndns.com.  Not to sign up with their service, but to read the pages on making a personal web server work.  They have links and descriptions of how to do what you want as well as how to do it through a name server.  Every dsl modem is set up differently and I couldn't begin to describe the process you will need.  However, dyndns has addressed this for us already.
884  Using Arduino / Networking, Protocols, and Devices / Re: Moving from Ethernet to WiFi on: April 16, 2011, 01:47:27 pm
A wired ethernet implementation is at: http://draythomp.blogspot.com/p/house-clock.html and a wifi example is at http://draythomp.blogspot.com/p/test-html-code.html.  They do different things, but basically are the same for web services so you can compare them to see the differences.

I've changed both of them to add an XBee broadcasting the power usage and time, and the latest sketch is not posted.  The differences between the old sketchs and the new ones are minimal though.
885  Using Arduino / Networking, Protocols, and Devices / Re: Moving from Ethernet to WiFi on: April 15, 2011, 11:37:59 pm
Not that shield specifically, but I've done a bunch with the Wishield.  I've also done a bunch of code with the hard wired ethernet shield.  There are a number of difference between the Wishield library and the hardwired one.  The Wishield uses callbacks to handle interaction and the ethernet shield is more directly inline.  The Wishield is interrupt driven while the other is not.  The Wishield handles a lot of the standard interaction for you while the hardwired one does not.  The Wishield takes more memory than the 'official' one, it's on a par with the ENC28J60.

They both work pretty well, just differently.

If you want to find out how hard it will be to make the wifi shield work you're welcome to take a look at the code I posted on my site for a couple of projects to see the differences.  I have at least one of each showing there.  If you have a specific question on them I may be able to help, but I haven't tried the shield you mentioned.  For me it's too much money for an experiment just to find out. 
Pages: 1 ... 57 58 [59] 60 61 ... 64