Learning P-Basic Programming
adarko
Posts: 2
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!
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
First, you need to know something about the programming language:
Basic Stamp Manual
Then something about the Keypad (I am assuming the 4x4 pad)
Programming keypad
And then the LCD
lcd stamp code
That's a lot of stuff to learn, but it's what you pretty much have to know to do what you need done. If you have specific questions, people here *will* help you.