Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Trouble compiling arduino sketch using arbotix commander to control robot

  1. #1
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,717
    Images
    456
    Rep Power
    92

    Trouble compiling arduino sketch using arbotix commander to control robot

    What I have done:

    I created a series of poses and sequences using pypose and exported them as a .h file.

    I then drug up some old arbotix code that is supposed to respond to the commander.

    Code:
    /* ========================================================================== */
    /*                          HikariKey/ServoControl
    /*  This code is a good starting place for using the 
    /*  keyboard of a computer to control servos using the arbotix.
    /*  Send data in the form of p (servo ID 2 digets) , (goal position 4 digets) CR
    /*  You can also send it letters from the keyboard and have it play                                                                          */
    /*  sequences based on which letters you send it.                                                             */
    /*  If you use this you want to change the "iPoses01.h to whatever 
    /*  your poses are called.  You also want to change the if thens to 
    /*  things that make sense to you.
    /*  
    /*  This code was written by Darkback2 with more help than not by
    /*  Chris Novak
    /*  lnxfergy (Michael Ferguson, inventor of the arbotix)
    /*  Upgrayd
    /*  and the rest of the Trossen Robotics Forum.
    /* ========================================================================== */
    
    
    #include <ax12.h>
    #include <BioloidController.h>
    #include <Commander.h>
    #include "XPoses.h"  // exported from PyPose
    
    
    BioloidController bioloid = BioloidController(1000000);
    Commander command = Commander();
    
    
    void setup()
    {
         pinMode(0, OUTPUT);  // bah, need to see the LED.
    
    
        // setup serial
        Serial.begin(38400);
       
        // stand  up slowly
        
        // recommended pause
        delay(100);
        
        bioloid.loadPose(XStanding);
        bioloid.readPose();
        bioloid.interpolateSetup(5000);
        
        while(bioloid.interpolating > 0)
        {
            bioloid.interpolateStep();
            delay(3);
        }
    }
    
    
    void loop()
    {
        // check for new messages
        if(command.ReadMsgs() > 0)
        {   
            // toggle LED so we know johnny5 is alive
            digitalWrite(0,HIGH-digitalRead(0));
        
            // only process if we aren't currently doing a sequence
            if(bioloid.playing == 0)
            {               
                if(command.walkV > 50)
                {
                    bioloid.playSeq(XFWalkSeq01);
                }
                else if(command.walkV < -50)
                {
                    bioloid.playSeq(XBWalkSeq01);
                }
                else if(command.walkH > 50)
                {
                    bioloid.playSeq(XLTurnSeq01);    
                }
                else if(command.walkH < -50)
                {
                    bioloid.playSeq(XRTurnSeq01);
                }
                else if(command.lookH > 50)
                {
                    bioloid.playSeq(XLCrab01);
                }
                else if(command.lookH > -50)
                {
                    bioloid.playSeq(XRCrab01);
                }
                if(command.buttons&BUT_R1)
                {
                    bioloid.playSeq(4LegStanding01); 
                }
          
                if(command.buttons&BUT_R2)
                {
                    bioloid.playSeq(4LegsUp01);
                }
          
                if(command.buttons&BUT_R3)
                {
                    bioloid.playSeq(PoseDeveloper);
                }
            }
        }  // moved this one up from below, so that the "play" happens all the time, even if the commander isn't sending at 30hz.
      
        if(bioloid.playing > 0)
        {
            // continue sequence
            bioloid.play();  
        }
    }
    xPoses.h
    Code:
    #ifndef EXAIME3_POSES
    #define EXAIME3_POSES
    
    
    #include <avr/pgmspace.h>
    
    
    PROGMEM prog_uint16_t XStandStep02[] = {24, 2296, 2398, 2058, 1242, 2314, 1645, 1823, 2393, 2042, 1250, 1732, 1642, 2535, 1558, 2391, 2048, 2049, 1616, 1651, 1537, 1728, 2048, 2050, 1540};
    PROGMEM prog_uint16_t XFWalk01[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM prog_uint16_t XFWalk03[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2389, 2048, 1877, 2048, 2218};
    PROGMEM prog_uint16_t XFWalk02[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    PROGMEM prog_uint16_t XFWalk05[] = {24, 2562, 2389, 2050, 1877, 2046, 2218, 2050, 2218, 2050, 1877, 2049, 2048, 2046, 2389, 2046, 1877, 2050, 2218, 1536, 2218, 2046, 1877, 2048, 2048};
    PROGMEM prog_uint16_t XFWalk04[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048};
    PROGMEM prog_uint16_t XStandStep04[] = {24, 1515, 2393, 2079, 1242, 2048, 1652, 2529, 2391, 2031, 1246, 2048, 1641, 2547, 1559, 3030, 2048, 2045, 1616, 1586, 1541, 1018, 2039, 2053, 1544};
    PROGMEM prog_uint16_t XFWalk06[] = {24, 2048, 2352, 2048, 1857, 2048, 2216, 1563, 2177, 2048, 1859, 2048, 2049, 2560, 2347, 2048, 1853, 2048, 2215, 2048, 2190, 2048, 1862, 2048, 2046};
    PROGMEM prog_uint16_t XRTurn04[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218};
    PROGMEM prog_uint16_t XLegsUp[] = {24, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048};
    PROGMEM prog_uint16_t xStandStep03[] = {24, 2305, 2401, 2068, 1241, 2321, 1652, 1819, 2389, 2039, 1250, 1725, 1646, 2530, 1562, 2414, 2050, 2051, 1614, 1641, 1533, 1562, 2043, 2051, 1542};
    PROGMEM prog_uint16_t XRTurn06[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM prog_uint16_t XRTurn05[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    PROGMEM prog_uint16_t XStandingLegsCompressed[] = {24, 2048, 2330, 2048, 1241, 2048, 1437, 2048, 2324, 2048, 1264, 2048, 1640, 2048, 2208, 2048, 1262, 2048, 1445, 2048, 2267, 2048, 1250, 2048, 1439};
    PROGMEM prog_uint16_t XRTurn03[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048};
    PROGMEM prog_uint16_t XRTurn02[] = {24, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048};
    PROGMEM prog_uint16_t XRTurn01[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM prog_uint16_t XStanding[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM prog_uint16_t XRWalk05[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048};
    PROGMEM prog_uint16_t XRWalk04[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048};
    PROGMEM prog_uint16_t HStanding01[] = {24, 1517, 2048, 2078, 2048, 2048, 2048, 2525, 2048, 2035, 2048, 2046, 2048, 2549, 1550, 3019, 2045, 2050, 1618, 1585, 1534, 1029, 2040, 2049, 1545};
    PROGMEM prog_uint16_t XRWalk06[] = {24, 1536, 2360, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM prog_uint16_t XRWalk01[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM prog_uint16_t XRWalk03[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218};
    PROGMEM prog_uint16_t XRWalk02[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    PROGMEM prog_uint16_t XDownLegsCompressed01[] = {24, 2043, 2500, 2042, 1875, 2041, 2457, 2118, 2500, 1961, 1875, 2000, 2457, 2064, 2500, 2151, 1875, 2029, 2457, 2035, 2500, 1978, 1875, 2041, 2457};
    PROGMEM prog_uint16_t XReadTest[] = {24, 2184, 1550, 1191, 1866, 2046, 2051, 2046, 1544, 2039, 1857, 2050, 2220, 2046, 2199, 2046, 1865, 2048, 2051, 1567, 1548, 2047, 1866, 2045, 1765};
    PROGMEM prog_uint16_t XStandstep01[] = {24, 2048, 2400, 2048, 1255, 2320, 1633, 2048, 2400, 2048, 1255, 1728, 1633, 2533, 1562, 2048, 1870, 2048, 1610, 1657, 1539, 2048, 1870, 2048, 1539};
    PROGMEM prog_uint16_t XRelax02[] = {24, 2056, 1621, 2043, 2905, 2052, 1521, 2049, 1584, 2042, 2966, 2049, 1528, 2054, 1505, 2046, 3106, 2050, 1615, 2053, 1566, 2041, 3040, 2046, 1578};
    PROGMEM prog_uint16_t XRelax01[] = {24, 2047, 2147, 2047, 1997, 2047, 1443, 2050, 2150, 2048, 1982, 2046, 1448, 2046, 2132, 2048, 2008, 2046, 1460, 2049, 2149, 2043, 2033, 2045, 1492};
    
    
    PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    PROGMEM transition_t 4LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };
    PROGMEM transition_t PoseDeveloper[] = {{0,6} ,{XStanding,2000} ,{XStandstep01,2000} ,{XStandStep02,2000} ,{xStandStep03,2000} ,{XStandStep04,2000} ,{HStanding01,5000} };
    PROGMEM transition_t XLCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk06,500} ,{XRWalk05,500} ,{XRWalk04,500} ,{XRWalk03,500} ,{XRWalk02,500} ,{XRWalk01,500} };
    PROGMEM transition_t XRCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk02,500} ,{XRWalk03,500} ,{XRWalk04,500} ,{XRWalk05,500} ,{XRWalk06,500} ,{XRWalk01,500} };
    PROGMEM transition_t XFWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk02,500} ,{XFWalk03,500} ,{XFWalk04,500} ,{XFWalk05,500} ,{XFWalk06,500} ,{XFWalk01,500} };
    PROGMEM transition_t XRTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn01,500} ,{XRTurn02,500} ,{XRTurn03,500} ,{XRTurn04,500} ,{XRTurn05,500} ,{XRTurn06,500} };
    PROGMEM transition_t XLTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn05,500} ,{XRTurn04,500} ,{XRTurn03,500} ,{XRTurn02,500} ,{XRTurn01,500} ,{XStanding,500} };
    PROGMEM transition_t 4LegsUp01[] = {{0,2} ,{XStanding,2000} ,{XLegsUp,2000} };
    PROGMEM transition_t XRelaxSeq[] = {{0,3} ,{XLegsUp,2000} ,{XRelax01,2000} ,{XRelax02,2000} };
    PROGMEM transition_t 4LegStanding01[] = {{0,2} ,{XLegsUp,2000} ,{XStanding,2000} };
    
    
    #endif
    The problem is, it won't compile, and it claims it won't because of problems with the poses.h file.

    Here are the errors...

    I have no idea what to do here. I'm starting to think it has something to do with the "#include <avr/pgmspace.h>", but I don't know how to fix that.

    Code:
    Arduino: 1.6.13 (Windows 10), Board: "Arbotix-M"
    
    
    In file included from C:\Users\Che Edoga\Documents\Arduino\XPoseBased02\XPoseBased02.ino:22:0:
    
    
    XPoses.h:6: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XStandStep02[] = {24, 2296, 2398, 2058, 1242, 2314, 1645, 1823, 2393, 2042, 1250, 1732, 1642, 2535, 1558, 2391, 2048, 2049, 1616, 1651, 1537, 1728, 2048, 2050, 1540};
    
    
             ^
    
    
    In file included from C:\Users\Che Edoga\Documents\Arduino\XPoseBased02\XPoseBased02.ino:22:0:
    
    
    XPoses.h:7: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XFWalk01[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:8: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XFWalk03[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2389, 2048, 1877, 2048, 2218};
    
    
             ^
    
    
    XPoses.h:9: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XFWalk02[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    
    
             ^
    
    
    XPoses.h:10: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XFWalk05[] = {24, 2562, 2389, 2050, 1877, 2046, 2218, 2050, 2218, 2050, 1877, 2049, 2048, 2046, 2389, 2046, 1877, 2050, 2218, 1536, 2218, 2046, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:11: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XFWalk04[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:12: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XStandStep04[] = {24, 1515, 2393, 2079, 1242, 2048, 1652, 2529, 2391, 2031, 1246, 2048, 1641, 2547, 1559, 3030, 2048, 2045, 1616, 1586, 1541, 1018, 2039, 2053, 1544};
    
    
             ^
    
    
    XPoses.h:13: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XFWalk06[] = {24, 2048, 2352, 2048, 1857, 2048, 2216, 1563, 2177, 2048, 1859, 2048, 2049, 2560, 2347, 2048, 1853, 2048, 2215, 2048, 2190, 2048, 1862, 2048, 2046};
    
    
             ^
    
    
    XPoses.h:14: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRTurn04[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218};
    
    
             ^
    
    
    XPoses.h:15: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XLegsUp[] = {24, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:16: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t xStandStep03[] = {24, 2305, 2401, 2068, 1241, 2321, 1652, 1819, 2389, 2039, 1250, 1725, 1646, 2530, 1562, 2414, 2050, 2051, 1614, 1641, 1533, 1562, 2043, 2051, 1542};
    
    
             ^
    
    
    XPoses.h:17: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRTurn06[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:18: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRTurn05[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    
    
             ^
    
    
    XPoses.h:19: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XStandingLegsCompressed[] = {24, 2048, 2330, 2048, 1241, 2048, 1437, 2048, 2324, 2048, 1264, 2048, 1640, 2048, 2208, 2048, 1262, 2048, 1445, 2048, 2267, 2048, 1250, 2048, 1439};
    
    
             ^
    
    
    XPoses.h:20: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRTurn03[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:21: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRTurn02[] = {24, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:22: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRTurn01[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:23: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XStanding[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:24: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRWalk05[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:25: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRWalk04[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:26: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t HStanding01[] = {24, 1517, 2048, 2078, 2048, 2048, 2048, 2525, 2048, 2035, 2048, 2046, 2048, 2549, 1550, 3019, 2045, 2050, 1618, 1585, 1534, 1029, 2040, 2049, 1545};
    
    
             ^
    
    
    XPoses.h:27: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRWalk06[] = {24, 1536, 2360, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:28: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRWalk01[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
             ^
    
    
    XPoses.h:29: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRWalk03[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218};
    
    
             ^
    
    
    XPoses.h:30: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRWalk02[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    
    
             ^
    
    
    XPoses.h:31: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XDownLegsCompressed01[] = {24, 2043, 2500, 2042, 1875, 2041, 2457, 2118, 2500, 1961, 1875, 2000, 2457, 2064, 2500, 2151, 1875, 2029, 2457, 2035, 2500, 1978, 1875, 2041, 2457};
    
    
             ^
    
    
    XPoses.h:32: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XReadTest[] = {24, 2184, 1550, 1191, 1866, 2046, 2051, 2046, 1544, 2039, 1857, 2050, 2220, 2046, 2199, 2046, 1865, 2048, 2051, 1567, 1548, 2047, 1866, 2045, 1765};
    
    
             ^
    
    
    XPoses.h:33: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XStandstep01[] = {24, 2048, 2400, 2048, 1255, 2320, 1633, 2048, 2400, 2048, 1255, 1728, 1633, 2533, 1562, 2048, 1870, 2048, 1610, 1657, 1539, 2048, 1870, 2048, 1539};
    
    
             ^
    
    
    XPoses.h:34: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRelax02[] = {24, 2056, 1621, 2043, 2905, 2052, 1521, 2049, 1584, 2042, 2966, 2049, 1528, 2054, 1505, 2046, 3106, 2050, 1615, 2053, 1566, 2041, 3040, 2046, 1578};
    
    
             ^
    
    
    XPoses.h:35: error: 'prog_uint16_t' does not name a type
    
    
     PROGMEM prog_uint16_t XRelax01[] = {24, 2047, 2147, 2047, 1997, 2047, 1443, 2050, 2150, 2048, 1982, 2046, 1448, 2046, 2132, 2048, 2008, 2046, 1460, 2049, 2149, 2043, 2033, 2045, 1492};
    
    
             ^
    
    
    XPoses.h:37: error: variable 'XBWalkSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    
    
                                      ^
    
    
    XPoses.h:37: error: 'XFWalk01' was not declared in this scope
    
    
     PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    
    
                                                   ^
    
    
    XPoses.h:37: error: 'XFWalk06' was not declared in this scope
    
    
     PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    
    
                                                                   ^
    
    
    XPoses.h:37: error: 'XFWalk05' was not declared in this scope
    
    
     PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    
    
                                                                                   ^
    
    
    XPoses.h:37: error: 'XFWalk04' was not declared in this scope
    
    
     PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    
    
                                                                                                   ^
    
    
    XPoses.h:37: error: 'XFWalk03' was not declared in this scope
    
    
     PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    
    
                                                                                                                   ^
    
    
    XPoses.h:37: error: 'XFWalk02' was not declared in this scope
    
    
     PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    
    
                                                                                                                                   ^
    
    
    XPoses.h:37: error: 'XFWalk01' was not declared in this scope
    
    
     PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    
    
                                                                                                                                                   ^
    
    
    XPoses.h:38: error: expected unqualified-id before numeric constant
    
    
     PROGMEM transition_t 4LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };
    
    
                          ^
    
    
    Multiple libraries were found for "ax12.h"
     Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Bioloid
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
    Multiple libraries were found for "Commander.h"
     Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Commander
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\Commander
    exit status 1
    'prog_uint16_t' does not name a type
    
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    Any help would be greatly appreciated.

    DB

  2. #2
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,238
    Images
    27
    Rep Power
    270

    Re: Trouble compiling arduino sketch using arbotix commander to control robot

    Pretty sure it is just old AVR specific names having been replaced in newer versions. Remove the "prog_" from "prog_uint16_t" and it will probably start working again.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  3. #3
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,717
    Images
    456
    Rep Power
    92

    Re: Trouble compiling arduino sketch using arbotix commander to control robot

    Thanks Tician,

    Here is what I changed in the xposes.h file:

    Code:
    #ifndef EXAIME3_POSES
    #define EXAIME3_POSES
    
    
    #include <avr/pgmspace.h>
    
    
    PROGMEM uint16_t XStandStep02[] = {24, 2296, 2398, 2058, 1242, 2314, 1645, 1823, 2393, 2042, 1250, 1732, 1642, 2535, 1558, 2391, 2048, 2049, 1616, 1651, 1537, 1728, 2048, 2050, 1540};
    PROGMEM uint16_t XFWalk01[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM uint16_t XFWalk03[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2389, 2048, 1877, 2048, 2218};
    PROGMEM uint16_t XFWalk02[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    PROGMEM uint16_t XFWalk05[] = {24, 2562, 2389, 2050, 1877, 2046, 2218, 2050, 2218, 2050, 1877, 2049, 2048, 2046, 2389, 2046, 1877, 2050, 2218, 1536, 2218, 2046, 1877, 2048, 2048};
    PROGMEM uint16_t XFWalk04[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048};
    PROGMEM uint16_t XStandStep04[] = {24, 1515, 2393, 2079, 1242, 2048, 1652, 2529, 2391, 2031, 1246, 2048, 1641, 2547, 1559, 3030, 2048, 2045, 1616, 1586, 1541, 1018, 2039, 2053, 1544};
    PROGMEM uint16_t XFWalk06[] = {24, 2048, 2352, 2048, 1857, 2048, 2216, 1563, 2177, 2048, 1859, 2048, 2049, 2560, 2347, 2048, 1853, 2048, 2215, 2048, 2190, 2048, 1862, 2048, 2046};
    PROGMEM uint16_t XRTurn04[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218};
    PROGMEM uint16_t XLegsUp[] = {24, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048};
    PROGMEM uint16_t xStandStep03[] = {24, 2305, 2401, 2068, 1241, 2321, 1652, 1819, 2389, 2039, 1250, 1725, 1646, 2530, 1562, 2414, 2050, 2051, 1614, 1641, 1533, 1562, 2043, 2051, 1542};
    PROGMEM uint16_t XRTurn06[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM uint16_t XRTurn05[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    PROGMEM uint16_t XStandingLegsCompressed[] = {24, 2048, 2330, 2048, 1241, 2048, 1437, 2048, 2324, 2048, 1264, 2048, 1640, 2048, 2208, 2048, 1262, 2048, 1445, 2048, 2267, 2048, 1250, 2048, 1439};
    PROGMEM uint16_t XRTurn03[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048};
    PROGMEM uint16_t XRTurn02[] = {24, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048};
    PROGMEM uint16_t XRTurn01[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM uint16_t XStanding[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM uint16_t XRWalk05[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048};
    PROGMEM uint16_t XRWalk04[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048};
    PROGMEM uint16_t HStanding01[] = {24, 1517, 2048, 2078, 2048, 2048, 2048, 2525, 2048, 2035, 2048, 2046, 2048, 2549, 1550, 3019, 2045, 2050, 1618, 1585, 1534, 1029, 2040, 2049, 1545};
    PROGMEM uint16_t XRWalk06[] = {24, 1536, 2360, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM uint16_t XRWalk01[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    PROGMEM uint16_t XRWalk03[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218};
    PROGMEM uint16_t XRWalk02[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    PROGMEM uint16_t XDownLegsCompressed01[] = {24, 2043, 2500, 2042, 1875, 2041, 2457, 2118, 2500, 1961, 1875, 2000, 2457, 2064, 2500, 2151, 1875, 2029, 2457, 2035, 2500, 1978, 1875, 2041, 2457};
    PROGMEM uint16_t XReadTest[] = {24, 2184, 1550, 1191, 1866, 2046, 2051, 2046, 1544, 2039, 1857, 2050, 2220, 2046, 2199, 2046, 1865, 2048, 2051, 1567, 1548, 2047, 1866, 2045, 1765};
    PROGMEM uint16_t XStandstep01[] = {24, 2048, 2400, 2048, 1255, 2320, 1633, 2048, 2400, 2048, 1255, 1728, 1633, 2533, 1562, 2048, 1870, 2048, 1610, 1657, 1539, 2048, 1870, 2048, 1539};
    PROGMEM uint16_t XRelax02[] = {24, 2056, 1621, 2043, 2905, 2052, 1521, 2049, 1584, 2042, 2966, 2049, 1528, 2054, 1505, 2046, 3106, 2050, 1615, 2053, 1566, 2041, 3040, 2046, 1578};
    PROGMEM uint16_t XRelax01[] = {24, 2047, 2147, 2047, 1997, 2047, 1443, 2050, 2150, 2048, 1982, 2046, 1448, 2046, 2132, 2048, 2008, 2046, 1460, 2049, 2149, 2043, 2033, 2045, 1492};
    
    
    PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    PROGMEM transition_t 4LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };
    PROGMEM transition_t PoseDeveloper[] = {{0,6} ,{XStanding,2000} ,{XStandstep01,2000} ,{XStandStep02,2000} ,{xStandStep03,2000} ,{XStandStep04,2000} ,{HStanding01,5000} };
    PROGMEM transition_t XLCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk06,500} ,{XRWalk05,500} ,{XRWalk04,500} ,{XRWalk03,500} ,{XRWalk02,500} ,{XRWalk01,500} };
    PROGMEM transition_t XRCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk02,500} ,{XRWalk03,500} ,{XRWalk04,500} ,{XRWalk05,500} ,{XRWalk06,500} ,{XRWalk01,500} };
    PROGMEM transition_t XFWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk02,500} ,{XFWalk03,500} ,{XFWalk04,500} ,{XFWalk05,500} ,{XFWalk06,500} ,{XFWalk01,500} };
    PROGMEM transition_t XRTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn01,500} ,{XRTurn02,500} ,{XRTurn03,500} ,{XRTurn04,500} ,{XRTurn05,500} ,{XRTurn06,500} };
    PROGMEM transition_t XLTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn05,500} ,{XRTurn04,500} ,{XRTurn03,500} ,{XRTurn02,500} ,{XRTurn01,500} ,{XStanding,500} };
    PROGMEM transition_t 4LegsUp01[] = {{0,2} ,{XStanding,2000} ,{XLegsUp,2000} };
    PROGMEM transition_t XRelaxSeq[] = {{0,3} ,{XLegsUp,2000} ,{XRelax01,2000} ,{XRelax02,2000} };
    PROGMEM transition_t 4LegStanding01[] = {{0,2} ,{XLegsUp,2000} ,{XStanding,2000} };
    
    
    #endif


    Now I am getting the following error:

    Code:
    Arduino: 1.6.13 (Windows 10), Board: "Arbotix-M"
    
    
    In file included from C:\Users\Che Edoga\Documents\Exaime3\XCommander01\XCommander01.ino:22:0:
    
    
    XPoses.h:6: error: variable 'XStandStep02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XStandStep02[] = {24, 2296, 2398, 2058, 1242, 2314, 1645, 1823, 2393, 2042, 1250, 1732, 1642, 2535, 1558, 2391, 2048, 2049, 1616, 1651, 1537, 1728, 2048, 2050, 1540};
    
    
                                   ^
    
    
    In file included from C:\Users\Che Edoga\Documents\Exaime3\XCommander01\XCommander01.ino:22:0:
    
    
    XPoses.h:7: error: variable 'XFWalk01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XFWalk01[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
                               ^
    
    
    XPoses.h:8: error: variable 'XFWalk03' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XFWalk03[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2389, 2048, 1877, 2048, 2218};
    
    
                               ^
    
    
    XPoses.h:9: error: variable 'XFWalk02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XFWalk02[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    
    
                               ^
    
    
    XPoses.h:10: error: variable 'XFWalk05' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XFWalk05[] = {24, 2562, 2389, 2050, 1877, 2046, 2218, 2050, 2218, 2050, 1877, 2049, 2048, 2046, 2389, 2046, 1877, 2050, 2218, 1536, 2218, 2046, 1877, 2048, 2048};
    
    
                               ^
    
    
    XPoses.h:11: error: variable 'XFWalk04' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XFWalk04[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048};
    
    
                               ^
    
    
    XPoses.h:12: error: variable 'XStandStep04' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XStandStep04[] = {24, 1515, 2393, 2079, 1242, 2048, 1652, 2529, 2391, 2031, 1246, 2048, 1641, 2547, 1559, 3030, 2048, 2045, 1616, 1586, 1541, 1018, 2039, 2053, 1544};
    
    
                                   ^
    
    
    XPoses.h:13: error: variable 'XFWalk06' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XFWalk06[] = {24, 2048, 2352, 2048, 1857, 2048, 2216, 1563, 2177, 2048, 1859, 2048, 2049, 2560, 2347, 2048, 1853, 2048, 2215, 2048, 2190, 2048, 1862, 2048, 2046};
    
    
                               ^
    
    
    XPoses.h:14: error: variable 'XRTurn04' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRTurn04[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218};
    
    
                               ^
    
    
    XPoses.h:15: error: variable 'XLegsUp' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XLegsUp[] = {24, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048};
    
    
                              ^
    
    
    XPoses.h:16: error: variable 'xStandStep03' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t xStandStep03[] = {24, 2305, 2401, 2068, 1241, 2321, 1652, 1819, 2389, 2039, 1250, 1725, 1646, 2530, 1562, 2414, 2050, 2051, 1614, 1641, 1533, 1562, 2043, 2051, 1542};
    
    
                                   ^
    
    
    XPoses.h:17: error: variable 'XRTurn06' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRTurn06[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
                               ^
    
    
    XPoses.h:18: error: variable 'XRTurn05' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRTurn05[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    
    
                               ^
    
    
    XPoses.h:19: error: variable 'XStandingLegsCompressed' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XStandingLegsCompressed[] = {24, 2048, 2330, 2048, 1241, 2048, 1437, 2048, 2324, 2048, 1264, 2048, 1640, 2048, 2208, 2048, 1262, 2048, 1445, 2048, 2267, 2048, 1250, 2048, 1439};
    
    
                                              ^
    
    
    XPoses.h:20: error: variable 'XRTurn03' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRTurn03[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048};
    
    
                               ^
    
    
    XPoses.h:21: error: variable 'XRTurn02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRTurn02[] = {24, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048};
    
    
                               ^
    
    
    XPoses.h:22: error: variable 'XRTurn01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRTurn01[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
                               ^
    
    
    XPoses.h:23: error: variable 'XStanding' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XStanding[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
                                ^
    
    
    XPoses.h:24: error: variable 'XRWalk05' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRWalk05[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048};
    
    
                               ^
    
    
    XPoses.h:25: error: variable 'XRWalk04' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRWalk04[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048};
    
    
                               ^
    
    
    XPoses.h:26: error: variable 'HStanding01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t HStanding01[] = {24, 1517, 2048, 2078, 2048, 2048, 2048, 2525, 2048, 2035, 2048, 2046, 2048, 2549, 1550, 3019, 2045, 2050, 1618, 1585, 1534, 1029, 2040, 2049, 1545};
    
    
                                  ^
    
    
    XPoses.h:27: error: variable 'XRWalk06' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRWalk06[] = {24, 1536, 2360, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
                               ^
    
    
    XPoses.h:28: error: variable 'XRWalk01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRWalk01[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    
    
                               ^
    
    
    XPoses.h:29: error: variable 'XRWalk03' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRWalk03[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218};
    
    
                               ^
    
    
    XPoses.h:30: error: variable 'XRWalk02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRWalk02[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    
    
                               ^
    
    
    XPoses.h:31: error: variable 'XDownLegsCompressed01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XDownLegsCompressed01[] = {24, 2043, 2500, 2042, 1875, 2041, 2457, 2118, 2500, 1961, 1875, 2000, 2457, 2064, 2500, 2151, 1875, 2029, 2457, 2035, 2500, 1978, 1875, 2041, 2457};
    
    
                                            ^
    
    
    XPoses.h:32: error: variable 'XReadTest' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XReadTest[] = {24, 2184, 1550, 1191, 1866, 2046, 2051, 2046, 1544, 2039, 1857, 2050, 2220, 2046, 2199, 2046, 1865, 2048, 2051, 1567, 1548, 2047, 1866, 2045, 1765};
    
    
                                ^
    
    
    XPoses.h:33: error: variable 'XStandstep01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XStandstep01[] = {24, 2048, 2400, 2048, 1255, 2320, 1633, 2048, 2400, 2048, 1255, 1728, 1633, 2533, 1562, 2048, 1870, 2048, 1610, 1657, 1539, 2048, 1870, 2048, 1539};
    
    
                                   ^
    
    
    XPoses.h:34: error: variable 'XRelax02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRelax02[] = {24, 2056, 1621, 2043, 2905, 2052, 1521, 2049, 1584, 2042, 2966, 2049, 1528, 2054, 1505, 2046, 3106, 2050, 1615, 2053, 1566, 2041, 3040, 2046, 1578};
    
    
                               ^
    
    
    XPoses.h:35: error: variable 'XRelax01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM uint16_t XRelax01[] = {24, 2047, 2147, 2047, 1997, 2047, 1443, 2050, 2150, 2048, 1982, 2046, 1448, 2046, 2132, 2048, 2008, 2046, 1460, 2049, 2149, 2043, 2033, 2045, 1492};
    
    
                               ^
    
    
    XPoses.h:37: error: variable 'XBWalkSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    
    
                                      ^
    
    
    XPoses.h:38: error: expected unqualified-id before numeric constant
    
    
     PROGMEM transition_t 4LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };
    
    
                          ^
    
    
    Multiple libraries were found for "ax12.h"
     Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Bioloid
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
    Multiple libraries were found for "Commander.h"
     Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Commander
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\Commander
    exit status 1
    variable 'XStandStep02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    Not sure I edited things right...

    Any advice?

    DB

  4. #4
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,238
    Images
    27
    Rep Power
    270

    Re: Trouble compiling arduino sketch using arbotix commander to control robot

    arggh. A pox on old decrepit code and ever changing system standards. Basically, the required magic words for ensuring the compiler sticks these arrays into FLASH instead of RAM seem to keep changing.

    Might be
    Code:
    PROGMEM const uint16_t foo[] = ...
    or
    Code:
    const uint16_t foo[] __FLASH__ = ...
    or possibly
    Code:
    uint16_t foo[] __FLASH__ = ...
    edit:
    also, the compiler does not like variable names starting with numerals.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  5. #5

    Re: Trouble compiling arduino sketch using arbotix commander to control robot

    What I have in some of my code looks like:
    Code:
    const uint16_t cCoxaMin1[] PROGMEM = {
      cRRCoxaMin1,  cRMCoxaMin1,  cRFCoxaMin1,  cLRCoxaMin1,  cLMCoxaMin1,  cLFCoxaMin1};
    Note the cRR...CRM... Are #defines specific for the different robots...

    Other solution Go to a processor which does not have the different memory spaces like an ARM board :lol:

  6. #6
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,717
    Images
    456
    Rep Power
    92

    Re: Trouble compiling arduino sketch using arbotix commander to control robot

    Progress! I think...

    Here is what I edited so far, and here is the error I got.

    Code:
    #ifndef EXAIME3_POSES
    #define EXAIME3_POSES
    
    
    #include <avr/pgmspace.h>
    
    
    const uint16_t XStandStep02[] = {24, 2296, 2398, 2058, 1242, 2314, 1645, 1823, 2393, 2042, 1250, 1732, 1642, 2535, 1558, 2391, 2048, 2049, 1616, 1651, 1537, 1728, 2048, 2050, 1540};
    const uint16_t XFWalk01[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    const uint16_t XFWalk03[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2389, 2048, 1877, 2048, 2218};
    const uint16_t XFWalk02[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    const uint16_t XFWalk05[] = {24, 2562, 2389, 2050, 1877, 2046, 2218, 2050, 2218, 2050, 1877, 2049, 2048, 2046, 2389, 2046, 1877, 2050, 2218, 1536, 2218, 2046, 1877, 2048, 2048};
    const uint16_t XFWalk04[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048};
    const uint16_t XStandStep04[] = {24, 1515, 2393, 2079, 1242, 2048, 1652, 2529, 2391, 2031, 1246, 2048, 1641, 2547, 1559, 3030, 2048, 2045, 1616, 1586, 1541, 1018, 2039, 2053, 1544};
    const uint16_t XFWalk06[] = {24, 2048, 2352, 2048, 1857, 2048, 2216, 1563, 2177, 2048, 1859, 2048, 2049, 2560, 2347, 2048, 1853, 2048, 2215, 2048, 2190, 2048, 1862, 2048, 2046};
    const uint16_t XRTurn04[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218};
    const uint16_t XLegsUp[] = {24, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048};
    const uint16_t xStandStep03[] = {24, 2305, 2401, 2068, 1241, 2321, 1652, 1819, 2389, 2039, 1250, 1725, 1646, 2530, 1562, 2414, 2050, 2051, 1614, 1641, 1533, 1562, 2043, 2051, 1542};
    const uint16_t XRTurn06[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    const uint16_t XRTurn05[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    const uint16_t XStandingLegsCompressed[] = {24, 2048, 2330, 2048, 1241, 2048, 1437, 2048, 2324, 2048, 1264, 2048, 1640, 2048, 2208, 2048, 1262, 2048, 1445, 2048, 2267, 2048, 1250, 2048, 1439};
    const uint16_t XRTurn03[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048};
    const uint16_t XRTurn02[] = {24, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048};
    const uint16_t XRTurn01[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
    const uint16_t XStanding[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    const uint16_t XRWalk05[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048};
    const uint16_t XRWalk04[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048};
    const uint16_t HStanding01[] = {24, 1517, 2048, 2078, 2048, 2048, 2048, 2525, 2048, 2035, 2048, 2046, 2048, 2549, 1550, 3019, 2045, 2050, 1618, 1585, 1534, 1029, 2040, 2049, 1545};
    const uint16_t XRWalk06[] = {24, 1536, 2360, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
    const uint16_t XRWalk01[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
    const uint16_t XRWalk03[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218};
    const uint16_t XRWalk02[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
    const uint16_t XDownLegsCompressed01[] = {24, 2043, 2500, 2042, 1875, 2041, 2457, 2118, 2500, 1961, 1875, 2000, 2457, 2064, 2500, 2151, 1875, 2029, 2457, 2035, 2500, 1978, 1875, 2041, 2457};
    const uint16_t XReadTest[] = {24, 2184, 1550, 1191, 1866, 2046, 2051, 2046, 1544, 2039, 1857, 2050, 2220, 2046, 2199, 2046, 1865, 2048, 2051, 1567, 1548, 2047, 1866, 2045, 1765};
    const uint16_t XStandstep01[] = {24, 2048, 2400, 2048, 1255, 2320, 1633, 2048, 2400, 2048, 1255, 1728, 1633, 2533, 1562, 2048, 1870, 2048, 1610, 1657, 1539, 2048, 1870, 2048, 1539};
    const uint16_t XRelax02[] = {24, 2056, 1621, 2043, 2905, 2052, 1521, 2049, 1584, 2042, 2966, 2049, 1528, 2054, 1505, 2046, 3106, 2050, 1615, 2053, 1566, 2041, 3040, 2046, 1578};
    const uint16_t XRelax01[] = {24, 2047, 2147, 2047, 1997, 2047, 1443, 2050, 2150, 2048, 1982, 2046, 1448, 2046, 2132, 2048, 2008, 2046, 1460, 2049, 2149, 2043, 2033, 2045, 1492};
    
    
    PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    PROGMEM transition_t LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };
    PROGMEM transition_t PoseDeveloper[] = {{0,6} ,{XStanding,2000} ,{XStandstep01,2000} ,{XStandStep02,2000} ,{xStandStep03,2000} ,{XStandStep04,2000} ,{HStanding01,5000} };
    PROGMEM transition_t XLCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk06,500} ,{XRWalk05,500} ,{XRWalk04,500} ,{XRWalk03,500} ,{XRWalk02,500} ,{XRWalk01,500} };
    PROGMEM transition_t XRCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk02,500} ,{XRWalk03,500} ,{XRWalk04,500} ,{XRWalk05,500} ,{XRWalk06,500} ,{XRWalk01,500} };
    PROGMEM transition_t XFWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk02,500} ,{XFWalk03,500} ,{XFWalk04,500} ,{XFWalk05,500} ,{XFWalk06,500} ,{XFWalk01,500} };
    PROGMEM transition_t XRTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn01,500} ,{XRTurn02,500} ,{XRTurn03,500} ,{XRTurn04,500} ,{XRTurn05,500} ,{XRTurn06,500} };
    PROGMEM transition_t XLTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn05,500} ,{XRTurn04,500} ,{XRTurn03,500} ,{XRTurn02,500} ,{XRTurn01,500} ,{XStanding,500} };
    PROGMEM transition_t LegsUp01[] = {{0,2} ,{XStanding,2000} ,{XLegsUp,2000} };
    PROGMEM transition_t XRelaxSeq[] = {{0,3} ,{XLegsUp,2000} ,{XRelax01,2000} ,{XRelax02,2000} };
    PROGMEM transition_t LegStanding01[] = {{0,2} ,{XLegsUp,2000} ,{XStanding,2000} };
    
    
    #endif
    Code:
    Arduino: 1.6.13 (Windows 10), Board: "Arbotix-M"
    
    
    In file included from C:\Users\Che Edoga\Documents\Exaime3\XCommander01\XCommander01.ino:22:0:
    
    
    XPoses.h:37: error: variable 'XBWalkSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
    
    
                                      ^
    
    
    XPoses.h:38: error: variable 'LegSeqTest01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };
    
    
                                       ^
    
    
    XPoses.h:39: error: variable 'PoseDeveloper' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t PoseDeveloper[] = {{0,6} ,{XStanding,2000} ,{XStandstep01,2000} ,{XStandStep02,2000} ,{xStandStep03,2000} ,{XStandStep04,2000} ,{HStanding01,5000} };
    
    
                                        ^
    
    
    XPoses.h:40: error: variable 'XLCrab01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t XLCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk06,500} ,{XRWalk05,500} ,{XRWalk04,500} ,{XRWalk03,500} ,{XRWalk02,500} ,{XRWalk01,500} };
    
    
                                   ^
    
    
    XPoses.h:41: error: variable 'XRCrab01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t XRCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk02,500} ,{XRWalk03,500} ,{XRWalk04,500} ,{XRWalk05,500} ,{XRWalk06,500} ,{XRWalk01,500} };
    
    
                                   ^
    
    
    XPoses.h:42: error: variable 'XFWalkSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t XFWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk02,500} ,{XFWalk03,500} ,{XFWalk04,500} ,{XFWalk05,500} ,{XFWalk06,500} ,{XFWalk01,500} };
    
    
                                      ^
    
    
    XPoses.h:43: error: variable 'XRTurnSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t XRTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn01,500} ,{XRTurn02,500} ,{XRTurn03,500} ,{XRTurn04,500} ,{XRTurn05,500} ,{XRTurn06,500} };
    
    
                                      ^
    
    
    XPoses.h:44: error: variable 'XLTurnSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t XLTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn05,500} ,{XRTurn04,500} ,{XRTurn03,500} ,{XRTurn02,500} ,{XRTurn01,500} ,{XStanding,500} };
    
    
                                      ^
    
    
    XPoses.h:45: error: variable 'LegsUp01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t LegsUp01[] = {{0,2} ,{XStanding,2000} ,{XLegsUp,2000} };
    
    
                                   ^
    
    
    XPoses.h:46: error: variable 'XRelaxSeq' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t XRelaxSeq[] = {{0,3} ,{XLegsUp,2000} ,{XRelax01,2000} ,{XRelax02,2000} };
    
    
                                    ^
    
    
    XPoses.h:47: error: variable 'LegStanding01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
     PROGMEM transition_t LegStanding01[] = {{0,2} ,{XLegsUp,2000} ,{XStanding,2000} };
    
    
                                        ^
    
    
    Multiple libraries were found for "Commander.h"
     Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Commander
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\Commander
    Multiple libraries were found for "ax12.h"
     Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Bioloid
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
     Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\hardware\avr\0.0.2\libraries\ArbotiX
    exit status 1
    variable 'XBWalkSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
    
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.


    Question...

    Do I change the "PROGMEM transition_t" to "const uint16_t" ? Figure I have to change it to something because PROGMEM seems to be the problem?

    Also, thank you all for the help. I've been away too long!

    DB

  7. #7
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,717
    Images
    456
    Rep Power
    92

    Re: Trouble compiling arduino sketch using arbotix commander to control robot

    I'm coming to understand the world has moved on and I have become dinosaur. Where did the world go? What dynamixel controller are people currently using?

    Also Still looking for help with the above.

    DB

  8. #8

    Re: Trouble compiling arduino sketch using arbotix commander to control robot

    You need to add more const declarations. And in the case you mentioned transistion_t is a type so you do not want to change it.

  9. #9
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,717
    Images
    456
    Rep Power
    92

    Re: Trouble compiling arduino sketch using arbotix commander to control robot

    Quote Originally Posted by KurtEck View Post
    You need to add more const declarations. And in the case you mentioned transistion_t is a type so you do not want to change it.
    I'm sorry, I don't know enough to understand what that means...Do I change "PROGMEM transition_t" to "const transition_t"? or "const PROGMEM transition_t"

    Thanks in advanced.

    DB

  10. #10
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,238
    Images
    27
    Rep Power
    270

    Re: Trouble compiling arduino sketch using arbotix commander to control robot

    Seems to be:
    Code:
    const uint16_t foo[] PROGMEM =
    and
    Code:
    const transition_t foo[] PROGMEM =
    And I was not cursing your use of the arbotix or Pypose, but simply Pypose for not being updated in several years while Arduino and gcc keep changing.

    Meant to add this in a comment on the arbotix debug thread, but lost my firefox session and forgot...

    YAY! DB is back!
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question(s) arbotix-M help, arduino IDE error while running ArbotixBlink sketch
    By cckieu in forum Arbotix, Microcontrollers, Arduino
    Replies: 1
    Last Post: 10-06-2015, 10:44 AM
  2. Arbotix sketch to center a servo
    By wthierry in forum Software and Programming
    Replies: 3
    Last Post: 08-11-2014, 02:19 PM
  3. Question(s) Can't control Phantom Hexapod via ArbotiX Commander v2.0
    By HDmatirx in forum Arbotix, Microcontrollers, Arduino
    Replies: 2
    Last Post: 12-02-2013, 10:35 AM
  4. Question(s) Problem with Arbotix Commander 2 communicating with Arduino uno via xbees
    By jerry7580 in forum Arbotix, Microcontrollers, Arduino
    Replies: 4
    Last Post: 08-02-2013, 01:07 AM
  5. Trouble compiling PhantomX Hexapod Sketch
    By Gilrock in forum Software and Programming
    Replies: 7
    Last Post: 01-31-2011, 11:50 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •