Shop OBEX P1 Docs P2 Docs Learn Events
New to Forum and Programming. Seeking help with ActivityBot initial programming. — Parallax Forums

New to Forum and Programming. Seeking help with ActivityBot initial programming.

jeffomegajeffomega Posts: 17
edited 2015-03-17 08:04 in Propeller 1
Just built the ActivityBot with the Propeller board. I am trying to test the communication between my laptop using the SimpleIDE software as well as the Propeller program. I have no programming experience and am just trying to test the ActivityBot and see what we can do with it to get started. When I attempt to run a simple test program like SingingDemo.spin all indications seem to be that the program is received on the board but nothing happens... no sound. Also, I have run the HelloMessage.c using the SimpleIDE program using "Run with Terminal". It seems that the program loads to the board but no text message is displayed on the Terminal screen. What am I missing? Help is greatly appreciated before my sons lose all interest in robotics and programming. Thanks!

Comments

  • jazzedjazzed Posts: 11,803
    edited 2013-12-28 18:45
    jeffomega wrote: »
    It seems that the program loads to the board but no text message is displayed on the Terminal screen. What am I missing? Help is greatly appreciated before my sons lose all interest in robotics and programming. Thanks!
    This can happen if there is a problem with the crystal. Please compare your board with this picture below. In the center there is a silver oval. Make sure you have one.

    32910.png
    300 x 300 - 115K
  • jeffomegajeffomega Posts: 17
    edited 2013-12-29 07:38
    Thanks for your reply. The image of the board you provided looks exactly like mine. That part has this label on top: "T-5.000M". When I send any test program to the board using either SimpleIDE, Terminal, or the Propeller Tool... the Rx and Tx lights flash, but nothing else happens.
  • jeffomegajeffomega Posts: 17
    edited 2013-12-29 07:58
    2013-12-29 Our Bot Photo.jpg

    Here is a photo of our (as yet) nameless Bot. It should also be noted that I get only "success" comments from the software when sending test programs to the Bot... no error messages. In SimpleIDE we do get error messages if we change to anything other than the following Project Options: ActivityBoard, C, CMM Main RAM Compact.
    1024 x 768 - 132K
  • jazzedjazzed Posts: 11,803
    edited 2013-12-29 08:15
    I would suggest calling Parallax support in the morning for a replacement.

    Meanwhile, you can do some LED testing.

    Download the attached .zip file and extract the contents to your Documents\SimpleIDE folder.

    Use SimpleIDE menu Project->Open to open the blinky.side file.
    Ensure your board is connected via the USB cable and powered on (green LED under power switch lit).

    On SimpleIDE, click the serial port drop-down box next to the monitor icon to ensure the port is selected.
    Use Load RAM & Run (green arrow), to program the board.

    After programming, the yellow LED in the bottom right corner of the board should blink twice a second.

    When you get that far let me know, and I'll suggest an experiment with the IDE to help us tell if your crystal is working at all.

    Thanks.
    --Steve
  • jeffomegajeffomega Posts: 17
    edited 2013-12-29 09:03
    Thanks Steve,
    I am not familiar with where the attachment should be located on the thread for me to download. Can you confirm that it was attached and let me know where to find it?

    Jeff
  • jazzedjazzed Posts: 11,803
    edited 2013-12-29 09:52
    jeffomega wrote: »
    Thanks Steve,
    I am not familiar with where the attachment should be located on the thread for me to download. Can you confirm that it was attached and let me know where to find it?

    Jeff
    Ooops. Total fail!

    I'm so sorry. I forgot to attach the .zip.

    Here you go.
  • jeffomegajeffomega Posts: 17
    edited 2013-12-29 21:16
    Steve,
    Thanks, that blinky.zip file worked properly! My Veho360 also was making a beep tone with each blink of the light. However, I am having no success with any other files among the Parallax Demos that are supposed to play .wav sounds. I have tried "SingingDemo.spin" and "Test WAV Volume.c" using both SimpleIDE and the Propeller Tool with no success. The "Hello Message.c" does not print the text in the Terminal window.

    Other than the Blinky program, am I ready to test the Ultrasonic sensors and the operation of the drive wheels? What programs should I run to test these features?

    I notice that the "Blinky" program will run after I unplug the USB from the Bot, but it will stop when I plug the USB back in, or if I turn the power off... and will not restart when I turn the power back on. Can you tell me how to store a program in the Bots memory and then run it without being connected to the USB cable?

    Thanks for all of your help.
    Jeff
  • jeffomegajeffomega Posts: 17
    edited 2013-12-29 21:59
    Steve,
    I have gotten Run with Terminal to print messages properly now. Not sure what I did differently however.

    Jeff
  • jeffomegajeffomega Posts: 17
    edited 2013-12-29 22:32
    Steve,

    I am making progress now. I finally came across the Tutorial link and I am working my way through and I am currently at http://learn.parallax.com/activitybot/calibrate-your-activitybot. I will see how things go tomorrow and post more questions if they arise. If you have any input on the audio problem, I would appreciate your help on that.

    Thanks again.
    Jeff
  • jazzedjazzed Posts: 11,803
    edited 2013-12-30 08:58
    Hi. Glad you're making progress now.

    I looked very closely at your picture. There seems to be a small whisker of metal (or maybe dust) between two of the propeller pins near the crystal (see red arrow in attachment). A small piece of metal there could certainly cause problems. If it's really there (instead of a picture artifact) take a toothbrush, lightly push it down, and slowly sweep it out without losing track of it (don't let it go under the crystal for example).

    Since you hear a click on the speaker with blinky, I'm assuming that will eventually work. Honestly, I had no idea the LED was related to the speaker ... nice how that worked out.

    The "Test WAV Volume" project requires an SD card with the techloop.wav file on it.

    I assume you have found some of the Ultrasonic Ping examples in the tutorials.

    As far as blinky and other programs not running after power off, if you want a program to start up again after power up or reset, you need to save it to EEPROM using "Load EEPROM and Run" (the green down arrow button).

    When you plug the USB cable into the ActivityBot, the ActivityBot will get reset. The same thing can happen if you plug in another USB device to your computer. That's the way USB works.
    647 x 559 - 620K
  • jeffomegajeffomega Posts: 17
    edited 2013-12-30 19:20
    Steve,

    Thanks for the time you are taking to help with this. I did get the Techloop.wav to play from the SD Card through the Veho360 using the Test Wave Volume program. When I tried to load a different WAV file (a police siren wav file) on the SD card and modify the Test Wave Volume program to play the siren instead of the Techloop.wav, it continues playing the Techloop.wav. How to I look at what is on the SD card? How do I clear the EEPROM?

    I calibrated the wheel servos and that seemed to go fine. Then I ran the Trim program and the Bot drove straight like I hoped, then stopped, but then spun backwords in a tight circle until I finally turned the power off.

    Finally, where can I find instructions on how to connect the circuits and program the Ultrasonic Sensor that I mounted on a servo bracket?

    Thanks again,
    Jeff
  • jazzedjazzed Posts: 11,803
    edited 2013-12-31 08:32
    How to I look at what is on the SD card? How do I clear the EEPROM?

    We should add some kind of an SD card dump example to the Learn examples. Until someone posts that, the best thing to do is read it with a PC.

    You clear the EEPROM by reprogramming with the "Load EEPROM & Run" button
    burnee.png


    I calibrated the wheel servos and that seemed to go fine. Then I ran the Trim program and the Bot drove straight like I hoped, then stopped, but then spun backwords in a tight circle until I finally turned the power off.

    I don't have enough experience with that to be helpful. Sorry.
    Finally, where can I find instructions on how to connect the circuits and program the Ultrasonic Sensor that I mounted on a servo bracket?

    There is a list of links at the bottom of this page: http://learn.parallax.com/activitybot

    One of them is: http://learn.parallax.com/activitybot/navigate-ultrasound
    24 x 24 - 1K
  • jeffomegajeffomega Posts: 17
    edited 2013-12-31 21:35
    Steve,

    Things are going well now. I have been working my way through the online Tutorials. The Bot was behaving unpredictably as mentioned earlier, so I re-ran the calibration of the servos and all is well now. It is rolling around and moving away from obstacles using its whiskers. I would like to install the ultrasonic eyes on the servo and rotating bracket that I purchased separately (Product #570-28015). I have not been able to find any instructions on the Parallax website about how to connect this to the Propeller Activity Board. There are illustrations for other Boards, but not for the ActivityBot when using the 570-28015.

    Regarding the SD card issue: My PC does not see the SD card in the list of "Devices with Removable Storage" under "My Computer".

    Thanks again for your help.

    Happy New Year to You!

    Jeff
  • banjobanjo Posts: 447
    edited 2014-01-01 02:25
    jeffomega wrote: »
    Steve,

    Things are going well now. I have been working my way through the online Tutorials. The Bot was behaving unpredictably as mentioned earlier, so I re-ran the calibration of the servos and all is well now. It is rolling around and moving away from obstacles using its whiskers. I would like to install the ultrasonic eyes on the servo and rotating bracket that I purchased separately (Product #570-28015). I have not been able to find any instructions on the Parallax website about how to connect this to the Propeller Activity Board. There are illustrations for other Boards, but not for the ActivityBot when using the 570-28015.

    Regarding the SD card issue: My PC does not see the SD card in the list of "Devices with Removable Storage" under "My Computer".

    Thanks again for your help.

    Happy New Year to You!

    Jeff

    Jeff, at http://learn.parallax.com/activitybot/navigate-ultrasound you'll find connection instructions and code for the Ping sonar sensor itself. I'm not sure if there's information available for the rotating bracket & PAB.

    -Thomas
  • jeffomegajeffomega Posts: 17
    edited 2014-01-05 13:05
    Thanks for the suggestions thus far.
    The remaining issues are these:

    1. How do I connect the servo and Ultrasonic sensor to the ActivityBot board?
    2. How do I access (view, augment, delete) the data on the SD card?
    3. A new issue: I purchased the EMIC 2 but have not found any instructions on how to connect it to the ActivityBot board.

    All help is appreciated.

    Jeff
  • twm47099twm47099 Posts: 867
    edited 2014-01-05 13:28
    Jeff,
    In the post from banjo just above your last post there is a link on how to use the ping with the activitybot. The link below has the documentation on how to install and connect the servo. Download version 2.1.
    You will have to use code for the standard servo to operate the bracket. go to the parallax tutorials, Propeller C learning System, Simple Devices, Standard Servo for the info and sample code. Tom



    http://parallax.com/downloads/ping-mounting-bracket-kit-documentation







  • BenthePIBenthePI Posts: 8
    edited 2015-03-16 22:01
    Jeff,

    I asked the same question and got this from Courtney.
    BenthePI,

    This is a working copy only at the moment, but here is some code produced by Andy Lindsay recently for a tech support customer:
    /*
      Roam with Ping on Servo Turret.c
    
      Turn away from objects detected by sweeping Ping))) on turret servo.
    
      Connect Ping))) to P17 and turret servo to P16.
    */
    
    #include "simpletools.h"                      // Library includes
    #include "abdrive.h"
    #include "ping.h"
    #include "servo.h"
    
    int main()                                    // Main function
    {
      drive_setRampStep(10);                      // Set step size
      drive_speed(128, 128);                      // Initial speed
    
      int angle = 0, distance = 0, sweep = 1;     // Variables
    
      while(1)                                    // Main loop
      {
        if(angle >= 1800)                         // Sweep multiplier
          sweep = -1;
        else if(angle <= 0)
          sweep = 1;
       
        servo_angle(16, angle += (sweep *180));   // Set angle
        pause(50);                                // Let servo get there
    
        distance = ping_cm(17);                   // Check distance
    
        if(distance < 15)                         // Oops, too close
        {
          while(distance < 25)                    // While too close
          {
            drive_rampStep(-128, -128);           // Back up
            distance = ping_cm(17);               // ...and re-check
          }
        }
        else if(distance < 35)                    // If proximate (< 35 cm)
        {
          if(angle > 900)                         // If kinda in front of on right
          {
            while(distance < 35)                  // Freeze turret, turn until
            {                                     // opening
              drive_rampStep(128, 0);             // ...turn right
              distance = ping_cm(17);             // Check distance
            }
          }
          else                                    // If kinda in front of on left
          {
            while(distance < 35)                  // Freeze turret, turn until
            {                                     // opening
              drive_rampStep(0, 128);             // ...turn left
              distance = ping_cm(17);             // Check distance
            }
          }
        }
        else                                      // If not too close
        {
          drive_rampStep(128, 128);               // ... go forward
        }
      }
    }
    

    If you have any issues with it please reply and be as specific with describing your errors as possible. All libraries referenced for this project are available with the Learn folder/SimpleIDE.

    I concur with Gordon and Hal in that you should definitely spend the time to go through the Propeller C and ActivityBot tutorials, if you haven't already. 8 years old is a great age to start learning basic programming skills and concepts.
  • Courtney JacobsCourtney Jacobs Posts: 903
    edited 2015-03-17 08:04
    Physical installation of the PING))) Mounting Bracket Kit is the same for all Parallax Small Robots that use the small chassis (Boe-Bot, ActivityBot, Shield-Bot).

    As BenthePI mentions above, I just recently posted some code for this kit that you can try with your ActivityBot. See the link below to view the full thread:

    http://forums.parallax.com/showthread.php/160464-Seeking-source-code-for-ActivityBot-with-ping-amp-sweep-%28570-28015%29-in-Propeller

    If you are unfamiliar or unpracticed with building circuits, please do go over all of the Propeller C tutorials, not just the ActivityBot ones. They will be very helpful in building your basic electronics skills.
Sign In or Register to comment.