Show Posts
Pages: 1 ... 6 7 [8] 9 10 ... 18
106  Using Arduino / Installation & Troubleshooting / Re: Mega 2560 with Ethernet Shield+SD Upload Fail. on: June 26, 2012, 11:55:12 pm
What do you mean 'cut'? break the circuit line ?
What do you mean with 6pin connector? ICSP?

I'm sorry, I'm really newbie here.
107  Using Arduino / Installation & Troubleshooting / Re: UNO R3 + Eth Shield + SD Card = Problem after uploading on: June 26, 2012, 11:42:34 pm
I have solved this.
I forget to wire pin 10,11,12,and 13 from Eth Shield to UNO.
Sorry.

But I face problem if I replace my UNO with Mega 2560 R2.
the problem is the serial monitor display: server is at 255.255.255.255

I connect the ICSP in the same position with UNO by wiring
Then I wire from Mega to Eth Shield: pin 53 to pin 10, pin 52 to pin 13, pin 51 to pin 12, pin 50 to pin 11
any wrong with my wiring?
108  Using Arduino / Installation & Troubleshooting / Re: UNO R3 + Eth Shield + SD Card = Problem after uploading on: June 26, 2012, 10:49:07 pm
Here the WebServer sketch:

Code:
/*
  Web Server
 
 A simple web server that shows the value of the analog input pins.
 using an Arduino Wiznet Ethernet shield.
 
 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 * Analog inputs attached to pins A0 through A5 (optional)
 
 created 18 Dec 2009
 by David A. Mellis
 modified 9 Apr 2012
 by Tom Igoe
 
 */

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

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
  0x90, 0xA2, 0xDA, 0x00, 0xFE, 0xAC };
IPAddress ip(192,168,1,177);

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup() {
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
 


  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());
}


void loop() {
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(c);
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println("Connnection: close");
          client.println();
          client.println("<!DOCTYPE HTML>");
          client.println("<html>");
                    // add a meta refresh tag, so the browser pulls again every 5 seconds:
          client.println("<meta http-equiv=\"refresh\" content=\"5\">");
          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            int sensorReading = analogRead(analogChannel);
            server.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(sensorReading);
            client.println("<br />");     
          }
          client.println("</html>");
          break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        }
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
    Serial.println("client disonnected");
  }
}
109  Using Arduino / Installation & Troubleshooting / Re: Mega 2560 with Ethernet Shield+SD Upload Fail. on: June 26, 2012, 10:22:53 pm
If your using the Ethernet shield with a 2560 Mega you will need to also cut the reset pin on the 6 pin connector.

Regards

Which 6 pin connector? ICSP connector? at Mega or at the Eth Shield?
How to cut it?
110  Using Arduino / Installation & Troubleshooting / UNO R3 + Eth Shield + SD Card = Problem after uploading [SOLVED!!] on: June 26, 2012, 10:00:37 pm
If I attached my UNO + Ethernet Shield, then I upload webserver sketch, it is successfully uploaded, then I open serial monitor then it displays server is at 192.168.1.177
I have no problem with above.

But if I connect my UNO + Ethernet Shield by wiring through ICSP header , then I upload webserver sketch, it is successfully uploaded, then I open serial monitor then it display server is at 255.255.255.255

Why can it be different?
Sure it becomes problem for me because I can not access through 255.255.255.255
Any solution?

Thank you so much.
111  Using Arduino / Installation & Troubleshooting / Re: Mega 2560 with Ethernet Shield+SD Upload Fail. on: June 26, 2012, 09:33:01 pm
The other popular fix is to bend pins 0 and 1 out, so that they do not make contact with the Arduino.
Bend pins 0 and 1 out? for Arduino UNO or Mega?

I have managed to fix the problem. It turns out to be an issue with the reset lines. If the reset pins are disconnected from the ethershield you can program the arduino and i have not had any issues with the ethershield after this mod.

Regards
How to disconnect reset pins from the ethernet shield?
I face same issue, I can not upload while my Arduino Mega R2 and Arduino LAN Eth Shield attached.

Thank you.
112  Using Arduino / Project Guidance / Re: Can I store variable from Arduino directly to MySQL database? on: June 25, 2012, 02:01:10 pm
Quote

What platform is the host that your Arduino is connected to?

If it is WIndows based, you can use Gobetwino to receive commands from the Arduino and execute a command on the host. The command would invoke an SQL command line client to run an SQL query that inserts your value into the database. With this approach, no programming is required other than a Serial.println on the Arduino to output each result.

Using Ethernet/HTTP/web server/PHP to access the database would work fine, of course, but take a bit more work.

Yes, it is Windows based.
Hmm Gobetwino, I would like to avoid using serial cable, but only using LAN Cable, so it is more effective if I can use Ethernet/HTTP/Web Server/PHP to access the database.
The reason I would like to use LAN Cable, due to effectiveness to share it to other computer using LAN Router.
What do you think?

Do you have any idea how to use php to access the database?

