Go Down

Topic: Clipboard does not contain a string (Read 1 time) previous topic - next topic

kd7sjt

I am using an Arduino Uno and the Experimenter's Guide for Arduino purchased from Radio Shack. This little book is put out by the seeeed studio. It directs me to go to a website. It is: http://ardx.org/CODE12E

It then says to copy the text of the code on the webpage that pops up, and paste it into the sketch.

When I do that, I get the error, "Clipboard does not contain a string" and the code DOES NOT paste into my sketch.

Can anyone shine some light on this for me. What do I do to fix this issue?

I am using Windows 7 and Arduino sketch software ver 1.0.2

el_supremo

Works for me on Win 7 and 1.0.3.
Are you highlighting and copying only the code?

Pete


WizenedEE

paste it into a notepad document or something and then recopy it.

kd7sjt

Already tried that too, with no success.

zoomkat

Using IE as my browser, I just highlited the code, copied, pasted into the IDE, and the code compiled.
Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

UKHeliBob

Works for me too.


What browser are you using ?
  IE ?
  Chrome ?
  Other ?

How are you selecting the text ?
  Mouse - left click and hold ?
  Keyboard - shift and cursor keys ?
  Keyboard - Ctrl A ?

How are you copying the text ?
  Right click/Copy ?
  Ctrl C ?
  Menu, Edit, Copy ?
 
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

kd7sjt

I am currently using Firefox. Latest version, I remember because windows just prompted me for the update today. I tried using ie right after the other person posted the reply about using ie, but no luck there either.

kd7sjt

I select the text by putting the cursed upper left, holding down mouse button,dragging to end of code and then right click, copy, then click into my empty sketch, right click and paste. After that I get a windows ding and the error that is the reason for this thread.

AWOL

No problem here.
Firefox, Win7, 1.0 IDE.
Cursor to top left, ctrl-a, ctrl-c.
Code: [Select]
/*     ---------------------------------------------------------
*     |  Experimentation Kit for Arduino Example Code         |
*     |  CIRC-RGB .: Colourful Light :. (RGB LED)             |
*     ---------------------------------------------------------
*
* We've blinked an LED and controlled eight in sequence now it's time to
* control colour. Using an RGB LED (actual 3 LEDs in a single housing) 
* we can generate any colour our heart desires.
*
* (we'll also use a few programming shortcuts to make the code
* more portable/readable)
*/


//RGB LED pins
int ledDigitalOne[] = {9, 10, 11}; //the three digital pins of the digital LED
                                   //9 = redPin, 10 = greenPin, 11 = bluePin

const boolean ON = LOW;     //Define on as LOW (this is because we use a common
                            //Anode RGB LED (common pin is connected to +5 volts)
const boolean OFF = HIGH;   //Define off as HIGH

//Predefined Colors
const boolean RED[] = {ON, OFF, OFF};   
const boolean GREEN[] = {OFF, ON, OFF};
const boolean BLUE[] = {OFF, OFF, ON};
const boolean YELLOW[] = {ON, ON, OFF};
const boolean CYAN[] = {OFF, ON, ON};
const boolean MAGENTA[] = {ON, OFF, ON};
const boolean WHITE[] = {ON, ON, ON};
const boolean BLACK[] = {OFF, OFF, OFF};

//An Array that stores the predefined colors (allows us to later randomly display a color)
const boolean* COLORS[] = {RED, GREEN, BLUE, YELLOW, CYAN, MAGENTA, WHITE, BLACK};

void setup(){
  for(int i = 0; i < 3; i++){
   pinMode(ledDigitalOne[i], OUTPUT);   //Set the three LED pins as outputs
  }
}

void loop(){

/* Example - 1 Set a color
   Set the three LEDs to any predefined color
*/
   setColor(ledDigitalOne, CYAN);    //Set the color of LED one

/* Example - 2 Go through Random Colors
  Set the LEDs to a random color
*/
   //randomColor();

}

void randomColor(){
  int rand = random(0, sizeof(COLORS) / 2);  //get a random number within the range of colors
  setColor(ledDigitalOne, COLORS[rand]);  //Set the color of led one to a random color
  delay(1000);
}

/* Sets an led to any color
   led - a three element array defining the three color pins (led[0] = redPin, led[1] = greenPin, led[2] = bluePin)
   color - a three element boolean array (color[0] = red value (LOW = on, HIGH = off), color[1] = green value, color[2] =blue value)
*/
void setColor(int* led, boolean* color){
for(int i = 0; i < 3; i++){
   digitalWrite(led[i], color[i]);
}
}

/* A version of setColor that allows for using const boolean colors
*/
void setColor(int* led, const boolean* color){
  boolean tempColor[] = {color[0], color[1], color[2]};
  setColor(led, tempColor);
}
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

kd7sjt

Should I perhaps try downloading  fresh copy of the IDE and see if that solves the problem?

UKHeliBob

If you can't paste the code into Notepad then re-installing the IDE won't help.

Can you copy and paste from other sites, this one for example ?
Try another browser.  If that works then re-install Firefox (or stop using it)
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

PeterH


Already tried that too, with no success.


Which part failed?

If you can't copy text from a web page in your browser and paste into Notepad then you have a problem with your browser or your PC. Either way, that part isn't an Arduino problem.
I only provide help via the forum - please do not contact me for private consultancy.

Krupski


I am using an Arduino Uno and the Experimenter's Guide for Arduino purchased from Radio Shack. This little book is put out by the seeeed studio. It directs me to go to a website. It is: http://ardx.org/CODE12E

It then says to copy the text of the code on the webpage that pops up, and paste it into the sketch.

When I do that, I get the error, "Clipboard does not contain a string" and the code DOES NOT paste into my sketch.

Can anyone shine some light on this for me. What do I do to fix this issue?

I am using Windows 7 and Arduino sketch software ver 1.0.2


(1) Go to the site
(2) RIGHT click and choose "Select All" (text should be highlighted blue)
(3) RIGHT click again and select "Copy"
(4) Go to the Arduino IDE and RIGHT click, select "Paste"

Should work.
Gentlemen may prefer Blondes, but Real Men prefer Redheads!

kd7sjt

I have successfully fixed this problem by deleting the old software from my computer and installing the newest version. thank you all for your help and input.

Go Up