Navigation

    Robolink logo
    • Register
    • Login
    • Search
    • [[global:header.categories]]
    • [[global:header.recent]]
    • [[global:header.tags]]
    • [[global:header.popular]]
    • [[global:header.users]]
    • [[global:header.groups]]
    As of September 2021, we have moved technical support to Robolink Help

    Welcome to the Robolink Community forum!

    You can post here to interact with others in the Robolink community. We're checking it weekly, and we'll respond to some messages. If you're looking for technical support, head over to Robolink Help.

    Arduino coding

    CoDrone Troubleshooting
    arduino ask 4 help codrone
    2
    9
    4234
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tserluca last edited by tserluca

      I finished with my code of dc motors and now that I’m done an error popped up saying error TIMSK was not declared in the scope, can u help me out and tell what the problem is with my code? Also does motor 1 have to be the same as motor 3?

      Here’s my code
      https://create.arduino.cc/editor/tserluca/870a22d6-1b67-4afe-8852-928476292875/preview

      robolink_leila 1 Reply Last reply Reply Quote 0
      • robolink_leila
        robolink_leila @tserluca last edited by

        @tserluca Please check your email and be ready with your computer with a microphone. Thanks!

        1 Reply Last reply Reply Quote 0
        • T
          tserluca @robolink_leila last edited by

          @robolink_leila r you guys gonna call me or do we call you and if we do what’s the phone number?

          robolink_leila 1 Reply Last reply Reply Quote 0
          • T
            tserluca @robolink_leila last edited by tserluca

            @robolink_leila Ok I did the steps and I put my code in codebender and it said upload was successful,but the motors are not running why is that?The website told me that it will work on Chromebook. Also I’m trying it on a hp computer and it’s still saying TIMSK is not declared in the scope and it’s saying the board is incorrect even tho it’s the right board.

            1 Reply Last reply Reply Quote 0
            • robolink_leila
              robolink_leila @tserluca last edited by

              @tserluca Unfortunately, you cannot program RokitSmart with a Chromebook. You need to download the Arduino software. If you have another device, you can follow the instructions here. 🙂

              T 2 Replies Last reply Reply Quote 0
              • T
                tserluca @robolink_leila last edited by

                @robolink_leila this is my first code that I’ve done in my life, so I don’t have another code.So what do I do now?If there’s no error why is it saying I have an error?(Is it because I’m on a Chromebook?)

                robolink_leila 1 Reply Last reply Reply Quote 0
                • robolink_leila
                  robolink_leila @tserluca last edited by

                  @tserluca You can put another board with a third motor to control independently if you have one! As for the error, I haven't seen that error before. I compiled your code on my end and everything compiled correctly. Could you upload another code that has worked before and provide me with the OS and version that you are using?

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    tserluca @robolink_leila last edited by

                    @robolink_leila so i cant make M3 do something different than M1? Cause I have three motors and i want all them to do something different. Unless if i put motor 1 and 2 in one code sketch and upload it to a board and put motor 3 in another code sketch and download it to another board, can I do that?

                    Heres the error's
                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp: In member function 'void SmartInventorClass::TVRemoconClose()':

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:38:59: error: 'TIMSK' was not declared in this scope

                    if(dcUse == 0 || remoconUseTV == 0 || remoconUseRF == 0) TIMSK |= (0<<TOIE2);

                    ^~~~~

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:38:59: note: suggested alternative: 'TIMSK0'

                    if(dcUse == 0 || remoconUseTV == 0 || remoconUseRF == 0) TIMSK |= (0<<TOIE2);

                    ^~~~~

                    TIMSK0

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp: In member function 'void SmartInventorClass::DCMotorClose()':

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:561:59: error: 'TIMSK' was not declared in this scope

                    if(dcUse == 0 || remoconUseTV == 0 || remoconUseRF == 0) TIMSK |= (0<<TOIE2);

                    ^~~~~

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:561:59: note: suggested alternative: 'TIMSK0'

                    if(dcUse == 0 || remoconUseTV == 0 || remoconUseRF == 0) TIMSK |= (0<<TOIE2);

                    ^~~~~

                    TIMSK0

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp: In member function 'void SmartInventorClass::RFRemoconClose()':

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:770:59: error: 'TIMSK' was not declared in this scope

                    if(dcUse == 0 || remoconUseTV == 0 || remoconUseRF == 0) TIMSK |= (0<<TOIE2);

                    ^~~~~

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:770:59: note: suggested alternative: 'TIMSK0'

                    if(dcUse == 0 || remoconUseTV == 0 || remoconUseRF == 0) TIMSK |= (0<<TOIE2);

                    ^~~~~

                    TIMSK0

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp: In member function 'void SmartInventorClass::Timer2Set()':

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:836:2: error: 'TIMSK' was not declared in this scope

                    TIMSK &= ~(1<<TOIE2);

                    ^~~~~

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:836:2: note: suggested alternative: 'TIMSK0'

                    TIMSK &= ~(1<<TOIE2);

                    ^~~~~

                    TIMSK0

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:837:2: error: 'TCCR2' was not declared in this scope

                    TCCR2 &= ~((1<<WGM21) | (1<<WGM20));

                    ^~~~~

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:837:2: note: suggested alternative: 'TCCR2A'

                    TCCR2 &= ~((1<<WGM21) | (1<<WGM20));

                    ^~~~~

                    TCCR2A

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:839:16: error: 'OCIE2' was not declared in this scope

                    TIMSK &= ~(1<<OCIE2);

                    ^~~~~

                    /home/builder/opt/libraries/latest/rokitsmart_1_0_9/SmartInventor.cpp:839:16: note: suggested alternative: 'OCIE2B'

                    TIMSK &= ~(1<<OCIE2);

                    ^~~~~

                    OCIE2B

                    exit status 1

                    robolink_leila 1 Reply Last reply Reply Quote 0
                    • robolink_leila
                      robolink_leila @tserluca last edited by

                      @tserluca Sorry this got lost! This is actually a RokitSmart question 🙂 Motor 1 and Motor 3 are paired so they cannot be coded independently. A screenshot of the error would be really helpful 🙂

                      T 1 Reply Last reply Reply Quote 0
                      • First post
                        Last post