PDA

View Full Version : Total newb to programming here... Question about the many programming languages. Ty!



tsubotakid1
10-03-2003, 04:46 PM
Hi! I'm 15 years old and my "homeschool" (it's actually a group of about 15 kids) is building a six-legged robot. So far, we have everything assembled/operational with throwswitches. My teacher wants to be able to program it to do various things (stop, reverse, go, etc.). Anyways, he doesn't know a thing about programming, and neither do I. We have an old laptop from PG&E running windows 3.1/dos - I'm sure this is enough to do some basic programming. I may be in the wrong forum, but i am quite adroit when it comes to computers (i record/produce music and am a seasoned synth programer). So any help would be appreciated... should i use QB? C? Visual Basic? Where might i find compilers? I know a few things about programming language (variables, strings, etc.), but i have never actually "programmed" anything that wasn't going to be used in a software environment. Once again, any help whatsoever would be MUCH appreciated!

Once again, we have a windows 3.1 machine, and would like anyone to recommend a code to start with.

ps - i'm not asking any of you to do my homework or write a program.

Thank you!!!

Alex Tsubota
tsubotakid1@hotmail.com

Govtcheez
10-03-2003, 04:59 PM
You'd be best off looking for a C compiler - there are plenty out there that are free, just use google.

The only problem is finding one that will compile to your specific hardware. I'd contact the hardware manufacturers if I were you.

DavidP
10-03-2003, 07:52 PM
I know of a C++ compiler and C compiler that will work on Windows 3.1 and are free.

They are Turbo C 1.1 or Turbo C++ 2.01.

They are a little ancient, but are quite good and will work wonderfully on Windows 3.1. They will also probably work very well for your purposes.

You can download them at Borland's website for sure (legally).

I am sure you can find them at other places on the internet also.

The problem is getting the program from the computer to the robot. You have to somehow embed an OS in the robot to control it.

There is a way around this, however. What is it? LEGO's.

I do not know what your budget is, but LEGO produces a robot building kit. You don't have to use LEGO pieces, but it does come with an average sized block-shaped engine-type thing that has an embedded OS in it that is able to run C programs.

My friends used C to program on it when they made a robot.

It has several connectors to it so you can connect gears, engine, etc. and the LEGO block will command them to do things.

I think the LEGO robot building kit cost somewhere between $150 to $200, but I am not sure.

I know several people have done incredible things with it.

tsubotakid1
10-03-2003, 08:44 PM
Hi! Thank you both for your valuable info (and sorry about the poll, i'm not sure how it got up, but i couldn't get it to go away). Anyways, about the LEGO Mindstorms... Our robot is going to be easily 50 pounds + a 6 pound motorcycle battery. We're making of variation of the "Six-Legged-Robot" from the book: "The Robot Builder's Bonanza" So, I guess what I am wondering is if the Lego thingy will be able to adequately run our robot. (Is the lego thing an engine itself? We have several stepper motors in use). Our robot also can convert for use on treads (gears are used to move it when it is in "leg mode") so no programming is necessary to "lift leg up" and "put leg down." :)

So, do you think the lego engine will propel a 50+ pound bot?

Thank you so much!

AlexT

tsubotakid1
10-03-2003, 08:48 PM
If the Lego thing doesn't work... what steps need to be taken to "embed an os" into our robot. This is something that i brought up to our teacher (and i recommended the mindstorms too... but i don't think he knew quite what it was or what it did). Is there a basic piece of hardware that can be ordered that can run C programs?

Thanks again!

AlexT

DavidP
10-04-2003, 12:18 AM
Well the LEGO thing is actually just a small computer with a couple places on it that send electrical signals.

It isn't a motor in itself.

You send a program to it, and I believe it has I think 4 places that send electrical signals to various places on the robot. The electricity will then in turn power the gears, etc.

confuted
10-04-2003, 02:48 PM
Or the electricity could be used to toggle switches which will allow electricity from the battery through, since it sounds like you'll be needing more power.

BTW, mods, which one of you put the poll up, and why? I don't see anything really wrong with his question...

Cat
10-04-2003, 03:20 PM
Originally posted by tsubotakid1
If the Lego thing doesn't work... what steps need to be taken to "embed an os" into our robot. This is something that i brought up to our teacher (and i recommended the mindstorms too... but i don't think he knew quite what it was or what it did). Is there a basic piece of hardware that can be ordered that can run C programs?

Thanks again!

AlexT

Hmm,

There are a lot of options. Embedded OS is probably beyond you, and too expensive to boot. For building one single prototype of something that can run Windows CE, you are probably looking at $2000 or more, not counting software cost.

You can do a LOT with microcontrollers, though, so you can check out PICmicro's line of MCUs. You will need to build a programmer (check out Myke Predko's El Cheapo at www.myke.com) and you can use the tools that Microchip makes available (free assembler, debugger/simulator.) to work with.

Cat
10-04-2003, 03:27 PM
Originally posted by confuted
Or the electricity could be used to toggle switches which will allow electricity from the battery through, since it sounds like you'll be needing more power.


As a note -- DON'T ever directly drive a motor with any of your own home-designed circuitry. Buy a dedicated motor control circuit and put it in between, they are very cheap.

Motors have large inductance; if you're not careful how you switch them on and off, you can EASILY develop transient voltages in the hundreds to thousands of volts for very brief intervals (usually until something undergoes breakdown and the energy has a place to dissipate). Very bad for your circuits.

It's not TOO hard to design a good drive circuit, but you can buy good drive circuits, so it's the better way to go.

Brian
10-05-2003, 07:32 AM
I'm fed up of people saying Legos. The plural of Lego is Lego.

idiots.

confuted
10-05-2003, 08:25 AM
Originally posted by Brian
I'm fed up of people saying Legos. The plural of Lego is Lego.

idiots.
http://www.acronymfinder.com/af-query.asp?p=dict&String=exact&Acronym=LegOS
Owned.

Brian
10-05-2003, 10:32 AM
http://www.acronymfinder.com/af-query.asp?p=dict&String=exact&Acronym=stfu

PWNED. anyway, he said "Lego's", which is an even more bastardised form.