My Robot in form 2!

Posted on 27/11/2011 by microbot777
Modified on: 13/09/2018
Project
Press to mark as completed
Introduction
This is an automatic import from our previous community platform. Some things can look imperfect.

If you are the original author, please access your User Control Panel and update it.

Still stays there. The servo keeps twitching. The srf05 is supposed to take readings but it doesnt do it in the right time. Currently the sensor is off the servo(The body of the robot). (UPDATE 4.12.11) The sensor is attached back on. and here is the code that needs work on. dunno how to attach bas file to posts symbol range = w0 symbol rangecm = w1 symbol leftr = w2 symbol rightr = w3 servo B.0, 150   main:   pause 10   pulsout C.0, 2   pulsin C.0, 1, range   rangecm = range*5/58   ...


My Robot in form 2!

Still stays there.

The servo keeps twitching.

The srf05 is supposed to take readings but it doesnt do it in the right time.

Currently the sensor is off the servo(The body of the robot).

(UPDATE 4.12.11)

The sensor is attached back on.

and here is the code that needs work on.

dunno how to attach bas file to posts

symbol range = w0

symbol rangecm = w1

symbol leftr = w2

symbol rightr = w3

servo B.0, 150

 

main:

  pause 10

  pulsout C.0, 2

  pulsin C.0, 1, range

  rangecm = range*5/58

   do while rangecm > 10

    forward A : forward B

    pause 10

    pulsout C.0, 2

    pulsin C.0, 1, range

    rangecm = range*5/58

   loop

  gosub scanandstop

   if leftr > rightr then

    sertxd ("Left is bigger")

   else

    sertxd ("Right is bigger")

   end if

  goto main

 

{  

scanandstop:

  halt A : halt B

  servo B.0, 75

  pause 10

  pulsout C.0, 2

  pulsin C.0, 1, range

  rightr = range*5/58

  wait 1

  servo B.0, 150

  wait 1

  servo B.0, 225

  pause 10

  pulsout C.0, 2

  pulsin C.0, 1, range

  leftr = range*5/58

  wait 1

  return

}

Same as start here, obstacle avoidance

  • Actuators / output devices: 2 dc motors with worm gear and 1 mini servo
  • Control method: auto
  • CPU: Picaxe 20x2
  • Operating system: Linux, Windows, and Mac
  • Power source: 3 aaa duracell!
  • Programming language: Basic
  • Sensors / input devices: SRF05
  • Target environment: indoor
Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post