Show Posts
Pages: 1 ... 24 25 [26] 27 28 ... 36
376  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + Ethernet + XBee: Leonardo works, UNO doesn't on: July 09, 2012, 08:37:29 am
Code is attached
377  Using Arduino / Networking, Protocols, and Devices / Arduino + Ethernet + XBee: Leonardo works, UNO doesn't on: July 08, 2012, 07:51:51 pm
I've have a Leonardo with an Ethernet R3 shield attached and a Sparkfun XBee shield on the top of the Ethernet shield.  This setup works fine, but if I replace the Leonardo with an UNO and leave everything else the same, I have problems.  The XBee still works, but when the sketch tries to post to COSM.com, I get a HTTP 401 error.  If I switch back to Leonardo, everything is fine.  Any ideas what's happening?

I want to use the UNO because it has more available memory (because the bootloader is smaller).  My current program is almost at the memory limit.
378  Using Arduino / Programming Questions / Re: How to reduce program size on: July 04, 2012, 11:43:29 pm
   If you have any global variables that could be made local instead this can save a lot of memory.

That's good to know.
379  Using Arduino / Programming Questions / Re: How to reduce program size on: July 04, 2012, 05:56:05 pm
Code:
Defining variable don't seem to affect it, which is surprising.
Not if you understand where variables are stored. Program space is read only, unless the bootloader is uploading a new hex file. Since variables need to be written to, they are not stored in program space. So, they do not affect the amount of program space needed.

I have no idea where stuff is stored, or even what the different parts are.  Any suggestions on a good source that explains this?
380  Using Arduino / Programming Questions / How to reduce program size on: July 04, 2012, 11:34:16 am
I'm trying to understand which parts of my sketch affect program size.
Defining variable don't seem to affect it, which is surprising.  I notice that reducing the text in Serial.print() helps.  Now I mostly use Serial.print(F()) to put the strings in EEPROM, but I don't think that reduces the compile size.
Including libraries that are not actually used by the code doesn't seem to affect it.
381  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield - multiple connections on: July 04, 2012, 10:51:08 am
It wasn't the pointers.  I think I was running out of memory, I changed a bunch of Serial.print() to Serial.print(F()) and it's working now.

Regarding the pointers, this is what I am doing:

Code:
void PrintPoolData(float *poolData);  // function prototype

void loop(){
  static float poolData[10];  // define array of floats

   poolData[0] = 100;
   poolData[1] = 101; 
  // and so on

   PrintPoolData(poolData); // prints poolData array, poolData is sent to function as pointer
}

void PrintPoolData(float *poolinfo) {
  Serial.print(F("Pool Temp = "); 
  Serial.println(poolinfo[0]);
  // and so on
}


   
382  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield - multiple connections on: July 04, 2012, 09:36:35 am
I made am bare bones sketch using both ERxPachube.h and twitter.h and it worked.  Now I think the real problem is I'm not using pointers correctly when passing them to a function.  I'm just learning this and I think there might be some malloc() functions needed.  For now, I'm going to must make the variables global and not worry about passing them to a function as a parameter.  At least that way I can rule or verify this pointer issue.
383  Using Arduino / Networking, Protocols, and Devices / Ethernet shield - multiple connections on: July 03, 2012, 05:08:41 pm
I'm using a Leonardo with Ethernet shield R3.  I am sending data to COSM (ie Pachube) using ERXPachube.h library and I want to also send a Twitter message using twitter.h library.  Both work fine if they are in different sketches, but when I try to do both from the same sketch, I get a 401 error from COSM.  I don't know much about Ethernet protocol, but from searching around I found that the Ethernet shield can support 4 connections.  I assumes this means I can connect to 4 different servers.  To make sure there were no naming conflicts, in twitter.cpp I changed "client." to "tweetclient.", but that didn't help.  I'd appreciate any suggestions on how to make this work?
384  Using Arduino / Networking, Protocols, and Devices / Re: Multiple Arduino Unos communicating via Xbee on: July 01, 2012, 04:15:39 pm
What board is the XBee plugged into?  According to the comments on the Sparkfun product page, there seems to be a problem with Sparkfun's shield and the UNO.
http://www.sparkfun.com/products/9976
385  Using Arduino / Networking, Protocols, and Devices / Re: Multiple Arduino Unos communicating via Xbee on: July 01, 2012, 01:36:53 pm
I didn't realize you were using series 2. I've never used those, so I doubt my sketch will work.  Sorry.
386  Using Arduino / Networking, Protocols, and Devices / Re: Multiple Arduino Unos communicating via Xbee on: July 01, 2012, 01:24:09 pm
I've never tried 64-bit addressing, but I have my XBees Series 1 working with 16-bit addressing.  I've attached two sketches and two X-CTU profiles.  If you load these profiles on your XBees they should work with the sketches.  In the Rx sketch it tells you the address of the transmitting XBee.  In the Tx sketch, you send data to a particular XBee, based on the MY address, not DL or DH addresses.

I hope this helps.
387  Using Arduino / Networking, Protocols, and Devices / Re: Arduino+XBee communicate with bare XBee? on: July 01, 2012, 12:32:47 pm
sorry, but I'm desperate here

I'll delete that post since is getting on your nerves obviously...chill out

I'm just trying to make it easier for everyone.  You're more likely to get a good answer by putting up a new post anyway. Also, Digi has pretty good support, you can actually get tech support on the phone if you want.  Here's Digi's support email address: rf-experts@digi.com

I don't really have any suggestions for your problem, but have you thought about just using 16-bit addressing instead of 64-bit.  It's a bit simpler.
388  Using Arduino / Networking, Protocols, and Devices / Re: Arduino+XBee communicate with bare XBee? on: July 01, 2012, 12:21:55 pm
I'd strongly recommend that you acquire "Wireless Sensor Networks" by Rob Faludi. It is an excellent resource for using XBees in AT or API mode, and configuring them to read I/O pins, etc.

The book applies specifically to Series 2 radios, but most of the examples and exercises work equally well with Series 1 radios.

I'd heard about that book, but I didn't get it because it's mostly about Series 2 XBees.  But if a lot of the Series 2 examples apply to Series 1, I think it's worth getting a copy.
389  Using Arduino / Networking, Protocols, and Devices / Re: Arduino+XBee communicate with bare XBee? on: July 01, 2012, 12:17:14 pm
bakenzilo,

Since your questions is a lot different then the topic of this thread, It would be better if you started a new post instead of hijacking this one.  It just makes it confusing.
390  Using Arduino / Networking, Protocols, and Devices / Re: Leonardo + Ethernet R3 - need ICSP connector? on: June 30, 2012, 10:14:04 pm
Thanks for the link to the proto shield. 
Pages: 1 ... 24 25 [26] 27 28 ... 36