Show Posts
Pages: [1] 2
1  Forum 2005-2010 (read only) / Troubleshooting / Re: Problem running on 64 bit linux on: June 19, 2009, 08:31:10 pm
Ok i can now start the ide with out errors.
However i cannot upload sketches, I get the following error's:

Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
Binary sketch size: 896 bytes (of a 30720 byte maximum)

java.io.IOException: Cannot run program "hardware/tools/avrdude": java.io.IOException: error=2, No such file or directory
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
      at java.lang.Runtime.exec(Runtime.java:593)
      at java.lang.Runtime.exec(Runtime.java:466)
      at processing.app.Uploader.executeUploadCommand(Uploader.java:123)
      at processing.app.AvrdudeUploader.avrdude(AvrdudeUploader.java:170)
      at processing.app.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:76)
      at processing.app.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:48)
      at processing.app.Sketch.upload(Sketch.java:1632)
      at processing.app.Sketch.exportApplet(Sketch.java:1701)
      at processing.app.Editor$42.run(Editor.java:2016)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
      at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
      at java.lang.ProcessImpl.start(ProcessImpl.java:65)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
      ... 17 more
2  Forum 2005-2010 (read only) / Troubleshooting / Re: Problem running on 64 bit linux on: June 19, 2009, 05:49:13 pm
Yes I know there are multiple threads. I've read them.
They're mostly for 32 bit versions of linux, not 64.
Besides my problem seems to be unique, thats why i made a post.

Thanks anyway, i tried that solution days ago, the ide loads but won't do much else, won't upload sketches or anything else, kicks about a thousand errors.
Here are the errors, sorry but it's very long:
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7

In file included from Stepper.cpp:48:
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/WProgram.h:4:20: error: stdlib.h: No such file or directory
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/WProgram.h:5:20: error: string.h: No such file or directory
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/WProgram.h:6:18: error: math.h: No such file or directory
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/WProgram.h:8:27: error: avr/interrupt.h: No such file or directory
In file included from /home/rocko/Documents/arduino-0016/hardware/cores/arduino/WProgram.h:10,
                 from Stepper.cpp:48:
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:28:20: error: avr/io.h: No such file or directory
In file included from /home/rocko/Documents/arduino-0016/hardware/cores/arduino/WProgram.h:13,
                 from Stepper.cpp:48:
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:23:22: error: inttypes.h: No such file or directory
In file included from /home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:25,
                 from /home/rocko/Documents/arduino-0016/hardware/cores/arduino/WProgram.h:13,
                 from Stepper.cpp:48:
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:24:33: error: stdio.h: No such file or directory
In file included from /home/rocko/Documents/arduino-0016/hardware/cores/arduino/WProgram.h:10,
                 from Stepper.cpp:48:
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:101: error: [ch8216]uint8_t[ch8217] does not name a type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:102: error: [ch8216]uint8_t[ch8217] does not name a type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:106: error: variable or field [ch8216]pinMode[ch8217] declared void
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:106: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:106: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:107: error: variable or field [ch8216]digitalWrite[ch8217] declared void
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:107: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:107: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:108: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:109: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:110: error: variable or field [ch8216]analogReference[ch8217] declared void
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:110: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:111: error: variable or field [ch8216]analogWrite[ch8217] declared void
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:111: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:111: error: expected primary-expression before [ch8216]int[ch8217]
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:123: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:123: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:123: error: expected primary-expression before [ch8216]unsigned[ch8217]
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:123: error: initializer expression list treated as compound expression
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:125: error: variable or field [ch8216]shiftOut[ch8217] declared void
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:125: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:125: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:125: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:125: error: [ch8216]byte[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:127: error: variable or field [ch8216]attachInterrupt[ch8217] declared void
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:127: error: [ch8216]uint8_t[ch8217] was not declared in this scope
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:127: error: expected primary-expression before [ch8216]void[ch8217]
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:127: error: expected primary-expression before [ch8216]int[ch8217]
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:128: error: variable or field [ch8216]detachInterrupt[ch8217] declared void
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/wiring.h:128: error: [ch8216]uint8_t[ch8217] was not declared in this scope
In file included from /home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:25,
                 from /home/rocko/Documents/arduino-0016/hardware/cores/arduino/WProgram.h:13,
                 from Stepper.cpp:48:
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:35: error: [ch8216]uint8_t[ch8217] has not been declared
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:36: error: [ch8216]uint8_t[ch8217] has not been declared
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:38: error: [ch8216]uint8_t[ch8217] has not been declared
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:40: error: expected [ch8216],[ch8217] or [ch8216]...[ch8217] before [ch8216]*[ch8217] token
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:40: error: ISO C++ forbids declaration of [ch8216]uint8_t[ch8217] with no type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:40: error: [ch8216]virtual void Print::write(int)[ch8217] cannot be overloaded
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:38: error: with [ch8216]virtual void Print::write(int)[ch8217]
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:43: error: [ch8216]uint8_t[ch8217] has not been declared
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:44: error: [ch8216]void Print::print(int)[ch8217] cannot be overloaded
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:43: error: with [ch8216]void Print::print(int)[ch8217]
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:53: error: [ch8216]uint8_t[ch8217] has not been declared
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:54: error: [ch8216]void Print::println(int)[ch8217] cannot be overloaded
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/Print.h:53: error: with [ch8216]void Print::println(int)[ch8217]
In file included from /home/rocko/Documents/arduino-0016/hardware/cores/arduino/WProgram.h:13,
                 from Stepper.cpp:48:
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:33: error: ISO C++ forbids declaration of [ch8216]uint8_t[ch8217] with no type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:33: error: expected [ch8216];[ch8217] before [ch8216]*[ch8217] token
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:34: error: ISO C++ forbids declaration of [ch8216]uint8_t[ch8217] with no type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:34: error: expected [ch8216];[ch8217] before [ch8216]*[ch8217] token
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:35: error: ISO C++ forbids declaration of [ch8216]uint8_t[ch8217] with no type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:35: error: expected [ch8216];[ch8217] before [ch8216]*[ch8217] token
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:36: error: ISO C++ forbids declaration of [ch8216]uint8_t[ch8217] with no type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:36: error: expected [ch8216];[ch8217] before [ch8216]*[ch8217] token
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:37: error: ISO C++ forbids declaration of [ch8216]uint8_t[ch8217] with no type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:37: error: expected [ch8216];[ch8217] before [ch8216]*[ch8217] token
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:38: error: [ch8216]uint8_t[ch8217] does not name a type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:39: error: [ch8216]uint8_t[ch8217] does not name a type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:40: error: [ch8216]uint8_t[ch8217] does not name a type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:41: error: [ch8216]uint8_t[ch8217] does not name a type
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:44: error: expected [ch8216],[ch8217] or [ch8216]...[ch8217] before [ch8216]*[ch8217] token
/home/rocko/Documents/arduino-0016/hardware/cores/arduino/HardwareSerial.h:47:
3  Forum 2005-2010 (read only) / Troubleshooting / Problem running on 64 bit linux on: June 19, 2009, 04:14:08 pm
I got this when i compiled:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 warning

When i do ./run i get this:
java.lang.UnsatisfiedLinkError: /home/rocko/Desktop/arduino/build/linux/work/lib/librxtxSerial.so: /home/rocko/Desktop/arduino/build/linux/work/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/rocko/Desktop/arduino/build/linux/work/lib/librxtxSerial.so: /home/rocko/Desktop/arduino/build/linux/work/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
      at java.lang.ClassLoader$NativeLibrary.load(Native Method)
      at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
      at java.lang.Runtime.loadLibrary0(Runtime.java:823)
      at java.lang.System.loadLibrary(System.java:1030)
      at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
      at processing.app.Editor.populateSerialMenu(Editor.java:915)
      at processing.app.Editor.buildToolsMenu(Editor.java:812)
      at processing.app.Editor.<init>(Editor.java:190)
      at processing.app.Base.<init>(Base.java:137)
      at processing.app.Base.main(Base.java:104)

Im on Ubuntu 9.04 64 bit.
Any help would be greatly apreciated.
4  Forum 2005-2010 (read only) / Syntax & Programs / Re: VirtualWire/RF Link problems on: July 21, 2010, 11:12:26 pm
Ok I got this to work, this is how I did it in case anyone else has problems.
I set the vw_setup() to 1200 not 2000, and I set my serial monitor to 9600, the actual monitor, the code is already set to 9600.
Serial.begin(9600).

I don't know why the say to set your monitor to 2400 in that link I posted.
Do this for both the receiver and transmitter code.

Also if I have the RF pair more than a foot apart the signal drops
and I get nothing, this is without an antenna of course.
I 'll try with one and see if my range improves.
5  Forum 2005-2010 (read only) / Syntax & Programs / VirtualWire/RF Link problems on: July 21, 2010, 05:32:08 pm
I got the 315MHZ receiver and transmitter from sparkfun.
But when I use the VirtualWire library I get a blank serial monitor.
Here is my code for receiver:
Code:
#include <VirtualWire.h>  // you must download and install the VirtualWire.h to your hardware/libraries folder
#undef int
#undef abs
#undef double
#undef float
#undef round
void setup()
{
    Serial.begin(9600);    

// Initialise the IO and ISR
    vw_set_ptt_inverted(true);    // Required for RX Link Module
    vw_setup(2000);              // Bits per sec
    vw_set_rx_pin(3);           // We will be receiving on pin 3 () ie the RX pin from the module connects to this pin.
    vw_rx_start();             // Start the receiver
}

void loop()
{
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_get_message(buf, &buflen)) // check to see if anything has been received
    {
    int i;
     // Message with a good checksum received.
        
    for (i = 0; i < buflen; i++)
    {
        Serial.print(buf[i]);  // the received data is stored in buffer
        }
    Serial.println("");
     }
}

Code for transmitter:
Code:
#include <VirtualWire.h>  // you must download and install the VirtualWire.h to your hardware/libraries folder
#undef int
#undef abs
#undef double
#undef float
#undef round
void setup()
{
     // Initialise the IO and ISR
    vw_set_ptt_inverted(true);        // Required for RF Link module
    vw_setup(2000);                   // Bits per sec
    vw_set_tx_pin(3);                // pin 3 is used as the transmit data out into the TX Link module, change this to suit your needs.
}

void loop()
{
    const char *msg = "Hello, wireless World!";       // this is your message to send

   vw_send((uint8_t *)msg, strlen(msg));
   vw_wait_tx();                                          // Wait for message to finish
   delay(200);
}

At first i thought maybe my RF modules were bad, so I tried it using
the SoftwareSerial library, but that works.
I had my transmitter send a bunch of 7's to the receiver and the serial monitor displayed the 7's, plus a some other numbers, figure
that was just noise.

So my modules are fine, but I don't understand why using the VirtualWire library doesn't work.

I don't get any compiling error's, I have my serial monitor set to 2400.
I've tried other baud rates but I still get nothing.

This one has me stumped. I pretty much copied and pasted the code from here:http://letsmakerobots.com/node/12336
I just changed the pin numbers since Im not using a mega.
I'm using a Duemilanove w/328 as the receiver and a BBB from Modern devices as transmitter.
6  Forum 2005-2010 (read only) / Syntax & Programs / Re: Sending variable over Virtual Wire on: July 22, 2010, 02:44:18 pm
Code:
lcd.print((char *)buf);

That works fine
7  Forum 2005-2010 (read only) / Syntax & Programs / Re: Sending variable over Virtual Wire on: July 22, 2010, 02:30:49 pm
I tried lcd.print(buf), but I got this error:
error "call of overloaded 'print(uint8_t[30])' is ambiguous"

Here is my code;
Code:
#include <VirtualWire.h>  //
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); //set digital pins

#undef int
#undef abs
#undef double
#undef float
#undef round
void setup()
{
     Serial.begin(9600);
     lcd.begin(16, 2); //set colums and rows of LCD  

// Initialise the IO and ISR
    vw_set_ptt_inverted(true);    // Required for RX Link Module
    vw_setup(1200);              // Bits per sec
    vw_set_rx_pin(3);           // We will be receiving on pin 3 () ie the RX pin from the module connects to this pin.
    vw_rx_start();             // Start the receiver
}

void loop()
{
    
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_get_message(buf, &buflen)) // check to see if anything has been received
    {
    int i;
     // Message with a good checksum received.
        
    for (i = 0; i < buflen; i++)
    {
        Serial.print(buf[i]);  // the received data is stored in buffer
        }
    Serial.println("");
    
    lcd.clear(); //clear screen
    lcd.setCursor (0, 0); //set cursor to top row
    lcd.print(buf);
    
     }
}
8  Forum 2005-2010 (read only) / Syntax & Programs / Re: Sending variable over Virtual Wire on: July 22, 2010, 01:39:59 pm
Thanks, I'll see if I can work that out.

Next task is to print to an LCD.
Somehow I don't think this will work:
Code:
lcd.print(buf[i])

