Pages: [1] 2   Go Down
Author Topic: Clipboard does not contain a string  (Read 1192 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Edison Member
*
Karma: 48
Posts: 1628
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pete
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is correct.
Logged

Offline Offline
Edison Member
*
Karma: 19
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Already tried that too, with no success.
Logged

0
Offline Offline
Tesla Member
***
Karma: 143
Posts: 9586
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Using IE as my browser, I just highlited the code, copied, pasted into the IDE, and the code compiled.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 114
Posts: 4255
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?
 
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26275
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No problem here.
Firefox, Win7, 1.0 IDE.
Cursor to top left, ctrl-a, ctrl-c.
 
Code:
/*     ---------------------------------------------------------
 *     |  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);
}
Logged

"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.

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 114
Posts: 4255
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12631
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Worst state in America
Offline Offline
God Member
*****
Karma: 32
Posts: 799
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1] 2   Go Up
Jump to: