Test to see if I can include code tags

`[code]
#include<LiquidCrystal.h> // Library for the Liquid Crystal Display
LiquidCrystal lcd(12,11,5,4,3,2); // Digital pins for the Liquid Crystal Display
const int analogInPin= A0; // Wiper of 5K pot hooked to pin A0 Analog pin.
const int analogOutPin = 8; // This is hooked pin 8 of the digital pins
const int duration = 50; // Duration of LED staying on during bpm
int potvalue=0; //Potentiometer pin
int outputvalue=0;

unsigned int beats_per_minute = 60; // Variables to track tempo and time delay
unsigned int MS_per_beat = 0;
void setup()
{
lcd.begin(16,2); // Begin LCD
lcd.clear(); // Clear LCD screen
unsigned int milliseconds_per_minute = 1000 * 60; //Calculate MS_per_beat based on tempo in bpm
MS_per_beat = milliseconds_per_minute/beats_per_minute;
}
void loop()
{
int potvalue = analogRead(analogInPin); //Check the status of the potentiometer
if (value ! = int potvalue); //Recalculate the tempo if the value has changed.
{
beats_per_muinute = map(potvalue, 0, 1023, 30, 350); // Map the value to a reasonable metronome range of 30 to 350 bpm
unsigned int milliseconds_per_minute = 1000 * 60; //Recalculate the delay time
MS_per_beat = millisecond_per_minute/beats_per_minute; //Recalculate the delay time
potvalue = value; //Update potvalue
}
analogOutPin(8,potvalue); //Blink LED in bpm
lcd.setCursor(0,0);
lcd.print("Beat Per Minute");
lcd.setCursor(0,1);
lcd.print(potvalue,duration); //Output to the LCD
delay(MS_per_beat); //Delay loop for specified amount of time
lcd.clear() //Clear LCD screen
}
[/code]Preformatted text

Nope. Which method did you use? It would have been informative to tell.

I went to Edit on the sketch page, and clicked on where it said, copy to the forum. Then I clicked on the </> and posted it. I have no idea if it did the code tags correctly. If I did not do it correctly please tell me where I went wrong?
I do have a question: This code runs until in the void loop() to the line potvalue=value; //Update potvalue The error message says pot value not in the scope. I have tried several things to eliminate the error message, but I still get an error message.

Wrong. You should only paste it.

image

Please tell me what I did wrong, and I will try to make a second try at it. I need exact instructions.

I gave you explicit instructions in the previous thread. Other people did too. You reported the correct sequence up to using </> which was wrong. Just paste it at that point.

How do I paste it, once I have clicked on save to the forum?

ctrl-V or for those who are averse to keyboard shortcuts, Edit -> Paste

Have you never used a GUI before?

Ok, will try again

You re-declare potvalue all over the place - bit not in the correct scope/context where you're using it.

I went to the sketch page and went to copy to the forum. A message came up and said it was on my clip board. I then hit the typing key "Ctrl with capital V The sketch loaded on the Reply. I then clicked on the code tag symbol </> I could not see that it did anything different than before. What am I doing wrong?

I told you not to do that! Reply #4...

Ok, I will try that.

#include<LiquidCrystal.h> // Library for the Liquid Crystal Display
LiquidCrystal lcd(12,11,5,4,3,2);  //  Digital pins for the Liquid Crystal Display
const int analogInPin= A0; // Wiper of 5K pot hooked to pin A0 Analog pin.
const int analogOutPin = 8;  //  This is hooked pin 8 of the digital pins
const int duration = 50; // Duration of LED staying on during bpm
int potvalue=0;  //Potentiometer pin
int outputvalue=0;

unsigned int beats_per_minute = 60; // Variables to track tempo and time delay
unsigned int MS_per_beat = 0;
void setup()
{
  lcd.begin(16,2); // Begin LCD
  lcd.clear();  // Clear LCD screen
  unsigned int milliseconds_per_minute = 1000 * 60;  //Calculate MS_per_beat based on tempo in bpm
  MS_per_beat = milliseconds_per_minute/beats_per_minute;
 }
void loop()
{
  int potvalue = analogRead(analogInPin); //Check the status of the potentiometer
  if (value ! = int potvalue); //Recalculate the tempo if the value has changed. 
{
  beats_per_muinute = map(potvalue, 0, 1023, 30, 350); // Map the value to a reasonable metronome range of 30 to 350 bpm
  unsigned int milliseconds_per_minute = 1000 * 60; //Recalculate the delay time
  MS_per_beat = millisecond_per_minute/beats_per_minute;  //Recalculate the delay time
  potvalue =  value; //Update potvalue
}
  analogOutPin(8,potvalue); //Blink LED in bpm
  lcd.setCursor(0,0);
  lcd.print("Beat Per Minute");
  lcd.setCursor(0,1);
  lcd.print(potvalue,duration);  //Output to the LCD
  delay(MS_per_beat); //Delay loop for specified amount of time
  lcd.clear() //Clear LCD screen
  }

Finally I get it!

You can also just manually put 3 back-ticks on a line before the first line of the code, and after the last line of the code, which is all the GUI button does.

The above code is old code that has errors, I just wanted to see if I could post it with code tags.
I am going to start a new post with questions concerning updated version that has no errors. The reason is because this post is about a different subject.