Show Posts
Pages: 1 [2] 3 4 ... 20
16  Using Arduino / Project Guidance / Re: 4 brush-less DC motors with integrated drive electronics using an Arduino Uno on: July 02, 2014, 10:53:30 am
Pin 8 there is not PWM so you won't be able to control motor speed.
The signal from the PWM tells  the mosfet/transistor to give the motor varying voltage depending on the speed.
17  Using Arduino / Programming Questions / Re: IF statements execute regardless of conditions? on: July 02, 2014, 10:35:06 am
Code:
(holding = 0)
(holding =1)


All wrong. It's not illegal to use in C/C++ but wrong. Use conditional equals (==).
18  Using Arduino / Programming Questions / Re: send data from sensors to mysql db on: July 01, 2014, 07:57:35 am
First thing, is the ip to a web server or  mysql database?
19  Using Arduino / Programming Questions / Re: Reading data from .txt file in PC on: June 30, 2014, 09:03:06 am
I think you can use visual basic to do this. You can also use Processing, processing.org to do this as well.
20  Community / Bar Sport / Re: Apple swift on: June 25, 2014, 11:05:21 am
I'm skimming through the use manual now. It's simple and powerful. It takes a little getting use to even for me since I know objective C.
21  Community / Bar Sport / Re: Apple swift on: June 24, 2014, 07:20:36 am
yeah, it's iOS, OS X only which is a shame. It should be platform independent.
22  Community / Bar Sport / Apple swift on: June 23, 2014, 10:27:12 pm
I'm reading up on apple's new C language, Swift. It can return from a function multiple values with any combination of data types.

That is all. I'm sold!
23  Using Arduino / Programming Questions / Re: Is a class of any value if there can only be one instance of it? on: June 23, 2014, 11:35:52 am
, how Apple setup their structure. They have an App delegate, which is a singleton that is the hub for all the other classes.

Apple devices are a tad more complex than an Arduino Uno ???

...R

Design patterns care not the device.
24  Using Arduino / Programming Questions / Re: HOW TO OVERRIDE??? on: June 23, 2014, 11:33:02 am
Are you using an UNO as the ISP? you might need a capacitor.
Quote
An Arduino board serving as an ISP to program the ATmega on another Arduino board. On the Arduino Uno, you'll need to connect a 10 uF capacitor between reset and ground (after uploading the ArduinoISP sketch). Note that you need access to the reset pin on the target board, which isn't available on NG or older boards.
25  Using Arduino / Programming Questions / Re: Is a class of any value if there can only be one instance of it? on: June 23, 2014, 08:58:58 am

@mistergreen & @PeterH, Both your usage methods are reasons not to use a singleton.


It works for me and keep class communication simple and easy soooo, I like it. I learned it from using objective-C, how Apple setup their structure. They have an App delegate, which is a singleton that is the hub for all the other classes.
26  Using Arduino / Programming Questions / Re: Is a class of any value if there can only be one instance of it? on: June 22, 2014, 06:17:20 pm
A singleton is good for storing data that you need to share with other classes or instances.

I use it as a delegate for all the other classes.
27  Using Arduino / Programming Questions / Re: Is C++ essential for arduino? on: June 22, 2014, 09:35:59 am
Start writing and don't worry about it. You don't need to know c++. As long as you know how to program, it's fine.

If you run into any issues, just ask the forum.
28  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.
29  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.

30  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();
        }
Pages: 1 [2] 3 4 ... 20