Shop OBEX P1 Docs P2 Docs Learn Events
ActivityBot2013-10-31 problem — Parallax Forums

ActivityBot2013-10-31 problem

RsadeikaRsadeika Posts: 3,837
edited 2013-11-23 10:50 in Learn with BlocklyProp
I just installed SimpleIDE 0.9.44 and the ActivityBot2013-10-31 folder, and after reading the Documentation for abdrive, I noticed a command called 'drive_getTics()'. So, I decided to see what that is all about, but I keep getting a compile error, 'no such command', even though I have the '#include "abdrive.h" in my program. Is there a problem with the abdrive library, or is something else going on? Since this is not my first time with the IDE, I thought I had all the correct libraries associated with the program.

Ray
/*
  test_AB.c

*/
#include "simpletools.h"
#include "abdrive.h"

int main()
{
  // Add startup code here.
  drive_getTics();
 
  while(1)
  {
    // Add main loop code here.
    
  }  
}

Comments

  • jazzedjazzed Posts: 11,803
    edited 2013-11-22 11:18
    Hi Ray,

    Please uninstall 0-9-44, and install SimpleIDE 0-9-45 which was posted today to:

    http://learn.parallax.com/propeller-c-set-simpleide

    I accidentally posted the wrong package the first time. Sorry about that.
  • RsadeikaRsadeika Posts: 3,837
    edited 2013-11-22 12:16
    I just installed 0-9-45, and I noticed, in the new Simple Libraries folder which contains a Motor folder, but it does not have the abdrive library. Are we supposed to still get that at the Learn site and copy it to the Simple Libraries folder? Will that be the latest abdrive library, considering that the Learn site still shows 0-9-43 as the version that should be downloaded? I thought that the abdrive stuff would have been included in the latest update.

    Ray
  • edited 2013-11-22 12:21
    Hi Ray,

    There's a "Documentation abdrive Library.html" page in your ActivityBot2013-10-31 folder that explains the library's functions. In the drive_getTicks section, it explains that the *left and *right parameters have to be pointers to the variables that you want loaded with the left and right ticks. Here is an example that declares variables and passes their pointers to the drive_getTicks function:
    #include "simpletools.h"
    #include "abdrive.h"
    
    int ticksL, ticksR;
    
    int main()                   
    {
      drive_speed(32, 32);
      for(int i = 0; i < 4; i++)
      {
        drive_getTicks(&ticksL, &ticksR);
        print("ticksL = %d, ticksR = %d \n", ticksL, ticksR); 
        pause(1000);
      }
      drive_speed(0, 0);
    }
    
    

    Andy
  • edited 2013-11-22 12:27
    Hi Ray,

    The abdrive library is still getting updated on a regular basis, so we are not including it with the software yet. So yes, please copy the ActivityBot2013-10-31 folder back into Simple Libraries and restart SimpleIDE. Also make sure to correct your drive_getTicks call (discussed in previous post).

    Andy
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2013-11-22 14:56
    The Learn site has the SimpleIDE 0.9.45 installers posted for Windows and Mac.

    (@Ray, Steve just happened to see your email within the hour of posting the 0-9-45 Windows installer to the open source project code repository. We had not yet finished updating our own web resources to use the new packages.)
  • jazzedjazzed Posts: 11,803
    edited 2013-11-22 17:27
    Sorry for any confusion.
  • RsadeikaRsadeika Posts: 3,837
    edited 2013-11-23 02:54
    No confusion, things just got out of sync. I got 0-9-45 installed, and it seems to be working as expected, plus the 'drive_getTicks()' is working as expected, so everything is good...

    Ray
  • RsadeikaRsadeika Posts: 3,837
    edited 2013-11-23 03:21
    I was just looking through SimpleIDE Libraries and I cannot find sonyremote.h, where did it go?

    Ray
  • edited 2013-11-23 10:50
    Hi Ray,

    The tutorial for this came out a few days ago with a download. We'll probably add it to the next SimpleIDE. So for now, the IR remote library is a download on this page:

    http://learn.parallax.com/propeller-c-simple-devices/ir-receiver-and-remote

    Its function names are different from what you've been using, so some code updates will be necessary.

    Andy
Sign In or Register to comment.