Society of Robots - Robot Forum
Software => Software => Topic started by: goatfish on April 27, 2008, 05:02:24 AM
-
i have just learned simple commands in BASIC code
such as
name$ = Input("What is your name? ")
Print "Hello " + name$
WaitKey()
does anyone have anything more inetresting to do than that?
p.s.-im only a begginer
-
Great start!!!
There are lots you can do with BASIC... even with robotics! There are several "special" versions of BASIC that enable you to interact with electronics (specifically, microcontrollers). I would check out two sites... the first is Parallax who makes the BASIC STAMP II microcontroller. You can program their microcontroller using a special version of BASIC called PBASIC. I would also check out PICAXE. They also make microcontrollers that can be programmed in a special version of BASIC.
-
try making a simple calculator :P that was my first basic code
-
yea i nedd someone to show me how to make a calculator,but not give it all away so i can learn,please try to show me in the next 28 days,its a 30 day trial i am using :)
-
What about a program that asks you questions then responds differently depending on your answer?
You should look up BASIC tutorials online . . .
Also, yesterday was BASIC's birthday :D
http://www.wired.com/science/discoveries/news/2008/04/dayintech_0501
-
yea i nedd someone to show me how to make a calculator,but not give it all away so i can learn,please try to show me in the next 28 days,its a 30 day trial i am using :)
Hi Goatfish,
noticed your comment 30Day trial!
There are several free full versions available on the net, GCBASIC, and (Mikroelektronika), Mikrobasic, to name two.
I suggest you get such a full version and take away the stress of worrying when your programme runs out of time, that way you can relax and play and learn at your leasure.
All the best with your trials, remember "to finish one must first start", Greetings Brian
-
check out for loops - a very useful element in programming (FOR..NEXT is in basic, WHILE..WEND, DO...UNTIL)
FOR i = 1 to 5 step 1
PRINT i
NEXT i
another useful thing that makes a program smart is an IF - ELSE - ENDIF clause
a = 3
IF a < 10 then PRINT "a is less than 10"
ELSE PRINT "a is greater or equal to 10"
ENDIF
-
yea i need to know how to use to the if statement,so i can have it do different things if there is a different repsonse
-
putting all programming languages aside you have the same structures. I recommend you learn your control structures and data structures first. then you can learn some syntax of whatever programming language.
learn about structure flow, commands like goto, break, and continue are actually a big no-no in good programming practice.
http://en.wikipedia.org/wiki/Control_flow (http://en.wikipedia.org/wiki/Control_flow)
http://en.wikipedia.org/wiki/Structured_programming (http://en.wikipedia.org/wiki/Structured_programming)
If your interested in programming (aside from robotics) I recommend you learn object oriented programming first (using abstract thinking) because that is where its at today.
If you learn process oriented programming first(basic, c) then you will have a harder time with OOP.
-
yea i need to know how to use to the if statement,so i can have it do different things if there is a different repsonse
I haven't programmed in BASIC in a couple years, but if you have more than three scenarios you want to use the switch statement.
also, know the difference between pre-test loops, and post-test loops.
Learn how to use pseudocode to.
http://en.wikipedia.org/wiki/Pseudocode (http://en.wikipedia.org/wiki/Pseudocode)