searched but cannot find what i am doing wrong?
I am new to Arduino having used Basic before. I wish to use the routine do_this
I like to have things in their own routines so thought i would try something simple first, but cannot get this right?
i get "error 'ledPin' was not declared in this scope"
//-----------------------------------------------------------------------
void setup() {
do_this();
pinMode(ledPin, OUTPUT); //error 'ledPin' was not declared in this scope
}
//-----------------------------------------------------------------------
void loop()
{
// Do something
}
//----------------------------------------------------------------------
void do_this()
{
const int ledPin = 13; // LED connected to digital pin 13
}
//-----------------------------------------------------------------------
I am sure this is very simple but need a little help?
Regards
Gary