Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   RPU (http://www.chiefdelphi.com/forums/showthread.php?t=3783)

Ian W. 18-04-2002 22:57

Blasphemy! Computers DO NOT do what you tell them to do!! Have you ever tried programming an entire robot in PBASIC? Do you know how much you have to do to get around using decimals and negative numbers!?! Gear ratios are easy compared to this! Building transmissions, anyone can do it with the proper instructions! Programming the robot, much harder.

Not only must you check your code before you download it, you must make sure you don't use up to much variable space, or EEPROM, or any other number of things like that. Then, you must download the code, and test it out. If it works, yay, if it doesn't, the programmer had better fix it quick! Otherwise, the poor programmer is subject to, "It's the programmer's fault, how can i drive when it doesn't work?" and "Stupid programmers, can't do anything right" and other not nice things. Plus, the programemrs wind up being the people who can score the game, and on my team, drive the robot the best, seeing as I created the user interface for the robot controls! Don't say the programmers get off easy, because we work harder than anyone else!

Besides, who else has enough time to learn a whole new language? :D

A. Snodgrass 19-04-2002 21:35

ummm....tell that to my code that occasionally blows up in my face at 4 in the morning. then again...you are right that it DOES tend to do what you tell it to...sometimes...when it feels like it.

Greg McCoy 20-04-2002 10:03

Quote:

Originally posted by Ian W.
Blasphemy! Computers DO NOT do what you tell them to do!!
Ok, this kind of confuses me if you're being serious :confused:

Quote:

Have you ever tried programming an entire robot in PBASIC? Do you know how much you have to do to get around using decimals and negative numbers!?!
Yeah, and it's suprising to me that you ever have to deal with changing negative numbers to positive numbers and vice-versa that much. Can't you just reverse the polarity in the wiring?



While I admit programming FIRST robots will make you think pretty hard, programming other things doesen't get much easier. :) Just out of curosity, do any FIRST programmers use anything other than PBASIC?

P.S. Sorry if I offended you hard-core programmers. :D

Gui Cavalcanti 20-04-2002 10:17

LOL... not to worry Greg, not all of us are as fanatical as Ian is ;)

In my experience, I've taken code that I've worked on for hours, plugged it into the PBasic processor, and subsequently seen robots do absolutely nothing I expected. Of course, they follow your instructions to the letter, but they may not get the intent... ;)

First of all, the output to the rest of the robot is done by values of 0 to 254, not negative numbers. 12 volts to a speed controller would be 254, 0 would be -12 volts, and 127 would be 0 volts. So no, you couldn't possibly just reverse the wiring and expect it to work.

The Basic 2sx stamp doensn't run on anything other than PBasic. Supposedly you can make a compiler that has the same machine-level code, just use a different language to do it in (I believe it's called Not-Quite-C), but for all practical purposes PBasic is the most effective route to go. Besides, the default program to run the RC is written in PBasic, and that contians a lot of instructions you can't get rid of without causing the RC to stop functioning.

I personally use C++ and Java, but neither has any practical use for FIRST robots :)

srawls 20-04-2002 10:52

I think this thread is all in good fun, Greg, don't worry. Haven't other programmers been the butt of any jokes? :)

Well, out of first I know C/C++, perl, scheme, and sometimes I do a little html w/ javascript but I really hate that :)

Stephen

Greg McCoy 20-04-2002 11:28

Quote:

Originally posted by Gui Cavalcanti
First of all, the output to the rest of the robot is done by values of 0 to 254, not negative numbers. 12 volts to a speed controller would be 254, 0 would be -12 volts, and 127 would be 0 volts. So no, you couldn't possibly just reverse the wiring and expect it to work.
What I ment was to reverse the polarity from the Victor/Spike to the motor, not on the PWM cable. Sorry to not make this clear.

My question about what other programming languages was also not ment to just apply to FIRST robots either.

The point I was trying to make (and I guess I didn't make it very well) was that the BASIC Stamp processes what you told it to do exactly as you told it to do it. You may not have really wanted it to do that, but that's what you told it to do. It takes a pretty logically-oriented mind to program well, and the more logic you are the better. :)

It's hard to tell what people actually mean on any message board, because you are just stuck with the words, not the "voice" behind them :)

A. Snodgrass 20-04-2002 12:26

Yep I do, C++ and some java because that is what the beginning programming classes all computer science majors are required to take are in plus some other languages.

DanL 20-04-2002 14:51

Quote:

Originally posted by srawls
Well, out of first I know C/C++, perl, scheme, and sometimes I do a little html w/ javascript....
scheme! lol, YES! I remember I took a summer course that was basically an intro to programming a while back, and for some reason, they taught us that language. Didn't think it still existed, hehe


As for the C++/Java stuff, yeah, in 2 years, the AP Comp Sci exam is gonna be in java rather than C++. I'm taking AP CompSci next year, so I'm going to 5 it with C++ (they only begin teaching Java in regular comp sci next year, so I missed out on that =/ ). However, my school also offers a two-year Cisco Networking class. I'm definately taking that next year so that I can have my CCNA right out of high school :D :D

Ian W. 20-04-2002 15:10

yay for CCNA's!! then you can have a better job at college. :D

about flipping wires from victor to motor...
what if you're taking a fraction of the speed (like cutting speed in half)? how to rewire that? exactly, you can do it in software, or redo the drive train. :p

i also know/use C++, and hopefully this summer, a bit of Java. then, i'm taking the same CISCO course that dan is (doesn't our school rock?). should be fun :D

srawls 20-04-2002 15:14

our school doesn't even offer ap comp sci. i'm taking the test this year, without having even taken the class. we go to a governers school, though, that has comp sci classes, so it's all good. the third level course teaches scheme (i'm in that now, I skipped intro, that was in pascal, and then the second level is in c/c++). it's funny that scheme is the 3rd level course, cause it's so easy. still, it has sparked my interest in functional programming languages, and I'm planning on teaching myself haskell this summer.

Stephen

Matt Reiland 20-04-2002 19:18

If any of you go on to the field of automation you get to program real logic, Ladder Logic, in everyones favorite microprocessor the PLC (Programable Logic Controller). We currently use Allen Bradleys Logix 5000 with networks such as DeviceNet, ControlNet, ArcNet and hey EtherNet. With the PLC hooked up to full size Fanuc, ABB, and Kuka robots (which can easily have a payload of 500 lbs and all have FIRST teams) little mistakes get costly in a hurry but they are fun to watch, especially when a robot and a car body attempt to share the same space, at least the robot usually wins!!

Fanuc robots are even used in the fanuc assembly plant to build more fanucs, they literally are programmed to build copies of themselves, isn't that how terminator got started?:eek:


All times are GMT -5. The time now is 20:39.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi