Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: Arduino WiFi Shield Rev 3, solding, external antenna, possible? on: December 17, 2013, 01:09:47 pm
I'm trying to do the same thing (add an external antenna to the Arduino WiFi shield), but haven't found any clear answers - has anyone tried this with any luck?

For other's interested, here are the other related  forum posts:

thanks in advance for any help!

2  Using Arduino / Networking, Protocols, and Devices / Re: WiFi Udp NTP client / firmware updates / Xively timestamp / Xively -1 error on: July 22, 2013, 01:20:03 pm
I do have an SD card loaded, but it is initialized.
3  Using Arduino / Networking, Protocols, and Devices / WiFi Udp NTP client / firmware updates / Xively timestamp / Xively -1 error on: July 15, 2013, 04:57:54 pm
Hi all,

I have an R3 MEGA 2560 with Arduino's WiFi shield and am having several issues - I hope someone can point me in the right direction. I'm using it to do some data collecting and logging to an SD card and updating a Xively stream. I'm having several issues:

1) inconsistent connections to Xively: I only get a 200 OK response from xively about 75% of the time - most of the errors are -3 or -4, but some are -1. This wouldn't be a big deal, but often, after running for anywhere for a few hours to a few days, all requests fail and the only response I get is -1. I have it set up so that if it has too many failures in a row it will reset the wifi connection - this will fix the problem if it got stuck with a -3 or -4 error, but it won't fix the -1 connection error. If I do a manual reset it doesn't have a problem connecting (aside from the typical -3 or -4 errors). I looked up a -1 error and it means 'connection to has failed' but I don't know how to fix it - any ideas? I have a fairly good signal (-50 to -70 dBm), using WPA security on the router.

2) Xively library parsing error: When downloading data from a xively feed, it occasionally (maybe 3% of the time) has an error in reading the data value and will either duplicate a digit or two, or drop a digit or two. Digging through the libraries, I think it has to do with the String.h core, which is responsible for parsing the string into a number, but I can't figure out what would cause it to have the digit error. Note, an example response from Xively is: "Status,2013-07-15T18:16:52.643526Z,3.00". Also, my code does use an interrupt routine, but I can't imagine this would lead to this type of error. Any ideas?

3) I also want to record the date and time for each data point, but am having a heck of a time: the xively string has a timestamp, but there's no easy library command to pull it out and I'd have to heavily modify it to pull it out and return it in to the main code; I could use the UDP NTP client example in the new 1.0.5 compiler, but the example code just returns "0" once it's connected to the server; some searching found a suggestion that it might be a firmware issue; I update the firmware on the wifi shield and now the wifi shield can't get a MAC address assigned (just gets 0:0:0:0:0:0). Is there a way to fix these issues, or another way to get the arduino to figure out the real world time?

The code is quite lengthy so I don't want to post the whole thing here, but most of the issues can be replicated using the basic examples. Let me know if you have any questions.
I have a bunch of hacks and work arounds for these issues, but would like to properly fix them - thank you all for your help!

4  Using Arduino / Networking, Protocols, and Devices / Re: Wifi Shield Has MAC Address of 0:0:0:0:0:0 on: July 10, 2013, 10:28:54 pm
Changed the firmware files? to what? how?

I have an R3 MEGA 2560 with Arduino's WiFi shield. I'm using 1.0.5 and I updated the firmware on the WiFi shield using the wifi_dnld and wifiHD .elf files in the new firmwares folder. Using the example network scanning code, it can see the networks but doesn't register a signal strength or an encryption type, and the MAC address is 0:0:0:0:0:0
Anyone have any idea why it's not working?


here's the first part of what the arduino returns (I changed the names of the networks)
MAC: 0:0:0:0:0:0
Scanning available networks...
** Scan Networks **
number of available networks:6
0) SSIDname0 Signal: 0 dBm Encryption: 1) SSIDname1 Signal: 0 dBm Encryption: 2) SSIDname2 Signal: 0 dBm Encryption:
5  Using Arduino / Programming Questions / Re: Is it possible to reduce a sketch size be modifying libraries? on: January 22, 2013, 01:20:49 pm
Thanks everyone, then I won't bother digging through the libraries.
For now I've left off the SD card parts of the program and that fits, but I may have to go to a MEGA soon anyway.

6  Using Arduino / Programming Questions / Is it possible to reduce a sketch size be modifying libraries? on: January 20, 2013, 03:52:44 pm

Does anyone have experience modifying libraries (specifically HttpClient) in order to reduce the size of a sketch?

I'm writing a sketch and I want my arduino uno (+plus ethernet/SD card shield) to be able to:
-log data to Cosm
-log data to SD card
-read information from a DHT11 temperature/humidity sensor
-get the current UTC time from an internet server

I've found example codes that do all these things individually, and I verified that in individual sketches each component works. However, when I combine everything together in my master code I get an error saying that my sketch is too big (37.4 kb out of 32.3 kb allowed). I have a few ideas on how to reduce the size of my sketch, but with all the libraries I need to include for the above tasks,
#include <dht11.h>
#include <SD.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#include <SPI.h>
#include <HttpClient.h>
#include <Cosm.h>,
I think it might be better for me to tackle it from that end. The biggest seems to be the HttpClient that is required for the Cosm feature to work properly, with HttpClient.h at 20kb and HttpClient.ccp at 17kb (according to windows explorer).

Could I remove parts of those libraries that Cosm doesn't need to make it smaller? Has anyone tried this before or know what parts I could remove? Or is there another way to upload data to Cosm that doesn't require the HttpClient.h library? Or is it possible to store part of the program or library files on the SD card on the board?

SD.ccp is also large, at 15kb. Do both the .h and .ccp file become part of the final sketch size? I would assume not, since otherwise that would be much more than the 37kb my sketch is currently at, unless it gets compressed during compiling..., so which is more important to focus on?

thank you for any advice or tips!

Pages: [1]