Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 25
61  Forum 2005-2010 (read only) / Syntax & Programs / Re: Question about software and PING on: August 15, 2009, 06:22:47 pm
I'm sure the arduino is plenty fast.  You'll need to look at getting rid of some of your delay() calls.  I'm guessing that delay(500) is the root of most of the slowness.
62  Forum 2005-2010 (read only) / Syntax & Programs / Re: String handling on: August 14, 2009, 08:16:50 pm
I can't help you with that other library, but I can tell you the TextString library is very nice once patched.
63  Forum 2005-2010 (read only) / Syntax & Programs / Re: String handling on: August 13, 2009, 06:37:46 pm
There is a memory leak in the TextString library that you will need to patch.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1241618944/5
64  Forum 2005-2010 (read only) / Syntax & Programs / Re: Parsing serial in data - a bit stuck! on: February 24, 2009, 12:00:08 pm
This thread should help you get going:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1232462410/7
65  Forum 2005-2010 (read only) / Syntax & Programs / Re: Parsing serial in data - a bit stuck! on: February 23, 2009, 12:54:46 am
Serial.read() only returns the first byte available (in ascii).  So, you will have to do some more work to receive a 3 digit number.  There are many examples on the forum.  I don't have time at the moment, but if you can't find something I will try to find a link tomorrow.
66  Forum 2005-2010 (read only) / Syntax & Programs / Re: Help! I can't find the error in my code! on: February 09, 2009, 11:38:07 pm
Good to hear!  smiley-wink
67  Forum 2005-2010 (read only) / Syntax & Programs / Re: Help! I can't find the error in my code! on: February 09, 2009, 06:07:38 pm
What version of the IDE and Ethernet Library are you using?  There was a bug that was causing interference on pins 8 and 9 in version 12 of the IDE.

Quote
* Fixing bug in Ethernet library that interfered with use of pins 8 and 9.
68  Forum 2005-2010 (read only) / Syntax & Programs / Re: email checker help on: January 12, 2009, 03:11:21 am
You were not setting your second Serial.read() to any variable.  Also, if you keep your formatting the same it makes it much easier to read.  I made a couple other changes you can check out.

Code:
// led wired + to pin 12, resistor to positive +5v
int value = 0;
int ledpin = 11; // Output connected to digital pin 12
int mail = LOW; // Is there new mail?
int val; // Value read from the serial port
void setup()
{
  Serial.begin(9600);
  Serial.flush();
}

void loop()
{
  // Read from serial port
  if (Serial.available())
  {
    val = Serial.read();
    Serial.println(val, BYTE);
  }

  if (val == 110)
  {
    if (value > 0) //we only want to fade it down if it was on
    {
      for(value = 255; value >= 0; value-=5)
      {
        analogWrite(ledpin, value);          
        delay(30);                            
      }
    }
  }

  if (val == 109)
  {
    for(value = 255; value >= 0; value-=5)
    {
      analogWrite(ledpin, value);          
      delay(30);                            
    }  
    for(value = 0; value <=255; value+=5)  
    {
      analogWrite(ledpin, value);
      delay(30);
    }
  }
}
69  Forum 2005-2010 (read only) / Syntax & Programs / Re: Xport - Online Control using a Button on: August 15, 2008, 01:14:11 pm
Pins 0 and 1 are still being used to talk to the computer.  This sketch is using software serial on pins 2 and 3 to talk to the Xport module.  The only real advantage is being able to send debug messages back to the serial monitor.
70  Forum 2005-2010 (read only) / Syntax & Programs / Re: Xport - Online Control using a Button on: August 14, 2008, 05:34:11 pm
The digSelected is not yet used, so that should not have made a difference.  I went ahead and made the changes to add output 11 and tested it with an LED on each pin and it worked for me.  I updated my software at the same link I posted if you want to download it and compare it to yours. I think I spotted your problem though.

You posted:
Code:
var x=document.getElementById(\"digOut11\");txt=txt + x.selectedIndex

But should have done this:
Code:
txt=txt + x.selectedIndex;var x=document.getElementById(\"digOut11\");
71  Forum 2005-2010 (read only) / Syntax & Programs / Re: Xport - Online Control using a Button on: August 14, 2008, 12:19:59 pm
Yeah, I'm planning to make it auto update in the future, for now you will have to add manually.  You were close, I think you just need to add this line to form[]:

Code:
Digital Output 11: <select id=\"digOut11\">  <option>0</option>  <option>1</option></select><br /><br />
72  Forum 2005-2010 (read only) / Syntax & Programs / Re: Xport - Online Control using a Button on: August 13, 2008, 08:55:25 pm
You're welcome!  Please let us know how it goes.
73  Forum 2005-2010 (read only) / Syntax & Programs / Re: Xport - Online Control using a Button on: August 12, 2008, 10:27:48 pm
Here is the code I have based mostly on ladyada's example.  Currently it is just a couple of drop downs to set digital outputs.  In the future I plan to update the digital output status.

Code
74  Forum 2005-2010 (read only) / Syntax & Programs / Re: Xport - Online Control using a Button on: August 10, 2008, 02:02:44 am
I had some code to toggle an output with a button somewhere.  I'll try and dig it up to get you started, but it will probably be tomorrow before I get a chance.
75  Forum 2005-2010 (read only) / Syntax & Programs / Re: Serial.read to display text on LCD on: October 15, 2007, 04:54:53 pm
Are you sure it's not supposed to be lcd.println with a small L?
Pages: 1 ... 3 4 [5] 6 7 ... 25