Show Posts
Pages: 1 ... 11 12 [13] 14 15 ... 23
181  Using Arduino / Programming Questions / Re: Simon Game programming on: January 22, 2013, 10:38:51 pm
I am very curious and dont understand for the part if(counter> RESPONSETIME)

How is that ? the counter will increase in every loop, so in every loop it is getting closer to exceed RESPONSETIME isnt ?
182  Using Arduino / Programming Questions / Re: Simon Game programming on: January 22, 2013, 10:02:28 pm
No..just arduino languages. So , win() will only be call once the for loop finish executing in void loop() ?
183  Using Arduino / Programming Questions / Re: Simon Game programming on: January 22, 2013, 09:16:44 pm
Ok, the speeed of the output goes faster. However, based on the full coding, does it means that the time I need to respond also getting faster ? Cause I seems to feel it when playing it ><

Ok, so either the player win or lose, it will follow the sequence : output > input > increase speed. And the final win(); is for what ?

Thanks
184  Using Arduino / Programming Questions / Re: Simon Game programming on: January 22, 2013, 09:05:21 pm
But is it true that every turn I have 3s of timeout time ? But it seems to me not on hardware ><

Well, procedures so means once it done execute the output code, then it will automatically go to input code ? Flow according to the code ?

Thanks
185  Using Arduino / Programming Questions / Re: Simon Game programming on: January 22, 2013, 08:41:46 pm
Cant be view now ?
186  Using Arduino / Installation & Troubleshooting / Re: FTDI ft232rl DIY on: January 22, 2013, 08:18:27 pm
So what should I do now?
187  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?
188  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 ><
189  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
190  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
191  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
192  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
193  Using Arduino / Programming Questions / Re: VirtualWire on: January 22, 2013, 07:28:30 am
Then how can I implement my that idea ?
194  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
195  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 !
Pages: 1 ... 11 12 [13] 14 15 ... 23