Author Topic: Simple programming help  (Read 3781 times)

0 Members and 1 Guest are viewing this topic.

Offline SciOlyStudentTopic starter

  • Full Member
  • ***
  • Posts: 67
  • Helpful? 0
Simple programming help
« on: January 29, 2008, 04:15:59 PM »
I need to program a robot to move forward for a certain amount of time and then stop.  I was thinking I could take the 50$ robot program and just delete everything, then putting in for it to move straight and then delay a certain amount of time.  I have no programming experience whatsoever.  Can someone fill in the blanks for me?

Offline benji

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: Simple programming help
« Reply #1 on: January 29, 2008, 05:21:28 PM »
Quote
I need to program a robot to move forward for a certain amount of time and then stop

1/turn motors on
2/delay
3/motors off(you can give it a reverse voltage if its dc motor for a short amount of time as a break)
good ol' BeNNy

Offline SciOlyStudentTopic starter

  • Full Member
  • ***
  • Posts: 67
  • Helpful? 0
Re: Simple programming help
« Reply #2 on: January 29, 2008, 05:22:36 PM »
Sorry, I forgot to say I was using servos... what command would I give the microcontroller to make the servos stop?

Offline benji

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: Simple programming help
« Reply #3 on: January 29, 2008, 05:27:24 PM »
you just tell e servo to go to a specific angle, and when its there it stops, did you modify ur sercos to make full turns?
good ol' BeNNy

Offline SciOlyStudentTopic starter

  • Full Member
  • ***
  • Posts: 67
  • Helpful? 0
Re: Simple programming help
« Reply #4 on: January 29, 2008, 05:54:14 PM »
I did modify the servos for full rotations.  Now I have another problem... when I try to write the program I substituted for the photovore program, it wouldn't write... It says the device is missing or there is an unknown device.  Any solutions?

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: Simple programming help
« Reply #5 on: January 29, 2008, 06:10:44 PM »
search. million threads with the same question
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline cooldog

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: Simple programming help
« Reply #6 on: January 29, 2008, 08:47:01 PM »
won't you need encoders
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,177
  • Helpful? 5
Re: Simple programming help
« Reply #7 on: January 30, 2008, 11:30:43 AM »
how do you turn servos off?
Robots are awesome!

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: Simple programming help
« Reply #8 on: January 30, 2008, 02:42:35 PM »
stop sending the pulse
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,177
  • Helpful? 5
Re: Simple programming help
« Reply #9 on: January 30, 2008, 02:43:41 PM »
lol ok, thx
Robots are awesome!

Offline SciOlyStudentTopic starter

  • Full Member
  • ***
  • Posts: 67
  • Helpful? 0
Re: Simple programming help
« Reply #10 on: January 30, 2008, 04:49:17 PM »
won't you need encoders


At first, I thought so too, but I'm going to run tests to see how long it takes the robot to travel a distance and then just make the program delay that long and then stop the servos

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: Simple programming help
« Reply #11 on: January 30, 2008, 06:46:42 PM »
won't you need encoders


At first, I thought so too, but I'm going to run tests to see how long it takes the robot to travel a distance and then just make the program delay that long and then stop the servos

this might work  HOWEVER it will only be accurate if power to the servo is the same all the time , the same weight of robot , and the same surface.
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline SciOlyStudentTopic starter

  • Full Member
  • ***
  • Posts: 67
  • Helpful? 0
Re: Simple programming help
« Reply #12 on: January 30, 2008, 07:42:46 PM »
this might work  HOWEVER it will only be accurate if power to the servo is the same all the time , the same weight of robot , and the same surface.

Hmmm... I've thought of the last two and they don't matter (always the same weight on a flat, smooth surface), but the power one concerns me... won't a servo run at the same speed you tell it to despite low battery power?

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: Simple programming help
« Reply #13 on: January 30, 2008, 07:48:47 PM »
this might work  HOWEVER it will only be accurate if power to the servo is the same all the time , the same weight of robot , and the same surface.

Hmmm... I've thought of the last two and they don't matter (always the same weight on a flat, smooth surface), but the power one concerns me... won't a servo run at the same speed you tell it to despite low battery power?
well the servo will run slower with less power , im assuming since it is a DC motor inside

maybe this calls for a switching regulator for each servo?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline SciOlyStudentTopic starter

  • Full Member
  • ***
  • Posts: 67
  • Helpful? 0
Re: Simple programming help
« Reply #14 on: January 30, 2008, 07:53:15 PM »
At any rate, all I have to do is run the tests for my robot with fully charged batteries, the same for the competition.  It only has to go a maximum of 10 meters...

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: Simple programming help
« Reply #15 on: January 30, 2008, 09:22:06 PM »
At any rate, all I have to do is run the tests for my robot with fully charged batteries, the same for the competition.  It only has to go a maximum of 10 meters...

ok but make sure the batteries are fully charged when you test it and after each run


if you use a voltage regulator ( a switching one, not a regulated one) then you can regulate the amount of voltage that they draw

use one regulator per servo .
Also, what is the voltage all the batteries, how many AAs or whatever battery you are using?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline SciOlyStudentTopic starter

  • Full Member
  • ***
  • Posts: 67
  • Helpful? 0
Re: Simple programming help
« Reply #16 on: January 31, 2008, 05:07:14 PM »

ok but make sure the batteries are fully charged when you test it and after each run


if you use a voltage regulator ( a switching one, not a regulated one) then you can regulate the amount of voltage that they draw

use one regulator per servo .
Also, what is the voltage all the batteries, how many AAs or whatever battery you are using?

Regular AAs... I know I know, its a waste but the competition limits me to using no more than 4 batteries at a maximum of 1.5V each... I would use NiMH except I couldn't find one with a voltage higher than 1.2V and I need 6V.

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: Simple programming help
« Reply #17 on: January 31, 2008, 05:18:42 PM »
rechargable AA are 1.2v  ;D
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

 


Get Your Ad Here

data_list