Can I pass the serial buffer to a variable?
Code:
int x = (buf[i])
lcd.print(x)
Then pass the variable to lcd.print
9  Forum 2005-2010 (read only) / Syntax & Programs / Re: Sending variable over Virtual Wire on: July 22, 2010, 12:51:29 pm
Thanks PaulS, that works.
I never would have figured that out myself.

However one more thing, the resulting tempC on the receiver prints
out as xx.0 it seems to truncate the 2 decimal points to just one and
it's always .0 never the actual tempC, which would be xx.xx,(20.59).
I guess the value of tempC2 will always be 0, due to "
Code:
tempC2 = (int)(tempC - tempC1) * 100

I can live with it, it's not a big deal, but for extra 'wow' factor I would like to have print out the actual temp, xx.xx.
Is this possible?
10  Forum 2005-2010 (read only) / Syntax & Programs / Sending variable over Virtual Wire on: July 22, 2010, 12:10:53 am
Sending text over an RF link using Virtual Wire is easy , but what if
I want to send a int or float or any other variable.

Say I want to send a temp reading from a sensor to another arduino via a RF link.
Unfortunately something simple like this doesn't work.

Code:
tempC = analogRead(tempPin); // read value from sensor
  tempC = (5 * tempC * 100) / 1024; //convert voltage to Celcius
  tempF = (tempC * 9) / 5 + 32;    // convert Celcius to Fahrenheit
  Serial.print(tempF);Serial.println(" F");    // print to serial monitor
void loop()
{
    float *msg = (tempC);       // this is your message to send

   vw_send((uint8_t *)msg, strlen(msg));
   vw_wait_tx();                            // Wait for message to finish
   delay(200);

This gives "can't convert float to float"
So how do you send a variable using Virtual Wire??
11  Forum 2005-2010 (read only) / Syntax & Programs / Re: Bit of a loop problem on: July 09, 2010, 04:43:21 pm
DOH!  smiley-razz
I totally forgot to put the serial print in it's own non-delay.
12  Forum 2005-2010 (read only) / Syntax & Programs / Re: Bit of a loop problem on: July 09, 2010, 02:41:22 pm
[size=12]Read the blinking with out delay and thought I'd give it a try, but
I'm back to blinking at 3000 not 200.[/size]
http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay

Code:
//variables
float tempC;
float tempF;
int tempPin = 0; // setting LM35 pin to analog 0
int ledPin = 9; // led pin set to digital 9
int ledState = LOW;
long prevMill = 0;
long interval = 200;



void setup()
{
  Serial.begin(9600);   //start serial port
  pinMode(ledPin, OUTPUT); // set led pin as output
}

void loop()
{
  unsigned long currentMill = millis();
  
  if (currentMill - prevMill > interval) {
    prevMill = currentMill;
    
    
    
    if (ledState == LOW)
      ledState = HIGH;
      else
       ledState = LOW;
     digitalWrite(ledPin,ledState);
    
  
  
  
  tempC = analogRead(tempPin); // read value from sensor
  tempC = (5 * tempC * 100) / 1024; //convert voltage to Celcius
  tempF = (tempC * 9) / 5 + 32;    // convert Celcius to Fahrenheit
  Serial.print(tempF);Serial.println(" F");    // print to serial monitor
  delay(3000);      //wait a few seconds
  
  
  }
        
}
13  Forum 2005-2010 (read only) / Syntax & Programs / Re: Bit of a loop problem on: July 09, 2010, 01:27:44 pm
Code:
for (byte i=0; i<10; ++i)

[size=12]That kinda works, I never would of thought of using a 'For Loop'.
[/size]
Code:
Look at the infamous Blink Without Delay example for how to blink an LED without using delay.

[size=12]I'll have to look into that and give a read.
Thanks for the help guys.[/size]
14  Forum 2005-2010 (read only) / Syntax & Programs / Re: Bit of a loop problem on: July 09, 2010, 01:10:08 pm
[size=12]The second part.
It waits 3 seconds to come on.
[/size]
Code:
Upon reaching the end of loop(), the program will start again from the beginning of loop, doing another 3000ms delay.

[size=12]Ahh, I think I'm beginning to understand.
So how do I separate the 2 ? If that's even possible.
I want the led to blink at 200, while the serial monitor updates every 3000.[/size]
15  Forum 2005-2010 (read only) / Syntax & Programs / Re: Bit of a loop problem on: July 09, 2010, 12:18:04 pm
Oh yes the curly bracket I put in the wrong place, thanks for the help.
But the led still blinks at delay(3000), not delay (200).
 Any more suggestions?
Pages: [1] 2