Results 1 to 4 of 4

Thread: Arduino

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Mar:2008
    Location:
    Posts: 483

    Arduino

    WEB Server :
    IP/analog0.html
    IP/analog1.html
    IP/analog2.html
    .....


  2. #2
    Registered User hateras's Avatar
    Join Date: Jan:2011
    Location: Kronos III
    Posts: 1,028
    WEB Server? http://www.arduino.cc/en/Tutorial/WebServer, .
    .. REQUEST- , , .
    ASRock B550M Pro 4; Ryzen R5 3600; 2x16 GiB G.SKILL Aegis 3200; 1TB Samsung QVO 960 + 3TB Seagate IronWolf; Zalman Z1

  3. #3
    Registered User
    Join Date: Mar:2008
    Location:
    Posts: 483
    hateras ,

  4. #4
    Registered User hateras's Avatar
    Join Date: Jan:2011
    Location: Kronos III
    Posts: 1,028
    REQUEST-a.
    Code:
    int readHTTPRequest(EthernetClient client, char * buffer) {    
    	int byteCnt = 0;	
    	boolean currentLineIsBlank = true;
    	while (client.connected()) {
    		if (client.available()) {
    			char c = client.read();
    			buffer[byteCnt] = c;
    			byteCnt++;
    			// 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) {	
    				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;
    			}
    		}
    	}
    	buffer[byteCnt] = '\0';
    	return byteCnt;
    }
    GET 192.168.0.3/analog0.html HTTP/1.1 RESPONSE- .
    Last edited by hateras; 29th April 2015 at 16:34.
    ASRock B550M Pro 4; Ryzen R5 3600; 2x16 GiB G.SKILL Aegis 3200; 1TB Samsung QVO 960 + 3TB Seagate IronWolf; Zalman Z1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |