Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: True two way communication between Arduino server and PHP server on: June 16, 2014, 02:09:24 pm
@chessoriginal (sorry for the late reply) You're right, the current implementation of the YalerEthernetServer library is blocking, while EthernetServer is non-blocking. I fear there's no way to change this, as YalerEthernetServer depends on an open (client) connection to the relay. Kind regards, Thomas (founder of Yaler.net)
2  Community / Website and Forum / Reference > StreamReadBytesUntil (Correction) on: February 03, 2013, 05:44:01 pm
Hi, in http://arduino.cc/en/Reference/StreamReadBytesUntil there is a newline missing before length in the line

buffer: the buffer to store the bytes in (char[] or byte[]) length : the number of bytes to read (int)

Kind regards,
Thomas (@tamberg)

3  Community / Website and Forum / Reference > ClientConnect (Suggestion) on: February 03, 2013, 03:18:44 pm
Hi, referring to

    http://arduino.cc/en/Reference/ClientConnect

wouldn't the technically correct term for URL (as used here) be host? So instead of

     client.connect(URL, port)

and

    URL: the domain name the client will connect to (string, ex.:"arduino.cc")

the reference should say

     client.connect(host, port)

and

    host: the domain name the client will connect to (string, ex.:"arduino.cc")

Kind regards,
Thomas (@tamberg)
4  Forum 2005-2010 (read only) / Troubleshooting / Re: nano 3.0 w/Atmega328 support on: August 12, 2009, 05:28:26 am
Zorlon: The new release Arduino 0017 (out now) includes a proper "Arduino Nano w/ ATmega328" entry in the "Tools > Board" menu.

http://arduino.cc/en/Main/Software

Regards,
tamberg
5  Forum 2005-2010 (read only) / Troubleshooting / Re: nano 3.0 w/Atmega328 support on: August 11, 2009, 03:21:02 pm
Zorlon: "Tools->Board->Arduino Duemilanove w/ ATmega 328" seems to be the only selection that works with the Nano v3.0

Regards,
tamberg
6  Forum 2005-2010 (read only) / Syntax & Programs / Re: Declaring Class Variables / Calling Constructors on: January 14, 2010, 08:01:46 am
Thanks for your quick answer. What do you mean by "objects but not instances"? Isn't an object just an instance of a class? Or are Arduino objects rather like structs in C?

Regards,
tamberg
7  Forum 2005-2010 (read only) / Syntax & Programs / Declaring Class Variables / Calling Constructors on: January 14, 2010, 07:54:49 am
Hi,

(coming from Java, no C/C++ experience)

there seems to be a difference between Processing and Arduino when it comes to calling a constructor to instantiate an object of a class.

E.g. Processing

    C c; // declare variable c
    c = new C(); // create object of class C
    c.M(); // call method M of c

vs. Arduino

    C c(); // declare & create
    c.M(); call method M of c

Now my questions:

1) Is there a way in Arduino to declare a variable of a class and *later* assign an instance to it?

2) Does Arduino really have classes, objects and constructors?

Regards,
tamberg
8  Forum 2005-2010 (read only) / Interfacing / Re: Long Term Reliability of WizNet Shield on: August 02, 2010, 12:22:50 pm
Here's a detailed write up of the Yaler Arduino Web LED demo including source code:
http://www.instructables.com/id/Arduino-Web-LED/

Cheers,
tamberg
9  Forum 2005-2010 (read only) / Interfacing / Re: Long Term Reliability of WizNet Shield on: June 07, 2010, 06:28:07 pm
Hi Isaac,

we currently use about the following code to run a Web service on an Arduino / WIZnet Ethernet shield and make it accessible via Yaler:

Code:
#include <Ethernet.h>
#include <EthernetDHCP.h>

byte mac[] = ...
byte yalerIp[] = ...
const char yalerId[] = "my-arduino";

...

void setup() {
  EthernetDHCP.begin(mac); // calls Ethernet.begin()
  ... sensor setup ...
}

void loop() {
  Client client(yalerIp, 80);
  client.connect();
  if (client.connected()) {
    sendYalerPostRequest(client, yalerId);
    int status = receiveYalerResponse(client);
    if (status == 101) {
      receiveBrowserRequest(client, ...);
      ... read sensor ...
      sendBrowserResponse(client, ...);
    } else {} // 204
    client.stop();
  }
}


With our DHCP server / office LAN, calling EthernetDHCP.maintain(); seems not to be necessary, as long as the DHCP server keeps running.

Cheers,
tamberg

http://yaler.org/
Pages: [1]