Thank you for response. smiley-grin
113  Using Arduino / Project Guidance / Re: Can I store variable from Arduino directly to MySQL database? on: June 25, 2012, 01:32:49 am
So, the solution is first get the variable to webpage then store it to mysql.
I write my value to a script (PHP) running on a webserver and validate that the values are correct in both value and source and then store it into the database. I've successfully posted just shy of 19,000 values to my webserver over the space of 5 days without issue during my testing so there is no bottle neck based on bandwidth of my home network.

what value?
webserver?do you mean WAMP?
what script I should type? where I should put it?
How do you retrieve the data from webpage to database? do you have step by step solution?

Thank youu.
114  Using Arduino / Project Guidance / Can I store variable from Arduino directly to MySQL database? on: June 21, 2012, 02:56:17 am
I am working on a project using Arduino+Ethernet LAN shield to count something.
Then I would like to show the number in webpage, and also store the number to database.

Can I store that 'number' variable from Arduino directly to MySQL database using LAN Cable or Serial Cable?
If so, what I should prepare in MySQL? What command I should use?

Which one is better:
1. Store variable from Arduino to Database then show it in webpage
or
2. Show variable from Arduino to Webpage then store it to Database?

Thank you very much.
115  Using Arduino / Project Guidance / Re: How to make Hall Effect Sensor A1302 as a switch to detect metal cable? on: June 01, 2012, 02:58:23 am
I think more information is needed. As the others have said, we need to know how the cables pass by the sensor. Are they side by side, or is it one length followed by another. If you could take a photo, it would help.

It is side by side. when I use IR sensor it works well in side by side and one length followed by another

You have to use a wheel that rotate press the cable and count the rotatings of the wheel to determen the length.
Hall effect sensor works with magnet fields. Why do you think the hall sensor would work to measure cable length?

Paco
I don't mean to measure the length of the cable, just the amount of cable pass by.

Hi,
How big are the cables?  Is there just one cable length in view, or is it a coiled-up cable?

Can you control the background behind the cables?  Like make it white? Then detect when NOT detected?



Yep I guess I can change the background. I can change it to white
116  Using Arduino / Project Guidance / How to make Hall Effect Sensor A1302 as a switch to detect metal cable? on: May 30, 2012, 09:13:21 pm
Hello everyone,

I am working now in a factory.
My factory produces cables.
The color of the cables are black.

My project here to count the amount of cables pass by, by detect it like "switch" then display it in 7segment.
At first time I used IR sensor, the IR sensor is so sensitive to any color except black, so when the cables come, sometime it detects and many times it does not.

So I decide to change the sensor to Hall Effect Sensor, here is the datasheet http://www.google.co.id/url?sa=t&rct=j&q=a1301&source=web&cd=1&ved=0CFIQFjAA&url=http%3A%2F%2Fwww.allegromicro.com%2F~%2FMedia%2FFiles%2FDatasheets%2FA1301-2-Datasheet.ashx&ei=UtLGT8zIGIXJrQfB39XaCQ&usg=AFQjCNErQ9g_TLRv19yUtmASpHY6ZoSpww&cad=rja
The reason I use this sensor because I think this sensor detects metal and my cable contains cilinder metal inside.

Is there any idea how to do coding or something else for this sensor so it is able to work as "switch"?

Thank you very much
117  Using Arduino / Programming Questions / Re: What is this StandardFirmata_ModifiedAll code doing? on: May 23, 2012, 03:58:24 am
Yes, you are right I want to put start/pause button on the PC Screen, and also we need to match the COM and serial baud.
And after that I want the PC show the data from the variable looping inside the arduino.

Oh just dont care about that serial output, I don't need that, just put it there, I will just erase it.
It just shows the amount of "no1" variable has been counting up
118  Using Arduino / Programming Questions / Re: Can i wait for an input on: May 23, 2012, 03:24:36 am
Delay consume memory.

You can also use switch Case : http://arduino.cc/en/Reference/SwitchCase
119  Using Arduino / Programming Questions / Re: 9E+99 (VB to C++... arduino...) on: May 23, 2012, 03:19:29 am
Use the number with Arduino for mathematical purpose maybe..in order to predict future..WOW
Waiting for the resutl!
120  Using Arduino / Programming Questions / Re: How to know that I may or may not use interrupt? on: May 23, 2012, 03:17:30 am
I don't think that interrupts will fix your problem.

- It could be that you have a bad power supply - are you providing the Arduino withthe right voltage to function?

Quote
I want to make pin 12 as switch that is controlled from GUI, but so far it doesn't work well.
By this I understand that you have a GUI somewhere that sends a signal to the Arduino and the Arduino turns on the output? Or is Pin 12 an input? For either case
- Have you actually configured this as an output? Posting your code will help to determine what is wrong
- For inputs you need to have pull-up or pull-down resistors on the inputs so that they will work. With nothing connected to an input it is not 0, it is undefined, and it will react to fingers and moisture and anyuthing you can imagine. Look it up for details.


for the Arduino I use USB cable...
For my other components (IC, 7segments) I use DC Power Supply, it works well

Yes I have GUI that provide option whether make pin 12 as input, output or servo.
So which part of my Arduino I must pull down?
see this: http://www.thebox.myzen.co.uk/Tutorial/Inputs.html
Pages: 1 ... 6 7 [8] 9 10 ... 18