grozzie2 / NexDome

Open source drivers for the NexDome
GNU General Public License v2.0
4 stars 6 forks source link

Shutter ino will not compile! #6

Open backroadrider opened 6 years ago

backroadrider commented 6 years ago

attempting to compile nexshutter.ino yields the following errors:

Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"

NexShutter:768: error: 'Serial_' has not been declared

bool ProcessCommandBuffer(char cbuf, Serial_ responder)

                                   ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino: In function 'void setup()':

NexShutter:78: error: 'Serial1' was not declared in this scope

define Wireless Serial1

              ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino:628:3: note: in expansion of macro 'Wireless'

Wireless.begin(9600);

^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino: At global scope:

NexShutter:748: error: 'SERIAL_BUFFER_SIZE' was not declared in this scope

char SerialBuffer[SERIAL_BUFFER_SIZE];

               ^

NexShutter:753: error: 'SERIAL_BUFFER_SIZE' was not declared in this scope

char WirelessBuffer[SERIAL_BUFFER_SIZE];

                 ^

NexShutter:768: error: 'Serial_' has not been declared

bool ProcessCommandBuffer(char cbuf, Serial_ responder)

                                   ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino: In function 'bool ProcessCommandBuffer(char, int)':

NexShutter:776: error: request for member 'println' in '* responder', which is of non-class type 'int'

 responder->println("A");

            ^

NexShutter:787: error: request for member 'write' in '* responder', which is of non-class type 'int'

   responder->write("S",1);

              ^

NexShutter:793: error: request for member 'write' in '* responder', which is of non-class type 'int'

       responder->write("P",1);

                  ^

NexShutter:796: error: request for member 'write' in '* responder', which is of non-class type 'int'

       responder->write("D",1);

                  ^

NexShutter:799: error: request for member 'write' in '* responder', which is of non-class type 'int'

       responder->write("C",1);

                  ^

NexShutter:802: error: request for member 'write' in '* responder', which is of non-class type 'int'

       responder->write("O",1);

                  ^

NexShutter:805: error: request for member 'write' in '* responder', which is of non-class type 'int'

       responder->write("U",1);

                  ^

NexShutter:809: error: request for member 'write' in '* responder', which is of non-class type 'int'

   if(RadioLongSleep) responder->write("1",1);

                                 ^

NexShutter:810: error: request for member 'write' in '* responder', which is of non-class type 'int'

   else responder->write("0",1);

                   ^

NexShutter:811: error: request for member 'write' in '* responder', which is of non-class type 'int'

   responder->write("\n",1);

              ^

NexShutter:820: error: request for member 'write' in '* responder', which is of non-class type 'int'

 responder->write("P ");

            ^

NexShutter:821: error: request for member 'write' in '* responder', which is of non-class type 'int'

 responder->write(buf,strlen(buf));

            ^

NexShutter:822: error: request for member 'write' in '* responder', which is of non-class type 'int'

 responder->write("\n",1);

            ^

NexShutter:829: error: request for member 'write' in '* responder', which is of non-class type 'int'

 responder->write("Q ",2);

            ^

NexShutter:830: error: request for member 'write' in '* responder', which is of non-class type 'int'

 responder->write(buf,strlen(buf));

            ^

NexShutter:831: error: request for member 'write' in '* responder', which is of non-class type 'int'

 responder->write("\n",1);

            ^

NexShutter:842: error: request for member 'print' in '* responder', which is of non-class type 'int'

 responder->print("W ");

            ^

NexShutter:843: error: request for member 'println' in '* responder', which is of non-class type 'int'

 if(FoundXbee) responder->println("Online");

                          ^

NexShutter:844: error: request for member 'println' in '* responder', which is of non-class type 'int'

 else responder->println("Offline");

                 ^

NexShutter:849: error: request for member 'println' in '* responder', which is of non-class type 'int'

 responder->println("O");

            ^

NexShutter:859: error: request for member 'println' in '* responder', which is of non-class type 'int'

 responder->println("C");

            ^

NexShutter:882: error: request for member 'print' in '* responder', which is of non-class type 'int'

 responder->print("B ");

            ^

NexShutter:884: error: request for member 'print' in '* responder', which is of non-class type 'int'

 responder->print(BatteryVolts);

            ^

NexShutter:885: error: request for member 'print' in '* responder', which is of non-class type 'int'

 responder->print(" ");

            ^

NexShutter:886: error: request for member 'println' in '* responder', which is of non-class type 'int'

 responder->println(CutoffVolts);

            ^

NexShutter:905: error: request for member 'print' in '* responder', which is of non-class type 'int'

 responder->print("H ");

            ^

NexShutter:906: error: request for member 'println' in '* responder', which is of non-class type 'int'

 responder->println(HibernateTimeout);

            ^

NexShutter:921: error: request for member 'println' in '* responder', which is of non-class type 'int'

 responder->println("X");

            ^

NexShutter:928: error: request for member 'print' in '* responder', which is of non-class type 'int'

 responder->print("VNexShutter ");

            ^

NexShutter:929: error: request for member 'print' in '* responder', which is of non-class type 'int'

 responder->print(VERSION_MAJOR);

            ^

NexShutter:930: error: request for member 'print' in '* responder', which is of non-class type 'int'

 responder->print(".");

            ^

NexShutter:931: error: request for member 'println' in '* responder', which is of non-class type 'int'

 responder->println(VERSION_MINOR);

            ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino: In function 'void ProcessSerialCommand()':

NexShutter:940: error: 'SerialBuffer' was not declared in this scope

