Show Posts
Pages: 1 2 [3] 4 5 ... 21
31  Using Arduino / Programming Questions / Re: Software development on: June 20, 2014, 09:49:10 pm
You can add components to the arduino to communicate with other devices through wireless communication wifi or Bluetooth. You can pass along strings of coordinates.
32  Using Arduino / Programming Questions / Re: arduino web client on: June 20, 2014, 08:02:25 am
POST method is a bit of a pain because of parsing the data is difficult especially if you do GET as well.

The example server code looks for a return and newline to terminate the client. like
Code:
GET /a=23&b=34 HTTP/1.1  <-------------- GET data
Host: yahoo.com
Connection: close
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; de-de) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16
Accept-Encoding: gzip
                             (CRLF, carriage return, line feed) <----blank newline
****HTML body would be down here

What a POST looks like is it embeds the data in the body
Code:
POST / HTTP/1.1
Host: yahoo.com
Connection: close
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; de-de) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16
Accept-Encoding: gzip
                             (CRLF, carriage return, line feed) <----blank newline
a=34&b=34 <------------ POST data

As you can see, you'll have to ignore the CRLF, or use it as a marker for the start of the POST data and go all the way to the bottom and find a \0 (null character) for end of the string. So, it's a pain to parse. I gave up and just used AJAX to pass data without using the URL field.

33  Using Arduino / Programming Questions / Re: Help! Web server + Ajax + XML + JPG on: June 19, 2014, 06:07:27 pm
Code:
byte tBuf[64] = {0};
        int clientCount = 0;
   
        File myFile = SD.open(page);        // open web page file
        if (myFile) {
                 while(myFile.available()) {
                        tBuf[clientCount] = myFile.read();
                        clientCount++;
                        if(clientCount > 63) {
                          client.write((byte*)tBuf,64);
                          clientCount = 0;
                          memset(&tBuf[0], 0, 64);
                        }
   
                }
                      if(clientCount > 0) {
                        client.write((byte*)tBuf,clientCount);
                      }
            memset(&tBuf[0], 0, 64);
            myFile.close();
        }
34  Using Arduino / Programming Questions / Re: Help! Web server + Ajax + XML + JPG on: June 19, 2014, 11:52:24 am
Like I said, the arduino is not a computer. It's only a little micro controller. Deal without images or pull the images off the web, not the SD card.

You can also get more than one byte at a time from your sd card. That should help speed things up a little. The code is around somewhere.


35  Using Arduino / Programming Questions / Re: Help! Web server + Ajax + XML + JPG on: June 19, 2014, 08:35:15 am
you left out the http header for you image
Code:
   
client.println("HTTP/1.1 200 OK");
client.println();

check the example carefully.

Also, you do know that your html will take forever to load with an image right? The arduino is a very simple server not a proper one.
36  Using Arduino / Programming Questions / Re: RTC I2c Reading theory on: June 17, 2014, 11:59:06 am
On some i2c devices, if you poll too fast say 3x per second, it tends to send you an error instead of what you want. If your devices are giving what you want, it should be good.
37  Using Arduino / Programming Questions / Re: Ultrasonic sensor as a music instrument. on: June 17, 2014, 08:52:08 am
you'd need to set the midi device to play continuous notes. You know the hardware better than me.
38  Using Arduino / Programming Questions / Re: Ultrasonic sensor as a music instrument. on: June 16, 2014, 10:30:59 pm
Code it so another sound won't play until another distance range has been detected.

And your conditions overlap each other so it'll try to play 2 notes
Like distance < 2 and distance < 20 both will play if distance = 1.
You have to code that smarter.
39  Using Arduino / Programming Questions / Re: Ultrasonic sensor as a music instrument. on: June 16, 2014, 08:11:14 pm
get rid of the delay?

and get rid of the extraneous { }
40  Using Arduino / Programming Questions / Re: Is there an Arduino port of the InvenSense Embedded Motion Driver library? on: June 15, 2014, 05:04:37 pm
I haven't but somebody has
https://github.com/sparkfun/MPU-9150_Breakout/tree/master/firmware
and
https://github.com/richards-tech/MPU9150Lib
41  Using Arduino / Programming Questions / Re: Wireless (nrf24l01) altimeter for RC plane (completed project with code) on: June 14, 2014, 02:56:40 pm
Very cool.
I saw the whole video. You need a IP camera so you can see the video live & see where you're going.

42  Using Arduino / Sensors / Re: Colour Sensor Output on: June 13, 2014, 09:01:38 pm
how are you connecting the lego's color sensor to the arduino?
43  Using Arduino / Programming Questions / Re: HTTP Client, GET Request on: June 13, 2014, 01:51:05 pm
You have to tell us how you're implementing the user/pass, with htaccess or other means?

44  Using Arduino / Programming Questions / Re: Basic coding question?? on: June 13, 2014, 08:56:56 am
what isn't working?
45  Using Arduino / Programming Questions / Re: HTTP Client, GET Request on: June 13, 2014, 08:54:14 am
What kind of credentials? like user & password?
Can you turn that off?
Pages: 1 2 [3] 4 5 ... 21