[TriEmbed] Arduino Topic for Dec 7 Meeting?

Jon Wolfe jonjwolfe at anibit.com
Mon Dec 1 22:01:12 CST 2014


9 volt batteries are notiously flaky. Not saying it's definitely the culprit, but I've lost sleep over them in the past. They're good at looking fine under no or light load.

Also, what subnet mask is in use in your code? How are you trying to connect to the arduino over the lan? Does it work as a client (might be easier to make sure that works first). 

Those are just some ideas off the top of my head...

You could also try the app. "fing" on a pc or tablet. It scans local ip networks. There used to be some arp tools back in the day on unix that could find stuff by mac address,  I think even if tcp/ip was not functional. 



<div>-------- Original message --------</div><div>From: Dwight Morgan <dwight.w.morgan at gmail.com> </div><div>Date:12/01/2014  10:47 PM  (GMT-05:00) </div><div>To: triembed at triembed.org </div><div>Subject: [TriEmbed] Arduino Topic for Dec 7 Meeting? </div><div>
</div>I’m a newbie and going through the Simon Monk book, “Programming Arduino Getting Started with Sketches”. I am stuck on chapter 10, “Arduino Ethernet Programming”. I have tried numerous things to get the Arduino to act as a server but it just won’t connect. I’m running Windows 7 on my PC and I have a Netgear router for my wireless router with 4 wired ports. I’ve plugged the RJ45 into the router and my PC and tried different IP addresses that are not taken by my router already but nothing works. I cut off the firewall once but that didn’t help. I replaced the Ethernet shield and the UNO but that didn’t help. I’m trying to run the simplest code as best I can tell which is the Monk example code 10-01 copied below for reference:
 
// sketch 10-01 Simple Server Example
 
#include <SPI.h>
#include <Ethernet.h>
 
 
// MAC address just has to be unique. This should work
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// The IP address will be dependent on your local network:
byte ip[] = { 192, 168, 1, 30 };
 
EthernetServer server(80);
 
void setup()
{
  Ethernet.begin(mac, ip);
  server.begin();
  Serial.begin(9600);
}
 
void loop()
{
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client)
  {
    while (client.connected())
    {
      // send a standard http response header
      client.println("HTTP/1.1 200 OK");
      client.println("Content-Type: text/html");
      client.println();
     
      // send the body
      client.println("<html><body>");
      client.println("<h1>Arduino Server</h1>");
      client.print("<p>A0=");
      client.print(analogRead(0));
      client.println("</p>");
      client.print("<p>millis=");
      client.print(millis());
      client.println("</p>");
      client.println("</body></html>");
      client.stop();
    }
    delay(1);
  }
}
 
One potential thing I have not covered is the power supply. I’m unplugging the USB as instructed in the book and plugging in a 9 Volt battery pack – all I have right now for power. I have a 9 Volt 1.5 Amp power supply on order to get here Friday. I’m not sure if that is a problem or not.
 
I’m running Arduino IDE 1.0.4. The board is Arduino UNO and the Ethernet shield is made by Seeed.
 
If this is something someone with more experience could talk about at the meeting I definitely have an interest. I have looked online for solutions but nothing so far has worked. If this topic does not serve the group well, I understand, but maybe someone who has knowledge of this could just give me some directions to get me back on the right path.
 
Thanks!
 
Dwight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20141201/a85ca959/attachment.htm>


More information about the TriEmbed mailing list