Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp Microcontroller Calculator? — Parallax Forums

Basic Stamp Microcontroller Calculator?

I understand that this should be relatively simple. I'm new to all of this so please bare with me. My professor wants us to make a program that works on the microcontroller, however it doesn't have to display on to an LCD or take a physical input with a keypad. My professor just wants us to work with in the Stamp program to get one to work. I know that the command for performing math are really simple, but I'm not sure how to start by asking someone "What number would you like to enter for number 1?", "What operation would you like to perform?", and "What number would you like to enter for number 2?"

The calculator has to add, subtract, multiply, and divide. It only has to have the capacity to accept 2 numbers for input.

Any help would be appreciated for this.

Comments

  • Since this is a homework problem, there's not too much help we can give, but how does a simple calculator work ... from the user's perspective? What keys are there? How does the calculator react to each one? What do you see happening? PS:
  • Mike Green wrote: »
    Since this is a homework problem, there's not too much help we can give, but how does a simple calculator work ... from the user's perspective? What keys are there? How does the calculator react to each one? What do you see happening? PS:

    A calculator should have 0-9 on a keypad along with whatever buttons for operations that you wish to perform, I believe. My professor says we are just allowed to input from out computers though, so I'm not sure if picturing what keys are there would help. If I understand what you said correctly.

    I think I just need to figure out what functions do what in Stamp and thats what is messing me up. It would help if I had a cheat sheet of commands that work in Stamp. Is that a thing?

    I apologize for such novice questions.
  • There is a reference manual. If you go down the page to Downloads & Documentation, there'll be a link to a free PDF copy (there's a charge for the paper version). Start by looking at the description (and examples) for the DEBUG and DEBUGIN statements which are based on the SEROUT and SERIN statements.
  • If you have the Stamp board there and the Stamp editor software, try the examples in the Manual as you go along. It's very helpful in understanding how things work and fit together.
Sign In or Register to comment.