title: Is it possible to access a variable in a sketch from a class (Arduino)?
body: <p>Say I want to get a value of a variable in a sketch from a class I wrote like</p>
  
  <p>sketch</p>
  
  <pre><code>int device;
  void setUp() {
     device = 1;
  }
  </code></pre>
  
  <p>And I have a class
  SomeClass.cpp</p>
  
  <pre><code>void Device::checkTimedEvent() {
     someDevice = device; //variable from sketch
  }
  </code></pre>
  
  <p>I know it's possible to access members from another class where I can include the class and use the :: scope operator but not sure how the sketch relates to classes.
  thanks</p>