Pages: [1]   Go Down
Author Topic: Arduino 0018 - Antipasto 0043  (Read 1448 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

These questions peetain to the Arduino IDE:
1. When I start the IDE I get a TAB with a new sketch. How do I open the IDE with a pre-selected sketch?
2. When I open the IDE I get a TAB (see question 1). When I open the sketch I want to work on (File > Open) , it opens, what appears to be another instance of the IDE. What I want is to open a sketch under another TAB on the aready opened IDE. Is there a setting for this or is this the nature of the IDE?
3. When I upload a complied program to the Arduino board, with the SLIDE mounted on top, I get an error message:

   [exec] avrdude: stk500_2_ReceiveMessage(): timeout

that runs continuiously. It almost seems that the IDE can't connect with the board because of an open port somewhere. If I take the SLIDE off of the board, it uploads OK, but I have a problem with the software working.

Anyone have any ideas?

Thank you in advance.

drdoug
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 613
Posts: 49335
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are known issues with opening sketches in 0018. Some have been addressed in 0019, 0020, and 0021.

Quote
When I upload a complied program to the Arduino board, with the SLIDE mounted on top, I get an error message:
Does the SLIDE (whatever that is) use digital pins 0 & 1? If so, you WILL need to remove the SLIDE to upload sketches.

Quote
If I take the SLIDE off of the board, it uploads OK, but I have a problem with the software working.

Anyone have any ideas?
Sorry, no. My crystal ball is at the cleaners.

Some specific problem? Some code you want to share?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The slide I'm refering to is the TouchShield Slide from Liquidware. This board only uses pins 2 and three.
The code I'm using is the demo software from Liquidware and is as follows:

//
// Two-way Serial Communications
//
// TouchShield Slide <-> Arduino
//
// An open-souce Shadowlord Project
// www.IamShadowlord.com
//

/////////////////////////////////////////
//          Code for Arduino           //
/////////////////////////////////////////

#include <AFSoftSerial.h>

#define RX_PIN  3
#define TX_PIN  2

AFSoftSerial touchSerial =  AFSoftSerial(RX_PIN, TX_PIN);

// Globals
long randNumber;

void setup()
  {
  touchSerial.begin(9600);
  }

void loop()
  {
  randNumber = random(300);
  
  if(touchSerial.available())
    {
    char c = (char)touchSerial.read();
    if (c == 'A')
      {
      touchSerial.print(randNumber);
      delay(100);
      }
    }
  }






//
// Two-way Serial Communications
//
// TouchShield Slide <-> Arduino
//
// An open-souce Shadowlord Project
// www.IamShadowlord.com
//

/////////////////////////////////////////
//     Code for TouchShield Slide      //
/////////////////////////////////////////

// Globals
unsigned int Xstore;
unsigned int Ystore;


void setup()                                  // Prepare Screen and Serial
  {
  background(0,0,0);
  stroke(255,255,255);
  fill(0,0,0);
  
  Serial.begin(9600);
  delay(100);
  }

void loop()
  {
  gettouch();                                  // Monitor TouchShield Slide for touches
 
  if ( mouseX != Xstore || mouseY != Ystore )  // If new touches, send serial command to Arduino
    {
    Serial.print("A");
    delay(50);
    }

  Xstore = mouseX;
  Ystore = mouseY;

  char charIn = 0;                             // Monitor Serial Buffer of TouchShield Slide
  byte i = 0;
  char stringIn[32] = "";

  while(Serial.available())
    {
    charIn = Serial.read();
    stringIn = charIn;
    i += 1;
    }

  if (stringIn[0])                             // Clear screen and display the serial buffer as text
    {
    background(0,0,0);
    text(stringIn, mouseX+75, mouseY+75, 30, 30);
    }
  }

Hope this helps toward a resolution. Thanks in advance

Doug
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 613
Posts: 49335
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hope this helps toward a resolution.
Only partially. Now, you need to tell us what the problem is.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

1. When I start the IDE I get a TAB with a new sketch. How do I open the IDE with a pre-selected sketch?
2. When I open the IDE I get a TAB (see question 1). When I open the sketch I want to work on (File > Open) , it opens, what appears to be another instance of the IDE. What I want is to open a sketch under another TAB on the aready opened IDE. Is there a setting for this or is this the nature of the IDE?
3. When I upload a complied program to the Arduino board, with the SLIDE mounted on top, I get an error message:

  [exec] avrdude: stk500_2_ReceiveMessage(): timeout

that runs continuiously. It almost seems that the IDE can't connect with the board because of an open port somewhere. If I take the SLIDE off of the board, it uploads OK, but I have a problem with the software working. No response, no display.

If I use the current version of the Arduino IDE, how do I add the required files for the TouchShield Slide and where do I finf them?

Thank you in advance.

drdoug
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34151
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What I want is to open a sketch under another TAB on the aready opened IDE.
You are not understanding what TABs do. They allow multiple files in the same project. If you add a file into your sketches folder and restart that file will appear in the TAB.

Quote
3. When I upload a complied program to the Arduino board, with the SLIDE mounted on top, I get an error message:
This is because you slide board is stopping the serial communications or the auto reset. Go back and ask the designer why he designed it that way.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

TABSs - So how do you create projects? I took an existing folder and added a couple of *.pde files to and when I tried to open the folder, the IDE said I had to have a matching *.pde file in the folder. So how do I create a project folder that the IDE will recognize and open with all the files in the folder with different TABs?

drdoug
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34151
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So how do you create projects?
Use the 'new' icon.

One of the files must have the same name as the folder, the other files should not. Then all files will appear as a separate tab.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't beleive this.........

Used your suggestion and was able to bring up more than 1 TAB with different code files. This seems to work.

Still have problems.............

What I'm trying to do here is use one instance of the IDE, open two or more files for both the Arduino and TouchShield Slide and program each one individually, switching back and forth. The problem now is that when i go to compile, I get all kinds of new errors. It almost seems that the compiler is trying to compile all the code in each TAB together. Not what I expected. I was hoping that when a TAB was selected, the compile and upload would only be performed on just the open TAB.

Am I expecting too much? Any alternative ideas?

Your help is appreciated.

drdoug
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34151
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What I'm trying to do here is use one instance of the IDE, open two or more files for both the Arduino and TouchShield Slide and program each one individually, switching back and forth
No it doesn't work like that.

Quote
Am I expecting too much?
No you are expecting the wrong thing.

If you want to do that why not just have two windows open at once. Use the open option from the file menu not the menu on the arduino window. Then you can swap between the two.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I go back to one of my original problems:

 [exec] avrdude: stk500_2_ReceiveMessage(): timeout

I beleive this to be a conflict in USB port usage. With 2 IDE's open, there would be or is a problem with uploading compiled code.  This is why I was hoping that with 1 instance of the IDE open, I wouldn't have this suspected problem. I would like to think I'm not the only one in ths situation. How are others working around this?

drdoug
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34151
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I would like to think I'm not the only one in ths situation.
I think you are.

It is still not clear what you want to do.
If you have two windows open (this is NOT having two instances of the IDE) there is no confusion. The USB port used for both is the port given in the menu. The code uploaded depends on which window you click the upload icon in.
« Last Edit: October 07, 2010, 03:09:23 am by Grumpy_Mike » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have two goals here.

1. To have a better understanding as how the Arduino IDE works, which is far different than any other IDE I've used for programming.
2. To try and figure out why I'm getting the error:

[exec] avrdude: stk500_2_ReceiveMessage(): timeout

when trying to upload code to the Arduino when the TouchShield Slide is mounted on top.

My thought was that the IDE was competing for port control when loading code from the same IDE to the two different boards. From what I have been able to understand, this is not the case. The other comment was that TouchShield Slide was using the same pins as the Arduino for communications. My understanding is that the Arduino uses pins 0 and 1 for uploading and terminal I/O while the TouchShield Slide uses pins 2 and 3. I've also been working with Liquidware (designers of the TouchShield Slide) to solve this problem. Perhaps I have a hardware issue. Thank you for your time and comments.

drdoug
Logged

Pages: [1]   Go Up
Jump to: