Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: HTML button in IDE 1.0.1 on: November 06, 2012, 09:54:19 am
I found the problem, I placed the button in the wrong function  smiley-sweat

2  Using Arduino / Programming Questions / HTML button in IDE 1.0.1 on: November 06, 2012, 09:30:08 am
Hi

I want to add a button to my Arduino website and in previous versions it was something like :
 client.println("<button name=b value=2 type=submit style=height:80px;width:150px>LED Off</button>");

But now in 1.0.1 I see no button on my website, only some other text.

Any suggestions?

Cheers
3  Topics / Home Automation and Networked Objects / Arduino EthernetShield and aspx websites. on: November 02, 2012, 11:55:25 am
Hello,

I am working on some home automation with the Arduino ethernetshield (switching a LED on and off using an aspx website to start with!).
My aspx server (DNS & Application aspx framework 4.0) is up and running and I can easy connect to it with my laptop.

Also, my arduino EShield gets an IP address and I can ping towards it and etc. And yes they are in the same local network  smiley.

Now I want my arduino to connect to the website or a file such as 192.168.1.3/~inetpub/reader/default.aspx.
To do so, I use the following bit of code:

  if (client.connect(serverName, 80)) {
    Serial.println("connected");
    // Make a HTTP request:
    client.println("GET /inetpub/WebApplication1/WebForm2.txt HTTP/1.0");
    client.println();

But for some reason I get an HTTP 404 error, telling me there is no such website. This I find strange because my laptop can easy access it.
Is my client.prinln("GET ....); line wrong? Because that is the path to that file.

I have included the entire code in this post in case it would help.


PS: My guess is that the project would be easier using a php website/server, but none the less it should be able to with aspx aswell.

Code:
/*
  DNS and DHCP-based Web client
 
 This sketch connects to a website (http://www.google.com)
 using an Arduino Wiznet Ethernet shield.
 
 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 
 created 18 Dec 2009
 by David A. Mellis
 modified 9 Apr 2012
 by Tom Igoe, based on work by Adrian McEwen
 
 */

#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = {  0x90, 0xA2, 0xDA, 0x00, 0x8A, 0x20 };
char serverName[] = "reader.stevenarne.local";

// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;

void setup() {
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  // start the Ethernet connection:
  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
    while(true);
  }
  // give the Ethernet shield a second to initialize:
  delay(1000);
  Serial.println("connecting...");

  // if you get a connection, report back via serial:
 
  if (client.connect(serverName, 80)) {
    Serial.println("connected");
    // Make a HTTP request:
    client.println("GET /inetpub/WebApplication1/WebForm2.txt HTTP/1.0");
    client.println();
  }
  else {
    // kf you didn't get a connection to the server:
    Serial.println("connection failed");
  }
}

void loop()
{
  // if there are incoming bytes available
  // from the server, read them and print them:
  if (client.available()) {
    char c = client.read();
    Serial.print(c);
  }

  // if the server's disconnected, stop the client:
  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();

    // do nothing forevermore:
    while(true);
  }
}
4  Using Arduino / Installation & Troubleshooting / Re: not in sync: resp=0x30 on: September 11, 2011, 03:59:20 pm
Hi,

Thanks for the responds. Yes I have selected the right board.

I contacted my friend and the told me that he just gave me an usb-cable that had the correct connectors on it.
So now we are going to check if the arduino works on his desktop while using the same usb-cable as I am using now.

I will post if this was the problem. Because frankly I think if that is not the problem, the arduino itself must be defect.

Regards,
Stieve
5  Using Arduino / Installation & Troubleshooting / Re: not in sync: resp=0x30 on: September 11, 2011, 11:59:54 am
selecting an other com port gives me the following error

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

6  Using Arduino / Installation & Troubleshooting / not in sync: resp=0x30 on: September 11, 2011, 11:46:15 am
Hi,

I have recently bought an Arduino Nano v3 from a friend.

Now I am trying to upload the blink example program into it.  But I keep getting this error:

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Users\Steven\Zelfstudie\arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM3
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 57600
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done.  Thank you.


I am have tried it on a desktop and my laptop:

Spec:

Desktop:
windows 7
arduino nano v3

laptop:
windows vista
arduino nano v3


Things I have tried:

firewall off
different usb port(s)
installing ftdi drivers (about 3 times)
pressing the reset button before uploading
looking for solutions on forums

It would be nice if someone could help me on the topic.

Regards,
Stieve
Pages: [1]