Show Posts
Pages: 1 ... 11 12 [13] 14 15 ... 23
181  Using Arduino / Programming Questions / Re: Simon Game programming on: January 22, 2013, 08:41:46 pm
Cant be view now ?
182  Using Arduino / Installation & Troubleshooting / Re: FTDI ft232rl DIY on: January 22, 2013, 08:18:27 pm
So what should I do now?
183  Using Arduino / Installation & Troubleshooting / Re: FTDI ft232rl DIY on: January 22, 2013, 11:29:22 am
Tried either way. It does not wwork >< Is it important to have a 500mA inductor at the VCC?
184  Using Arduino / Installation & Troubleshooting / Re: FTDI ft232rl DIY on: January 22, 2013, 11:12:08 am
Quote
Recently I bought one ft232rl and try to make my own arduino to comminicate through serial port.

Does it have a DTR pin and if so did you wire it to the reset pin on your arduino board?

If so, then a another possible problem area is getting rec tx pins backwards.

Lefty

Tried it.. still the same. Rx to Rx TX to Tx right ?

Still the same error..Tried it either way already ><
185  Using Arduino / Installation & Troubleshooting / Re: FTDI ft232rl DIY on: January 22, 2013, 10:39:41 am
Oh..OK..I will connect the DTR pin..will try.. thanks
186  Using Arduino / Installation & Troubleshooting / FTDI ft232rl DIY on: January 22, 2013, 10:14:38 am
Dear friend,

Recently I bought one ft232rl and try to make my own arduino to comminicate through serial port.

I connected everything just that I didntconnect a 500mA inductor from VCC of USB to VCC of ft232rl.

Arduino IDE recognised the serial port. However, when I try to upload code, it was not sucessful.

Below is the error message shown.

Hope anyone can help.

Thanks
187  Using Arduino / Programming Questions / Re: Simon Game programming on: January 22, 2013, 08:23:54 am
The whole code in the text file as it exceed the word limits.

Thanks
188  Using Arduino / Programming Questions / Simon Game programming on: January 22, 2013, 07:39:51 am
This is the whole coding for the simon game. I am curious about how the code flow since each function do not return anything. And I am curious about this part:
Code:
void input()
{
  for (int x=0; x <= turn;)
  {
    input1 = digitalRead(SWITCHROOT);
    input2 = digitalRead(SWITCHROOT+1);
    input3 = digitalRead(SWITCHROOT+2);
    input4 = digitalRead(SWITCHROOT+3);

    counter++;
      
    if (counter > RESPONSETIME)
    {
      Serial.println("TIMEOUT!");
      fail(randomArray[x]);
      counter = 0;
      x++;
    }
Does that means that we need to respond faster as the counter increases ?

Thanks
189  Using Arduino / Programming Questions / Re: VirtualWire on: January 22, 2013, 07:28:30 am
Then how can I implement my that idea ?
190  Using Arduino / Programming Questions / Re: VirtualWire on: January 22, 2013, 07:22:57 am
Quote
it means the code sometimes will fail to execute ? Am I correct ?
During development, code will always sometimes fail to execute as we expect it to.
But, no, you are not correct. "Blocking" means the code will loop waiting until a message is received. This may or may not be a problem for you.

The great thing about the Arduino is that you can try things, and if they don't work, try something different.
The frequency of your questions leads me to suspect you're not trying the things you're asking about.
Code:
#include <VirtualWire.h>
#undef int
#undef abs
#undef double
#undef float
#undef round
void setup()
{
    Serial.begin(9600); // Debugging only
    Serial.println("setup");

    // Initialise the IO and ISR
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000); // Bits per sec

    vw_rx_start();       // Start the receiver PLL running
    pinMode(13, OUTPUT);
}

void loop()
{
  uint8_t count;
if(count==true)
{
  count = false;
}
  count = vw_wait_rx_max(2000);// Non-blocking
  if (true)
  {
        digitalWrite(13, HIGH); // Flash a light to show received good message
delay(500);// Message with a good checksum received, dump it.
digitalWrite(13, LOW);
        delay(500);
  }
  else if(false)
  {
    digitalWrite(13, HIGH);
    delay(100);
    digitalWrite(13,LOW);
    delay(100);
  }
       

   
}

I write this code..I want it to be like when it does not receive message for 2s, then it will return false. If it receive message, then return true. Then it will only blink once then the whole system become false again. So what moddification I need to do ?

Thanks
191  Using Arduino / Programming Questions / Re: VirtualWire on: January 22, 2013, 04:59:31 am
Cool..yea I shall work for it now..thanks so much ..This library is easy to use !
192  Using Arduino / Programming Questions / Re: VirtualWire on: January 22, 2013, 04:49:19 am
Oh..it means the code sometimes will fail to execute ? Am I correct ?
193  Using Arduino / Programming Questions / Re: VirtualWire on: January 22, 2013, 04:31:59 am
Blocking of what ? Blocking of the signal from transmitter ?
194  Using Arduino / Programming Questions / Re: VirtualWire on: January 22, 2013, 04:22:54 am
OK..so means I can use the idea that vw_have_message () then do something ?
195  Using Arduino / Programming Questions / Re: VirtualWire on: January 22, 2013, 04:02:14 am
Quote
What does it means ?
In a nutshell, see if there's any data to read, read it
Code:
if (vw_get_message(buf, &buflen))
, and then print it
Code:
for (i = 0; i < buflen; i++)
{
    Serial.print((char)buf[i]);
    Serial.print(" ");
}
.
Then how about vw_have_message()?
Pages: 1 ... 11 12 [13] 14 15 ... 23