Show Posts
Pages: 1 ... 182 183 [184] 185 186 ... 391
2746  Using Arduino / Networking, Protocols, and Devices / Re: FTP client on: March 28, 2013, 09:44:26 am
Then do the same with them. Remove the F() macro. I guess the Due doesn't like that.
2747  Using Arduino / Networking, Protocols, and Devices / Re: Non-Blocking Ethernet Library on: March 28, 2013, 09:43:12 am
This will keep trying to get an ip forever until it gets one. Is that what you want?
Code:
// start the Ethernet connection:
  Serial.println("Starting ethernet");

  while (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    delay(5000);
    Serial.println("trying DHCP again");
  }
2748  Using Arduino / Networking, Protocols, and Devices / Re: FTP client on: March 28, 2013, 09:28:51 am
You are using a Due? I have not tried that board with that code. I guess you will be the first.

It seems to be complaining about the Serial.println(F()) calls. Try removing the F() macro from the Serial functions on those line numbers. See if that stops the error. Like this for line 41
Code:
Serial.println("SD init fail");
2749  Using Arduino / Networking, Protocols, and Devices / Re: FTP client on: March 28, 2013, 09:10:38 am
My bad. Try it downloading the code again from the playground. The problem was client.write() and the F() macro do not get along. I changed them to client.print() and client.println().
2750  Using Arduino / Networking, Protocols, and Devices / Re: After many connections EthernetClient fails to connect. on: March 27, 2013, 03:22:26 pm
Here is a client example sketch that should not run out of sockets.
http://playground.arduino.cc/Code/WebClient
It has my timeout code already in it.
2751  Community / Gigs and Collaborations / Re: Problems implementing Twitter's API v1.1 using OAuth on Arduino on: March 27, 2013, 10:22:49 am
Error 404 means "file not found". According to your code, this one:
api.twitter.com/1.1/statuses/user_timeline.json
2752  Using Arduino / Installation & Troubleshooting / Re: UNO SMDedition ver3 - L diode stays on (apart from green ON diode) on: March 27, 2013, 07:11:50 am
You are not supplying enough voltage for the onboard regulator to work correctly. If you supply Vin with less than 7 volts, the 5v bus may not be 5v.

If you power the 5v bus directly, you can damage your board.
2753  Community / Gigs and Collaborations / Re: Problems implementing Twitter's API v1.1 using OAuth on Arduino on: March 27, 2013, 07:02:31 am
You are not sending a cr/lf with those. Use client.println() instead of .print().
Quote
when i use :   client.print(F("GET /1.1/statuses/user_timeline.json?screen_name=plantaexpre&count=1 HTTP/1.1"));

This is how the server sees your request, and this would be bad.
Code:
GET /1.1/statuses/user_timeline.json?screen_name=plantaexpre&count=1 HTTP/1.1Host:api.twitter.comAuthorization: OAuth oauth_consumer_key="j3UCRhGsBZSfRltac4zEXg", oauth_nonce="XXXXXXXXXXXXXXXXXXXXXXX", oauth_signature="XXXXXXXXXXXXXXXXXXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1364306703", oauth_token="*********************************************", oauth_version="1.0"
2754  Using Arduino / Installation & Troubleshooting / Re: UNO SMDedition ver3 - L diode stays on (apart from green ON diode) on: March 27, 2013, 03:55:02 am
Now that Nick has used his superior forum skills to get this in one topic...
Quote
Device has been powered by USB and external DC 5V PSU
How do you power it with the 5v PSU? That is too low for the power jack...
Quote
Input Voltage (recommended)   7-12V
Input Voltage (limits)   6-20V
...and the +5v bus does not like to be powered like that.
Quote
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.
2755  Using Arduino / Networking, Protocols, and Devices / Re: Problem using both SPI library and SD library in Arduino UNO program on: March 26, 2013, 08:29:23 pm
Quote
The Arduino SD library should not be used with more than one device on a SPI bus, you should use the SdFat library to get multiple devices to work on a SPI bus.
...unless the other device is the w5100 ethernet IC, then the standard SD library will work fine.

@LeahM: Try disabling the SD SPI in setup. If D4 is not the slave select, change that.
Code:
pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
// then do your AD stuff
You must disable it or initialize it.  Otherwise, it will cause garbage on the SPI bus.

If you initialize it, insure you disable your AD device SPI first. Otherwise, it could cause garbage on the SPI and mess up the SD startup.
2756  Using Arduino / Networking, Protocols, and Devices / Re: Connect Arduino and phpMyadmin on: March 26, 2013, 06:14:12 pm
Try this. Maybe yours needs the php in the code tag. Mine didn't, and it is still working.
Code:
<?php
$temp1 $HTTP_GET_VARS['temp1'];
?>

<html>
<body>
test server page<br>
<?php echo('temp1 = ' $temp1 ' '); ?>
</body>
</html>

edit: It also looks like HTTP_GET_VARS has been deprecated. Try this:
Code:
<?php
$temp1 $_GET['temp1'];
?>

<html>
<body>
test server page<br>
<?php echo('temp1 = ' $temp1 ' '); ?>
</body>
</html>
2757  Using Arduino / Networking, Protocols, and Devices / Re: Network Shield Problems on: March 26, 2013, 08:53:10 am
Quote
I followed examples and it works correctly, so... it's ok!  smiley
I have bad news for you and the person who wrote that example. If you are using the ethernet library included with the IDE, this is really how it is:
Code:
int begin(uint8_t *mac_address);
void begin(uint8_t *mac_address, IPAddress local_ip);
void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server);
void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway);
void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet);
This was copied and pasted from Ethernet.h

Later on, you will post again with something like "It works on my localnet server, but not on the internet. Why not?"
2758  Using Arduino / Networking, Protocols, and Devices / Re: Network Shield Problems on: March 26, 2013, 08:33:02 am
Quote
Might also be that case, but are the same.
No. The parameters in order are
Code:
Ethernet.begin(mac_address, ip_address, dns_server, gateway, subnet)
How do you see that as the same? You are setting your gateway to 255.255.255.0.
2759  Using Arduino / Networking, Protocols, and Devices / Re: Network Shield Problems on: March 26, 2013, 08:19:24 am
If your server is not localnet, this will not work.
Code:
  Ethernet.begin(mac,ip,gateway,subnet,dns1,dns2);

It should be this.
Code:
  Ethernet.begin(mac,ip,dns1,gateway,subnet);
2760  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet stability on: March 26, 2013, 04:37:31 am
Quote
The client sketch does not have a timeout, other than the watchdog.
Then that is substituting for the timeout as it probably was for the OP. We are trying to eliminate the need for a watchdog restart.
Pages: 1 ... 182 183 [184] 185 186 ... 391