My First Robot

Based on Fritsl's design I'm working on my first robot. I built the robot and it works but the only problem is that my servo won't do anything. I copied and pasted the code and the motors moved but not the servo. I don't think the sharp ir is working either. I think I might know what is wrong with the sharp ir. If I can fix this then the servo might work too, but I'm not sure. I will keep this updated if I fix it.  (Sorry for bad picture quality I took the picture with a digital video camera that doesn't take as good pictures:)

Navigate around using Sharp IR

  • CPU: Picaxe 28x1
  • Power source: Batteries
  • Programming language: Picaxe basic
  • Sensors / input devices: Sharp IR
  • Target environment: indoor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/my-first-robot-6

blank

blank

No problem

 

Alright, downloading is not the problem, your download was successful so the first step is good to go. A lot of people have a problem just getting a program to zap down to the bot so you are a step ahead of the game. Now in terms of “commands”…

You say you type in a “command”. What is this? Is it just a single line or maybe a main: and a goto main at the end? What exactly are you sending the robot when you send a command?

What I mean by command is

What I mean by command is that I tell the servo  to move. I have tried servo 1, 150,  or 200. I have tried to make the servo move, but it doesn’t do anything (I have the servo plugged into servo 1 instead of 0).  

Try this

pause 1000

main:

for b1=75 to 225 step 1

servo 1,b1

pause 10

next b1

for b1=225 to 75 step -1

servo 1,b1

pause 10

next b1

goto main

 

If this does not work, check that you are plugged into pin 1, check the v1/v2 jumper, check the resistor you have plugged in (instead of the darlington), check the direction of the servo plug etc etc. The code above is solid, if it does not work, it has to be a hardware problem and I promise it is a simple thing that you missed.

It didn’t work. I think the

It didn’t work. I think the servo doesn’t work. When I typed in a a code yesterday it moved a little bit, but not much. It twitched a little bit today too. I don’t know what is wrong with it.