Show Posts
Pages: [1] 2 3 ... 402
1  Using Arduino / Networking, Protocols, and Devices / Re: UDP.write always returns 0 on: Today at 04:14:26 pm
I just checked with IDE v1.5.7 and my Mega and it still shows 13.

Do you have a SD card in the shield's slot? That can cause UDP problems if you do not disable the SD card in your setup. If so, power down the Due, remove the SD card, and power up again.
2  Using Arduino / Networking, Protocols, and Devices / Re: UDP.write always returns 0 on: Today at 03:44:23 pm
I just tested your code on a Mega 2560, and it shows this over and over:
Quote
UDP.begin = true
UDP.write = 13
UDP.begin = true
UDP.write = 13
Don't know what to tell you.

edit: I'm using IDE v1.0.5.
3  Using Arduino / Networking, Protocols, and Devices / Re: UDP.write always returns 0 on: Today at 03:15:42 pm
Don't use Udp.stop(). It releases the socket and resources required to send the UDP packet.
Code:
  if(digitalRead(43) == HIGH){
// remove this line
      Udp.stop();
http://arduino.cc/en/Reference/EthernetUDPStop
4  Using Arduino / Storage / Re: Reading and writting to an EEPROM on: Today at 01:13:26 pm
Quote
I am having a bit of an issue finding a good toturial to deal with wriiting to I2C EPROMs. Some are for the older IDE versions that only allow saving of 1 bit at a time, most dont work...
Don't look for an I2C example. You want a SPI example, don't you?
Quote
My EEPROM is a 24C32, using an SPI interface.
5  Using Arduino / Project Guidance / Re: Problem with 4017B decade counter on: Today at 12:48:18 pm
How about insuring "clock enable" and "reset" are connected to GND or a pin set to OUTPUT and LOW. If the Arduino is not providing the power for the 4017, insure the grounds are connected.
6  Using Arduino / Programming Questions / Re: http requests all fail, despite being on network (wifi shield) on: Today at 06:51:40 am
Have you upgraded the firmware? Here is a test sketch to determine the firmware version. If it reports 1.0.0, it needs to be upgraded. If it reports 1.1.0, it is current.
Code:
#include <WiFi.h>
#include <SPI.h>

void setup() {
  Serial.begin(9600);

  // disable SD SPI
  pinMode(4,OUTPUT);
  digitalWrite(4,HIGH);

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while(true);
  }

  // check firmware version
  Serial.print(F("Firmware version: "));
  Serial.println(WiFi.firmwareVersion());.
}

void loop() {
}
Here is a link to the official instructions for upgrading, but you may be better off searching to forum for better ways.
http://arduino.cc/en/Hacking/WiFiShieldFirmwareUpgrading
7  Using Arduino / Project Guidance / Re: Altimeter_v0 project BMP085 on: August 27, 2014, 11:12:58 am
I would set up two buttons and a switch. With the switch in one position adjusts the ground altitude, and in the other adjusts the alarm altitude.
8  Using Arduino / Project Guidance / Re: Altimeter_v0 project BMP085 on: August 27, 2014, 08:57:32 am
I explain:
-BMP085/180, is not close, over 0.5m (my code over 1 m).
-MS5611, is the closest at 0.1m (now I obtained 0.5m outside maybe less I am wowking with this)

So, I am working only with the MS5611, step by step.
Only if the local sea level pressure is 29.92. Otherwise it could be several meters off.
9  Using Arduino / Project Guidance / Re: Altimeter_v0 project BMP085 on: August 27, 2014, 08:44:00 am
I did not look at your code that close, but do you have a way of entering the local altimeter setting? That will improve accuracy more than any of those devices.
10  Using Arduino / Programming Questions / Re: having trouble with the ethernet examples on: August 27, 2014, 08:37:33 am
This is not a newbie project, but if you want to give it a try with a working example, here is my client code in the playground.
http://playground.arduino.cc/Code/WebClient

Here is my server code:
http://playground.arduino.cc/Code/WebServerST

zoomkat's code also works ok. Search this forum for his examples.
11  Using Arduino / Programming Questions / Re: HTML/CSS/Java Webpage w Arduino Mega & Wifi Shield on: August 27, 2014, 07:03:01 am
Your code may be fine, and the problem is caused by the wifi firmware. I use an ethernet shield connected to a router with wireless capability for remote access, but I have other devices connected to the ethernet ports on that router also, so that offsets the cost of the router a little.

You may want to check into other wifi devices, like the CC3000. I haven't used it, but others on the forum have.

PaulS is correct (again). Take a look at zoomkat's code using the SD card. It uses a 64 byte buffer to send packets about 4 times faster than single byte packets. It doesn't do away with the 2 second delays tho, just fewer of them.

edit: The router solution also provides other advantages. The radio I use on the router is a 24db radio with a 12db antenna, giving that unit a range capability not possible with a standard client radio/antenna. At a minimum (with line-of-sight) a few miles.

If I need longer range here in the U.S., I can use a-mode (5.8GHz), and within certain limitations, I can transmit at 30db (1000mw) with no limit on the antenna gain, as long as the antenna has a horizontal pattern less than 35 degrees. This gives me a line-of-sight range of several miles.
12  Using Arduino / Networking, Protocols, and Devices / Re: UDP on: August 27, 2014, 06:49:44 am
Don't power the Arduinos on the 5v pin. It is not recommended.
Quote
5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.

edit: I do occasionally power my Arduino Mega 2560 using a USB phone charger/power supply. That seems to work ok. Insure the charger supplies enough current and the correct voltage.
13  Using Arduino / Networking, Protocols, and Devices / Re: UDP on: August 26, 2014, 08:55:23 pm
Sometimes it takes a while for the duplicate mac addresses to get straightened out. It shouldn't have been adding those lines that corrected anything.

I'm happy to hear it is working for you.
14  Using Arduino / Networking, Protocols, and Devices / Re: UDP on: August 26, 2014, 08:43:31 pm
What are you seeing on the receiver's serial monitor? Any "Received packet of size " message?

On the sender, add this code. The reference does not show a return value, but endPacket() returns 1 on success and 0 on error. A return value of 1 in this case would indicate the receiver got the packet, but this applies only to localnet UDP traffic. If the receiver is not on that localnet, a return value of 1 indicates the gateway (router) took the packet, but does not indicate the destination received it.
Code:
    // replace this line
    Udp.endPacket();

    // with these
    if(Udp.endPacket() == 1) Serial.println("send ok");
    else Serial.println("send failed");
15  Using Arduino / Programming Questions / Re: HTML/CSS/Java Webpage w Arduino Mega & Wifi Shield on: August 26, 2014, 08:27:53 pm
The wifi shield firmware has some pretty serious bugs. I reported them several months ago, and I have seen no action taken on any of them.

The major problem is the wifi shield server firmware uses only one socket, and uses it poorly. It apparently doesn't stop listening for requests when it gets one, so if another request from the same or another client arrives, the requests can become corrupted, returning corrupted or incorrect files to the client(s).

It also has a weird delay of up to a couple seconds every few seconds in the upload to a client if the file is large.
Pages: [1] 2 3 ... 402