Shop OBEX P1 Docs P2 Docs Learn Events
Learning P-Basic Programming — Parallax Forums

Learning P-Basic Programming

Hello there, I am an Electrical Engineering student in need of some help. My knowledge in programing is really limited and currently I am developing a project that needs mechanical engineering, electrical engineering, and programing. I have the first two areas of study covered, but the programming part is in zero. Can someone please help me to develop the following program?

Display : "Select cup size" A or B or C
If A is pressed then go to subroutine "A" where the capacity of a small cup will be predetermined. For example, A = small cup = 8 fluid ounces.
If B is pressed then go to subroutine "B" where the capacity of a medium cup will be predetermined. For example, B = medium cup = 12 fluid ounces.
If C is pressed then go to subroutine "C" where the capacity of a large cup will be predetermined. For example, C = large cup = 16 fluid ounces.

Then display: "Select Liquid Type" 1 or 2
If 1 is pressed then go to subroutine "1" and display "What Percentage of This Would You Like?"
If 2 is pressed then go to subroutine "2" and display "What Percentage of This Would You Like?"

Once liquid number 1 or 2 have been dispensed, loop one time back to display "Select Liquid Type" 1 or 2. Run the options once again and then STOP.

Lastly, go back to the beginning and get ready to dispense again, i.e., "Select cup size"

It is worthy mentioning that I am using the key pad and the LCD display for the Basic Stamp.

Thank you very much for your help!

Comments

Sign In or Register to comment.