Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First change your </p> <pre><code>#ifndef serialComms #define serialComms </code></pre> <p>to </p> <pre><code>#ifndef serialComms_h #define serialComms_h </code></pre> <p>You can not have a macro with the same name as an instance.</p> <p>Then check you capitalization e.g. readBytes vs testing.readbytes(); notice the B</p> <hr> <p>Make SURE you close out all your Arduino IDE's when making a NEW library directory and initial files with in it, for the first time. The IDE on startup caches a list of the files. They can subsequently change there insides. but new files will not be known until the next start.</p> <hr> <p>The following compiles fine for me. Once I corrected all the typo's:</p> <p>definetest.ino</p> <pre><code>#include &lt;serialComms.h&gt; serialComms testing; void setup() { Serial.begin(9600); } void loop() { } void serialEvent() { testing.readBytes(); testing.assignBytes(); } </code></pre> <p>serialComms.cpp</p> <pre><code>#ifndef serialComms_h #define serialComms_h /* serialComms Class */ class serialComms { public: // serialComms() {}; void init(); void readBytes(); // Will be used to create the array --&gt; two variables for now... void assignBytes(); }; #endif </code></pre> <p>serialComms.h</p> <pre><code>#include &lt;Arduino.h&gt; #include &lt;serialComms.h&gt; void serialComms::init() { // This is where the constructor would be...right now we are too stupid to have one } void serialComms::readBytes() // Target Pin,Values { digitalWrite(11,HIGH); delay(250); digitalWrite(11,LOW); assignBytes(); } void serialComms::assignBytes() { for(int t = 0;t&lt;5;t++) { digitalWrite(10,HIGH); delay(250); digitalWrite(10,LOW); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload