Results 1 to 3 of 3

Thread: Another Parallax Robot

  1. #1
    Past Administrator
    Fire$torm's Avatar
    Join Date
    October 13th, 2010
    Location
    In the Big City
    Posts
    7,902

    Another Parallax Robot

    Hey folks,

    With my Teensy project entering the programming phase, I was working out how I was going approach it when I received an email from DrPop. He had an extra Parallax kit [Board of Education (BOE) Shield-Bot] laying around that is daughter Kat had lost interest in and was offering it to me. WOW! Like a totally answered prayer! DrPop is really one awesome dude!

    So Thank You sir for the generous help. Much appreciated.

    My Parallax Robot


    This bot uses the Arduino Uno board. It's one of the easiest Arduino's to program. Uno will be a huge help with my Teensy project. Parallax has a really good tutorial, online and in PDF format, that seems to cover everything to get this bot moving. I have chosen to use the PDF to help keep things portable while I'm learning to program on my laptop. Also, I'm using OwnCloud to keep all the Arduino IDE files synced between my lappy and desktop systems.

    On a side note, totally free products like NextCloud/OwnCloud will pretty much kill the dependency for online file sharing services like Google Drive, DropBox, etc. with all the restrictions and data mining that those services impose on it's users. So like if you are really into file sharing, you should seriously consider spinning out your own NextCloud server. They offer builds for Raspberry Pi, Linux, Macs, and Windows. I've even found a derivative of NextCloud for my BeagleBone Black!


    Future Maker? Teensy 3.6

  2. #2
    Past Administrator
    DrPop's Avatar
    Join Date
    October 13th, 2010
    Location
    SoCal, USA
    Posts
    7,080

    Re: Another Parallax Robot

    SWEET! You got it mobile, F$, that is awesome. Double thumbs up for being able to run a mini server on the Beaglebone Black, that's some cool stuff. Best of luck with the builds, I'm in the process of learning how to code a little better, and scheming up ideas for my next bot too.

  3. #3
    Past Administrator
    Fire$torm's Avatar
    Join Date
    October 13th, 2010
    Location
    In the Big City
    Posts
    7,902

    Re: Another Parallax Robot

    I am actually getting the hang of this programming thing!

    Here is a 40 sec. demo of my rudimentary KB hacking....


    And just in case anyone is interested in the code.
    Code:
    /*
    Robotics with the BOE Shield  ServoRunTimes_withTurnSignals
    Performing tight Left and Right turns with LED signaling.
    */
    
    #include <Servo.h>                        // Include Servo Library
    Servo servoLeft;                          // Declare Left Servo Signal
    Servo servoRight;                         // Declare Right Servo Signal
    
    
    void setup()                              // Built-in initialization block
    {
      servoLeft.attach(13);                   // Attach Left Servo to pin 13
      servoRight.attach(12);                  // Attach Right Servo to pin 12
      pinMode(11, OUTPUT);                    // Set Digital Pin 11 -> Output
      pinMode(10, OUTPUT);                    // Set Digital Pin 10 -> Output
    
    Start:
    
    Left_Turn:
      for(int l = 1; l <= 3; l++)
    {
      digitalWrite(11, HIGH);                 // Pin 11 = 5 V, LED emits light
      delay(500);                             // ..for 0.50 seconds
      digitalWrite(11, LOW);                  // Pin 11 = 0 V, LED no light
      delay(250);                             // ..for 0.25 seconds
    }
    delay(500);                               // ..for 0.75 seconds
      servoLeft.writeMicroseconds(1300);      // Pin 13 PWM Clockwise Signal
      servoRight.writeMicroseconds(1300);     // Pin 12 PWM Clockwise Signal
      delay(3000);                            // ..for 3 seconds
    
    Break1:
      servoLeft.writeMicroseconds(1500);      // Pin 13 PWM Stay Still Signal
      servoRight.writeMicroseconds(1500);     // Pin 12 PWM Stay Still Signal
      digitalWrite(11, HIGH);                 // Pin 11 = 5 V, LED emits light
      digitalWrite(10, HIGH);                 // Pin 10 = 5 V, LED emits light
      delay(1000);                            // ..for 1.0 seconds
      digitalWrite(11, LOW);                  // Pin 11 = 0 V, LED no light
      digitalWrite(10, LOW);                  // Pin 10 = 0 V, LED no light
      delay(1000);                            // ..for 1.0 seconds
    
    Right_Turn:
      for(int r = 1; r <= 3; r++)
    {
      digitalWrite(10, HIGH);                 // Pin 10 = 5 V, LED emits light
      delay(500);                             // ..for 0.50 seconds
      digitalWrite(10, LOW);                  // Pin 10 = 0 V, LED no light
      delay(250);                             // ..for 0.25 seconds
    }
    delay(500); 
      servoLeft.writeMicroseconds(1700);      // Pin 13 PWM CounterClockwise Signal
      servoRight.writeMicroseconds(1700);     // Pin 12 PWM CounterClockwise Signal
      delay(3000);                            // ..for 3 seconds
    
    Break2:
      servoLeft.writeMicroseconds(1500);      // Pin 13 PWM Stay Still Signal
      servoRight.writeMicroseconds(1500);     // Pin 12 PWM Stay Still Signal
      digitalWrite(11, HIGH);                 // Pin 11 = 5 V, LED emits light
      digitalWrite(10, HIGH);                 // Pin 10 = 5 V, LED emits light
      delay(1000);                            // ..for 1.0 seconds
      digitalWrite(11, LOW);                  // Pin 11 = 0 V, LED no light
      digitalWrite(10, LOW);                  // Pin 10 = 0 V, LED no light
      delay(1000);                            // ..for 1.0 seconds
    
    goto Start;                               // sends program flow to Start
      
      }
    void loop()                               // Main loop auto-repeats
    {                                         // Empty, nothing needs repeating
    
    }
    I know, I know, Using a goto was unnecessary as I could have just put most of the code into the "void loop()" function declaration section. I just like goto statements.


    Future Maker? Teensy 3.6

Posting Permissions

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