if(ProcessCommandBuffer(SerialBuffer,&Computer)) {

                       ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino: In function 'void IncomingSerialChar(char)':

NexShutter:955: error: 'SerialBuffer' was not declared in this scope

SerialBuffer[SerialPointer]=a;

^

NexShutter:957: error: 'SERIAL_BUFFER_SIZE' was not declared in this scope

if(SerialPointer==SERIAL_BUFFER_SIZE) {

                 ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino: In function 'void ConfigureWireless()':

NexShutter:982: error: 'WirelessBuffer' was not declared in this scope

memset(WirelessBuffer,0,SERIAL_BUFFER_SIZE);

      ^

NexShutter:982: error: 'SERIAL_BUFFER_SIZE' was not declared in this scope

memset(WirelessBuffer,0,SERIAL_BUFFER_SIZE);

                       ^

NexShutter:78: error: 'Serial1' was not declared in this scope

define Wireless Serial1

              ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino:986:3: note: in expansion of macro 'Wireless'

Wireless.print("+++");

^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino: In function 'void ProcessWirelessData()':

NexShutter:998: error: 'WirelessBuffer' was not declared in this scope

if(WirelessBuffer[0]=='O') {

  ^

NexShutter:78: error: 'Serial1' was not declared in this scope

define Wireless Serial1

              ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino:1006:13: note: in expansion of macro 'Wireless'

         Wireless.println("ATID5555");

         ^

NexShutter:1069: error: 'Serial_' was not declared in this scope

         ProcessCommandBuffer(WirelessBuffer,(Serial_ *)&Wireless);          

                                              ^

NexShutter:1069: error: expected primary-expression before ')' token

         ProcessCommandBuffer(WirelessBuffer,(Serial_ *)&Wireless);          

                                                       ^

NexShutter:1076: error: 'SERIAL_BUFFER_SIZE' was not declared in this scope

   memset(WirelessBuffer,0,SERIAL_BUFFER_SIZE);

                           ^

NexShutter:1094: error: 'WirelessBuffer' was not declared in this scope

 if(WirelessBuffer[0]=='s') {

    ^

NexShutter:1102: error: 'WirelessBuffer' was not declared in this scope

 if(ProcessCommandBuffer(WirelessBuffer,(Serial_ *)&Wireless)) {

                         ^

NexShutter:1102: error: 'Serial_' was not declared in this scope

 if(ProcessCommandBuffer(WirelessBuffer,(Serial_ *)&Wireless)) {

                                         ^

NexShutter:1102: error: expected primary-expression before ')' token

 if(ProcessCommandBuffer(WirelessBuffer,(Serial_ *)&Wireless)) {

                                                  ^

NexShutter:78: error: 'Serial1' was not declared in this scope

define Wireless Serial1

              ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino:1102:56: note: in expansion of macro 'Wireless'

 if(ProcessCommandBuffer(WirelessBuffer,(Serial_ *)&Wireless)) {

                                                    ^

NexShutter:1115: error: 'WirelessBuffer' was not declared in this scope

memset(WirelessBuffer,0,SERIAL_BUFFER_SIZE);

      ^

NexShutter:1115: error: 'SERIAL_BUFFER_SIZE' was not declared in this scope

memset(WirelessBuffer,0,SERIAL_BUFFER_SIZE);

                       ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino: In function 'void IncomingWirelessChar(char)':

NexShutter:1130: error: 'WirelessBuffer' was not declared in this scope

WirelessBuffer[WirelessPointer]=a;

^

NexShutter:1132: error: 'SERIAL_BUFFER_SIZE' was not declared in this scope

if(WirelessPointer==SERIAL_BUFFER_SIZE) {

                   ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino: In function 'void loop()':

NexShutter:78: error: 'Serial1' was not declared in this scope

define Wireless Serial1

              ^

C:\Users\sjohn\Downloads\Nexdome Firmware\NexShutter\NexShutter.ino:1223:6: note: in expansion of macro 'Wireless'

if(Wireless.available()) {

  ^

exit status 1 'Serial_' has not been declared

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

grozzie2 commented 6 years ago

If you look carefully at the error messages, you have the arduino uno selected for the board type. Select the Leonardo and it should compile. The code requires the second serial available from the leonardo board type over the usb connection, which is not available on the uno.

backroadrider commented 6 years ago

Got it. My first foray into the world of Arduino.

I managed to compile and upload your v 1.1 firmware but it did not remedy my problem: for some reason my shutter motor has slowed to a crawl, now taking 15 to 20 minutes to open/close the shutter. Not sure if it is a controller or a motor issue. Thought maybe a firmware refresh would help, but no such luck.

Thanks again.

Steve

From: Gerry Rozema notifications@github.com Sent: Friday, June 22, 2018 11:23 AM To: grozzie2/NexDome NexDome@noreply.github.com Cc: backroadrider scj.home@outlook.com; Author author@noreply.github.com Subject: Re: [grozzie2/NexDome] Shutter ino will not compile! (#6)

If you look carefully at the error messages, you have the arduino uno selected for the board type. Select the Leonardo and it should compile. The code requires the second serial available from the leonardo board type over the usb connection, which is not available on the uno.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgrozzie2%2FNexDome%2Fissues%2F6%23issuecomment-399517472&data=02%7C01%7C%7C8719426e68c64bb6d2e508d5d864ca11%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636652849751133830&sdata=FMxI2wnyevZb3%2FNh1kxx8bjLZbHUPFBiq7VxntoEuZo%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAmnzF6rQR2NtQxknhwdz70fBhgPS2A8Gks5t_SfsgaJpZM4U0Im0&data=02%7C01%7C%7C8719426e68c64bb6d2e508d5d864ca11%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636652849751133830&sdata=XqR2dPl2WPrGplTIyR8SSPn%2FwlgYgVRyMmMU2I3oiKU%3D&reserved=0.