Shop OBEX P1 Docs P2 Docs Learn Events
Need Programming Suggestion. — Parallax Forums

Need Programming Suggestion.

BaTWING_2000BaTWING_2000 Posts: 6
edited 2008-09-17 11:00 in Learn with BlocklyProp
Hey all,

I finally got into the Parallax kits after having shoved it into a corner for over a year. First of all I wanna say that these education kits are just THE best way to start from the very beginning. Great materials!!!

Now the reason for my first post is that I'm kinda having flashbacks from my high school chemistry class back in 2000-2001. I'm working with the "Whats a Microcontroller?" EDU kit... made my way up to chapter 3 perfectly but when I reached the last project of chapter 3, things snowballed downhill fast skull.gif!!!

I can read and understand what everything does in a program when I have it in front of me but if I'm asked to write the smallest piece of coding·everything goes blank immediately if I dont have a reference. Its like a part of my brain just locks·me out (just like in chemistry).

Is there any book that I can get later on that·focuses on·coding and everything after I finish the first "What's a Microcontroller?" kit so i can get a handle on this cognitive problem of mine?

-Peter··

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-11 04:34
    There are all kinds of tutorials in the Stamps in Class series and the Nuts and Volts Columns have useful information. Go to the Resources tab on the main Parallax webpage. You'll see a link to Downloads, then Stamps in Class Downloads. On the Resources page, you'll also see a link to Nuts and Volts Columns.

    Also check out this website: www.emesystems.com.
    There's all kind of useful information on using Stamps.

    Here's a downloadable 3rd party book. It's mostly about the BS2p, but includes examples for the BS2 as well.
    www.parallax.com/Store/Books/BASICStamp/tabid/168/CategoryID/42/List/0/Level/a/ProductID/402/Default.aspx?SortField=ProductName%2cProductName
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-09-11 12:20
    I find I like to have something really simple, which works, and then I can build on that.

    In the world of the BS2 (and microcontrollers), usually the simplist thing that works is blinking an LED. So wire up an LED with a 470 ohm resistor between an I/O pin (let's say #2) and Vss (Ground). Then the following code should blink the LED:

    LEDPin CON 2

    MAIN:
    HIGH LEDPin
    PAUSE 500
    LOW LEDPin
    PAUSE 500
    GOTO MAIN

    Now, once you've got the above working (you might need to turn the LED around) you can expand that for more complicated programs.
  • NR1XNR1X Posts: 111
    edited 2008-09-11 22:39
    dont sweat it!! the coding will come together.. i still refer to the Whats a microcontroller text every now and then.. also keep your eyes peeled here
    there is often great code examples and sometimes one way of putting it is much more simple than another.. as you advance trough the book it will show you how some commands simplify your codes.. point is hang in there and you will get the aha moment... idea.gif
  • Larry SutherlandLarry Sutherland Posts: 77
    edited 2008-09-12 18:39
    A Mistake I made_

    I rushed through the book What's a Microcontrolller.

    Now I take my time and every once in a while I just put it away. It makes more sence latter.

    I have worked my thru 1st mentioned, Boe Bot, Toddler, and Smart Sensors. Basicly a little over a year and alot of work it is becoming clear.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔





    ·Right_Uderstanding, Attitude, Speech, Action, Livelihood, Effort, Concentration, and Awareness
  • BaTWING_2000BaTWING_2000 Posts: 6
    edited 2008-09-14 23:30
    First of all, thanks for all the help guys. Its much appreciated. Yeah I've been moving forward in the book and made it to the end of chapter 6 right now. I get the general ideas but can't remember the details most of the time (I think its just a matter of memorizing the stuff).

    I gotta say that I'm having a great time right now learning it all. What i'm probably gonna do is move on to the boe-bot education kit to see more of these concepts in action and then check out this 'What's a microcontroller?' book again... like watching a movie twice to get the missed pieces of the plot.

    Again guys. thanks a bunch for the guidance with this·smile.gif .
  • MSDTechMSDTech Posts: 342
    edited 2008-09-15 01:38
    One of the most usefull tools Parallax provides is the help file in the Editor. I find the concise listing off all the available comands and their syntax invaluable. Its just an F1 away, and if you highlight a command, it will take you directly to its section in the help file.
  • SRLMSRLM Posts: 5,045
    edited 2008-09-17 08:25
    I keep my hardcopy of Basic Stamp Syntax and Reference Manual on my desk whenever I'm programming, and have it open to whatever I need. That way I don't have to switch screens. Personal preferance...
  • iamdenteddiskiamdenteddisk Posts: 66
    edited 2008-09-17 11:00
    I program in many languages and many platforms so I understand what you mean by starting out drawing a blank,here is my suggestion i use this alot .


    ·first try typeing out your code examples.
    ·second learn how to do a comment and comment each command well.
    ·third modify all the commands &statements to use pin "*"or any symbol you know isnot a pin number.
    ·fourth· comment out the sample code.
    ·fith save this file as "generic.bas".
    · you have created a generic template.

    ·then when its time to challange your self start with the generic.bas as a type of template to base your code on you can readup to refresh on commands and their use and apply the one you feel needed remembering to modify its pin assignment.
    ·save the file as a new file name something describing its use

    write your program
    save test and repeat last step·untill done

    when you are satisfied and can say its a complete project
    deleate the commented command section
    save agian



    It may be easier for you to start this out with just a few commands at a time and let it swell as you begin useing new commands and the ones you catch your self useing without haveing to stop and refresh you can deleate.


    Post Edited (iamdenteddisk) : 9/17/2008 11:12:50 AM GMT
Sign In or Register to comment.