Menu

Can't compile

2021-07-23
2021-07-25
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-23

    Hi Forum,

    I placed myFocuserPro2libraries in
    C:\Users\Astra_1\Documents\Arduino\libraries
    However I still have compilation error.
    I even tried to place it in the sketch subfolder, same result.
    Please help.
    Thanks in advance and best regards,
    Bojan


    Arduino: 1.8.13 (Windows 7), Board: "Arduino Nano, ATmega328P"

    myFP2_ULN2003_312:47:10: fatal error: myQueue.h: No such file or directory
    include <myqueue.h> // By Steven de Salas</myqueue.h>

    compilation terminated.

    exit status 1

    myQueue.h: No such file or directory


     

    Last edit: Bojan Stajcar 2021-07-23
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-23

    I am still trying, but no luck.
    Is this myQueue.h OK?

     
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-24

    Still no joy..
    What I am doing wrong?

     

    Last edit: Bojan Stajcar 2021-07-24
  • brownrb

    brownrb - 2021-07-24

    Unzip the firmware file. It will make a number of folders.

    Locate the folder myFocuserPro2libraries, and in that folder

    There should be SIXTEEN folders
    Bounce2
    LCD5110_Basic
    myAFMotor
    myDallasTemperature
    myDHT21
    myEEPROM
    myHalfStepper
    myI2cKeypad
    myIRRemote
    myOLED
    myQueue
    myRotaryEncoder
    myTFTv2
    myUTFT
    newliquidCrystal
    OneWire

    Copy these folders to Documents\Arduino\libraries folder (for windows). Replace any existing folders or files.

    DO NOT COPY THESE TO THE C:\Program Files(x86)\Arduino

    Do not edit or replace any of these files. They have been edited and modified to use with the myFocuserPro firmware.

     
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-24

    Thank you for the reply :-)
    I think I followed that instruction- on the screen dump it is visible that I have myQueue folder in C:\Users\Astra_1\Documents\Arduino\libraries folder, but I still have the same error, even after restarting windows.
    What i am doing wrong?

     
  • brownrb

    brownrb - 2021-07-24

    In that folder, the screencapture c_211.jpg
    In that myQueue folder, there should be a single file called myQueue.h

    Check that the file is there.

    If it is

    Start Arduino IDE,
    On the menu bar at the top,
    File
    Preferences

    In this pop up preferences window
    Under Sketchbook Location
    It will show the location where the myFocuserPro2 libraries should be copied to
    Mine says
    D:\Documents\Arduino
    Because I relocated my user Documents folder to be on a HDD and not C: drive
    So i have
    D:\Documents\Arduino\Libraries
    and in that Libraries folder are all the myFocuserPro libraries

    in your case it should be
    C:\Users\Astra_1\Documents\Arduino
    as the sketchbook location under preferences

     

    Last edit: brownrb 2021-07-24
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-24

    Hi Robert,
    Thank you for the reply...

    Yes, in Menu>File>Preferencies>Settings>Sketchbook location I have :
    C:\Users\Astra_1\Documents\Arduino\libraries
    and in this folder there are other subfolders (libraries), including myQueue where I have myQueue.h.
    But for some reason my Arduino IDE still can't find that header file..
    I will try to move everything on my H drive and see what happens..

     
    • brownrb

      brownrb - 2021-07-25

      C:\Users\Astra_1\Documents\Arduino\libraries

      as I have said before this is wrong
      You have to change it to
      C:\Users\Astra_1\Documents\Arduino

       
      • Bojan Stajcar

        Bojan Stajcar - 2021-07-25

        Yes..
        I had that originally, but for some reason, I was placing myFocurer libraries in exactly that folder (C:\Users\Astra_1\Documents\Arduino) which was wrong.
        Then I tried other things, run out of patience.. and bothered half the world with my problems.. my apologies for that.
        Anyway, it works now.
        Thanks again :-)

         
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-24

    I moved everything to my F drive, problem is still there..

     

    Last edit: Bojan Stajcar 2021-07-24
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-24

    I also tried something totally desperate this morning:
    I replaced #include <myqueue.h>
    with the content of myQueue.h file
    Now the problem is with myEEPROM.h, as expected (next #include statement.. by the way, I had to un-comment it to proceed with compilation from previous point? why was it commented?).</myqueue.h>

    It seems I may be able to overcome the library problems by replacing #include statements with required libraries contents, but I never had to this in the past...
    Is it possible my copy of Arduino simply doesn't recognize myLibraries... possibly everything else in that folder? Not likely because library update works OK (when I specify some other empty folder, it wants to install all the libraries, but now it doesn't so that's why I think the folder is OK)

     

    Last edit: Bojan Stajcar 2021-07-24
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-24

    Another desperate attempt:
    I placed required (?) header files in project folder.
    Now I have different problem:

    Arduino: 1.8.13 (Windows 7), Board: "Arduino Nano, ATmega328P"

    myFP2_ULN2003_312:93:1: error: 'Queue' does not name a type

    Queue<string> queue(QUEUELENGTH); // receive serial queue of commands</string>

    ^~~~~

    In file included from F:\Data_disk\PROJ\Astro\Equipment\Telescope\focuser\Focus\Arduino_focuser\Arduino ASCOM Focuser Pro2 DIY\myFP2-Firmware-312\myFP2_ULN2003_312\myFP2_ULN2003_312.ino:111:0:

    sketch\serialcomms.h: In function 'void ser_comms()':

    serialcomms.h:95:8: error: 'queue' was not declared in this scope

    if ( queue.count() == 0 )

        ^~~~~
    

    sketch\serialcomms.h:95:8: note: suggested alternative: 'square'

    if ( queue.count() == 0 )

        ^~~~~
    
        square
    

    serialcomms.h:97:28: error: 'queue' was not declared in this scope

    receiveString = (String) queue.pop();

                            ^~~~~
    

    sketch\serialcomms.h:97:28: note: suggested alternative: 'square'

    receiveString = (String) queue.pop();

                            ^~~~~
    
                            square
    

    In file included from F:\Data_disk\PROJ\Astro\Equipment\Telescope\focuser\Focus\Arduino_focuser\Arduino ASCOM Focuser Pro2 DIY\myFP2-Firmware-312\myFP2_ULN2003_312\myFP2_ULN2003_312.ino:111:0:

    sketch\serialcomms.h: In function 'void serialEvent()':

    serialcomms.h:615:11: error: 'queue' was not declared in this scope

           queue.push(line);
    
           ^~~~~
    

    sketch\serialcomms.h:615:11: note: suggested alternative: 'square'

           queue.push(line);
    
           ^~~~~
    
           square
    

    F:\Data_disk\PROJ\Astro\Equipment\Telescope\focuser\Focus\Arduino_focuser\Arduino ASCOM Focuser Pro2 DIY\myFP2-Firmware-312\myFP2_ULN2003_312\myFP2_ULN2003_312.ino: In function 'void writeEEPROMNow()':

    myFP2_ULN2003_312:139:3: error: 'EEPROM_writeAnything' was not declared in this scope

    EEPROM_writeAnything(currentaddr, myfocuser);

    ^~~~~~~~~~~~~~~~~~~~

    F:\Data_disk\PROJ\Astro\Equipment\Telescope\focuser\Focus\Arduino_focuser\Arduino ASCOM Focuser Pro2 DIY\myFP2-Firmware-312\myFP2_ULN2003_312\myFP2_ULN2003_312.ino: In function 'void setup()':

    myFP2_ULN2003_312:393:5: error: 'EEPROM_readAnything' was not declared in this scope

     EEPROM_readAnything( addr, myfocuser );
    
     ^~~~~~~~~~~~~~~~~~~
    

    myFP2_ULN2003_312:410:5: error: 'EEPROM_readAnything' was not declared in this scope

     EEPROM_readAnything( currentaddr, myfocuser );
    
     ^~~~~~~~~~~~~~~~~~~
    

    F:\Data_disk\PROJ\Astro\Equipment\Telescope\focuser\Focus\Arduino_focuser\Arduino ASCOM Focuser Pro2 DIY\myFP2-Firmware-312\myFP2_ULN2003_312\myFP2_ULN2003_312.ino: In function 'void loop()':

    myFP2_ULN2003_312:523:8: error: 'queue' was not declared in this scope

    if ( queue.count() >= 1 ) // check for serial command

        ^~~~~
    

    F:\Data_disk\PROJ\Astro\Equipment\Telescope\focuser\Focus\Arduino_focuser\Arduino ASCOM Focuser Pro2 DIY\myFP2-Firmware-312\myFP2_ULN2003_312\myFP2_ULN2003_312.ino:523:8: note: suggested alternative: 'square'

    if ( queue.count() >= 1 ) // check for serial command

        ^~~~~
    
        square
    

    exit status 1

    'Queue' does not name a type

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

     
  • brownrb

    brownrb - 2021-07-25

    You are still getting errors on these files because Arduino is not configured properly.
    It is sill not correct
    You said
    C:\Users\Astra_1\Documents\Arduino\libraries
    but the screencap clearly shows it as
    F:\Data_disk\Arduino_Libraries\

    It looks like things got horibbly jumbled. My best advice is to delete it all and start over with a clean install of Arduino

    What I would recommend is
    1. Remove Arduino IDE completely
    2. Delete the F:\Data_disk\Arduino_Libraries folder (or copy it somewhere else for safe keeping)
    3. Delete the C:\Users\Astra_1\Documents\Arduino folder
    4. Go into C:\Program Files (x86)\Arduino and delete any files or folders in that folder
    5. Go into C:\Users\rob\AppData\Local\Arduino15 and delete all the folders and files there
    In your case it will probably be
    C:\Users\Astra_1\AppData\Local\Arduino15

    reboot

    1. Install Arduino IDE 1.6.13 (everything including drivers)
    2. Once the install is complete
    3. Start Aeduino IDE
    4. Open File-Preferences to find the sketchbook location
    5. write it down
    6. It should be something like C:\Users\Astra_1\Documents\Arduino
    7. Close Arduino IDE
    8. Delete any other firmware files you downloaded and folders for that
    9. Download this firmware zip file
    10. https://sourceforge.net/projects/arduinoascomfocuserpro2diy/files/ARDUINO%20FIRMWARE/myFP2-Firmware-312.zip/download
    11. unzip the file
    12. When unzipped, you see a number of folders. Go into the myFocuserPro2libraries folder
    13. Copy all the folders.
    14. Go to the path you found in 4 above
    15. Paste all the copied folders there
    16. Now navigate bask to where the firmware zip file was unzipped
    17. Go into the myFP2_ULN2003_312 folder
    18. Double click on myFP2_ULN2003_312.ino file
    19. This should start Arduino IDE
    20. When loaded, click the Menu item Sketch-Verify/Compile option
    21. If everything is Ok, you are good to go
    22. If not, do not change anything - let me know and I can gove further advice

    Cheers
    Robert

     
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-25

    Robert,
    Thanks.. Yeah.. I am afraid I will have to do just as you suggested.
    I will let you know how it went.
    However, it is interesting that I haven't had such troubles with Arduino before, and was compiling couple of projects before, including OnStep (MEGA, STM32...), some applications using LCD 1602 display and the same path library was used..
    Anyway, doesn't matter - I must have been doing something wrong because everybody else succeeded :-)
    Thanks again,
    Bojan

     
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-25

    Robert,
    I tried on laptop, the same...
    So now I am cleaning my deskto.
    You mentioned:
    1. Install Arduino IDE 1.6.13 (everything including drivers)
    2.
    Did you mean 1.6.13 or 1.8.13?

     
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-25

    I downloaded Arduino 1.8.15, installed it clean, followed the procedure to the letter and the result is the same:
    myFP2_ULN2003_312:47:10: fatal error: myQueue.h: No such file or directory

    include <myqueue.h> // By Steven de Salas
    ^~~~~~~~~~~
    compilation terminated.
    exit status 1
    myQueue.h: No such file or directory</myqueue.h>

     
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-25

    OK..
    I really feel stupid now.
    I placed content of myFocuserPro2libraries into F:\Data_disk\Arduino_libraries and it works.

    I am sure I did exactly that earlier, but without success.. so re-installation must have helped.
    Thank you!

     
  • Bojan Stajcar

    Bojan Stajcar - 2021-07-25

    Robert,
    Now I have a question:
    I can see from code that pushbuttons are implemented as analogue input.
    Is there a particular reason for this (apart from saving 1 pin)?

     
  • brownrb

    brownrb - 2021-07-25

    With a wide range of options, the Arduino Nano does not have unlimited pins to use for different things.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.