View unanswered posts | View active topics It is currently Fri Sep 25, 2020 5:09 pm

 Page 1 of 1 [ 6 posts ]
 Print view Previous topic | Next topic
Avoider/ Climber robot
Author Message
Expert

Joined: Wed Jun 30, 2010 7:15 am
Posts: 181
Avoider/ Climber robot
OK, this time, a fully finished project: an avoider/ climber bot. Whenever I paste videos and photos on this here, I kinda screw up (they get humongous) so I've just got the coding (see below) and a link to the post on my blog with pictures and videos, sorry.
 Code:#pragma config(Sensor, S1,     TouchRight,          sensorTouch)#pragma config(Sensor, S2,     SonarSensor,         sensorSONAR)#pragma config(Sensor, S4,     TouchLeft,           sensorTouch)//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//task main(){  //wait10Msec(1000); (for video)  nMotorPIDSpeedCtrl[motorA] = mtrSpeedReg;  nMotorPIDSpeedCtrl[motorC] = mtrSpeedReg;  while(true){    if(SensorValue(TouchLeft) == 0 && SensorValue(TouchRight) == 0){      motor[motorA] = -60;      motor[motorC] = -60;      if(nMotorEncoder[motorB] > 360){        motor[motorB] = 0;      }    }    if(SensorValue(TouchLeft) == 0 && SensorValue(TouchRight) == 1){      motor[motorA] = 0;      motor[motorC] = -25;    }    if(SensorValue(TouchLeft) == 1 && SensorValue(TouchRight) == 0){      motor[motorA] = -25;      motor[motorC] = 0;    }    if(SensorValue(TouchLeft) == 1 && SensorValue(TouchRight) == 1){      motor[motorA] = 0;      motor[motorC] = 0;      if(SensorValue(SonarSensor) > 9){         PlaySound(soundBeepBeep);         nMotorEncoder[motorB] = 0;         nMotorEncoderTarget[motorB] = 360;         motor[motorB] = -35 ;         while(nMotorRunState[motorB] != runStateIdle){}         motor[motorB] = 0;       }       else{         while(SensorValue(SonarSensor) < 25){           motor[motorA] = 25;           motor[motorC] = 25;         }        nMotorEncoder[motorA] = 0;        nMotorEncoder[motorC] = 0;        nMotorEncoderTarget[motorA] = -215;        nMotorEncoderTarget[motorC] = 215;        motor[motorA] = -25;        motor[motorC] = 25;        while(nMotorRunState[motorA] != runStateIdle && nMotorRunState[motorC] != runStateIdle){}       }    }  }}

_________________
leonoverweel.com

Thu Nov 11, 2010 11:27 am

Joined: Wed Jan 24, 2007 10:44 am
Posts: 442
Location: Pittsburgh, PA
Re: Avoider/ Climber robot
Hey nice job on this one!

The climber seems like it's pretty solid. I'll post this up on robotc.net as soon as I can.

_________________
Vu Nguyen
Software Training Development Team | Webmaster
Need more support? Email ROBOTC Support at support@robotc.net to put in a support ticket

Robotc.net| Robomatter Store | Robotics Academy | CS2N

Mon Nov 15, 2010 12:55 pm

Joined: Wed Jan 24, 2007 10:44 am
Posts: 442
Location: Pittsburgh, PA
Re: Avoider/ Climber robot
Alright, I just scheduled your post to go up the 24th (next week). I try to space out the postings. You should see it up next week. Thanks a lot!

_________________
Vu Nguyen
Software Training Development Team | Webmaster
Need more support? Email ROBOTC Support at support@robotc.net to put in a support ticket

Robotc.net| Robomatter Store | Robotics Academy | CS2N

Wed Nov 17, 2010 11:25 am
Expert

Joined: Wed Jun 30, 2010 7:15 am
Posts: 181
Re: Avoider/ Climber robot
Hi,

THANKS A LOT, man! If you need any more info, just ask. I've still got it together, and I've also got an LDD file on the NXT log, under my name ("worldofmindstorms").

_________________
leonoverweel.com

Fri Nov 19, 2010 7:03 pm

Joined: Wed Jan 24, 2007 10:44 am
Posts: 442
Location: Pittsburgh, PA
Re: Avoider/ Climber robot

_________________
Vu Nguyen
Software Training Development Team | Webmaster
Need more support? Email ROBOTC Support at support@robotc.net to put in a support ticket

Robotc.net| Robomatter Store | Robotics Academy | CS2N

Wed Dec 01, 2010 2:04 pm
Expert

Joined: Wed Jun 30, 2010 7:15 am
Posts: 181
Re: Avoider/ Climber robot
lol

_________________
leonoverweel.com

Thu Dec 02, 2010 12:29 pm
Display posts from previous:  Sort by
 Page 1 of 1 [ 6 posts ]

#### Who is online

Users browsing this forum: No registered users and 2 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning