trouble with program

hi all i am new to the forum just got an arduino uno and was looking to do a capatative senser i have downloaded the capsens from arduino site its in my libarys i want to add this to a piano sketch but all i get are nothing but errer mesages i.e void loop , wrong name i have built a realy nice looking table for this to go into for the kids to play with but i clearly have no i dear about programming any help would be great or if you are feeling generous the compleat code would be great thank you or realy any guidence would be great

Let’s see what you have written so far.

If you post your code we can help you fix it. We won’t just write the code for you and without knowing how you’ve built this table it is doubtful that anyone could. There is a section of the forum called Gigs and Collaborations where you can offer to pay someone to write your code for you. But this section is for people to get help with their code and to learn how to write good code.

Post your code here and we’ll help you fix the compile errors. Please use code tags when you do. Use the little symbol above where you write your response that looks like “</>” to get them.

HI GUYS THANK FOR YOUR REPLYS i should have said i saw this project on youtube and thought the kids would love it so i built the table in mind that it was going to be a cap sense thing the code was on the site but when i try to add the cap senser code im not sure i am or how realy the code is here
/* Piano

Created by:
Oh Hai Seng || Junny Oh 07 November 2013
*/

// Import the CapacitiveSensor Library.
#include <CapacitiveSensor.h>

/*

  • CapitiveSense Library Demo Sketch
  • Paul Badger 2008
  • Uses a high value resistor e.g. 10M between send pin and receive pin
  • Resistor effects sensitivity, experiment with values, 50K - 50M. Larger resistor values yield larger sensor values.
  • Receive pin is the sensor pin - try different amounts of foil/metal on this pin
    */

// 10M resistor between pins 4 & 2, pin 2 is sensor pin, add a wire and or foil if desired
CapacitiveSensor cs_2_3 = CapacitiveSensor(2,3); // 10M resistor between pins 4 & 6, pin 6 is sensor pin, add a wire and or foil
// 10M resistor between pins 4 & 8, pin 8 is sensor pin, add a wire and or foil

void setup()
{
cs_2_3.set_CS_AutocaL_Millis(0xFFFFFFFF); // turn off autocalibrate on channel 1 - just as an example
Serial.begin(9600);
}

void loop()
{
long start = millis();

long total2 = cs_2_3.capacitiveSensor(30);

Serial.print(millis() - start); // check on performance in milliseconds
Serial.print("\t"); // tab character for debug windown spacing

Serial.print("\t");
Serial.print(total2); // print sensor output 2
Serial.print("\t");

delay(10); // arbitrary delay to limit data to serial port
}

// Name the pin as led.
#define speaker 11

// Set the Send Pin & Receive Pin.
CapacitiveSensor cs_2_3 = CapacitiveSensor(2,3); // 10M resistor between pins 4 & 2, pin 2 is sensor pin, add a wire and or foil if desired
; // 10M resistor between pins 4 & 8, pin 8 is sensor pin, add a wire and or foil
Serial.begin(9600);

void setup()
{
cs_2_3.set_CS_AutocaL_Millis(0xFFFFFFFF); // turn off autocalibrate on channel 1 - just as an example

// Arduino start communicate with computer.
Serial.begin(9600);
}

void loop()
{
// Set a timer.
long start = millis();

// Set the sensitivity of the sensors.
long total1 = cs_2_3.capacitiveSensor(30);

Serial.print(millis() - start); // check on performance in milliseconds
Serial.print("\t"); // tab character for debug windown spacing

Serial.print(total1); // print sensor output 1
Serial.print("\t"); // Leave some space before print the next output
Serial.print(total2); // print sensor output 2
Serial.print("\t"); // Leave some space before print the next output
Serial.print(total3); // print sensor output 3
Serial.print("\t"); // Leave some space before print the next output
Serial.print(total4); // print sensor output 4
Serial.print("\t"); // Leave some space before print the next output
Serial.print(total5); // print sensor output 5
Serial.print("\t"); // Leave some space before print the next output
Serial.print(total6); // print sensor output 6
Serial.print("\t"); // Leave some space before print the next output
Serial.println(total7); // print sensor output 7
// “println” - “ln” represent as “line”, system will jump to next line after print the output.

// When hand is touched the sensor, the speaker will produce a tone.
// I set a threshold for it, so that the sensor won’t be too sensitive.
if (total1 > 150) tone(speaker,523);
if (total2 > 150) tone(speaker,587);
if (total3 > 150) tone(speaker,659);
if (total4 > 150) tone(speaker,698);
if (total5 > 150) tone(speaker,784);
if (total6 > 150) tone(speaker,880);
if (total7 > 150) tone(speaker,988);

// When hand didn’t touch on it, no tone is produced.
if (total1<=150 & total2<=150 & total3<=150 & total4<=150 & total5<=150 & total6<=150 & total7<=150)
noTone(speaker);

delay(10); // arbitrary delay to limit data to serial port
}

so im not sure if i have this right at all table looks great

Delta_G:
Post your code here and we’ll help you fix the compile errors. Please use code tags when you do. Use the little symbol above where you write your response that looks like “</>” to get them.

So you just completely ignore my advice about the code tags. Why?

guitar-maker:
table looks great

I'm sure it does. It's going to take more than copy and paste to make the code work. You're going to need to do a little learning here. If you can't be bothered to form whole sentences or use punctuation though, I doubt you're going to find coding to be very easy. The compiler is way more of a stickler for grammar than I am.

when i try to add the cap senser code

You seem to have added a second setup() function and loop() function, but there can only be one of each in an Arduino program. Several of the variables have not been declared,

If you are going to write the program yourself you need to understand the basics.