anyone who can tell me how to achieve this function using a 16*2lcd and a keyboard?
daniel ding
Posts: 52
Hi everyone,
I want to use a 16*2 lcd and a keyboard to achieve the function as follows:
When I input the words light led6 F1/0 and then press enter key, the led of the pin6 will flash with the
frequently of 1/10.
Who can tell me how to do it.
The lcd and keyboard codes are ready!
I want to use a 16*2 lcd and a keyboard to achieve the function as follows:
When I input the words light led6 F1/0 and then press enter key, the led of the pin6 will flash with the
frequently of 1/10.
Who can tell me how to do it.
The lcd and keyboard codes are ready!
Comments
DongleBasic (in the Propeller Object Exchange) is a Basic interpreter that's easily extended with new statements, written in Spin. It uses the attached PC for its keyboard and display, but could be easily modified to use a PS/2 keyboard and LCD display. It contains routines to read in a line of text, break it up into words or numbers, and process it.
There are other objects in the Object Exchange that allow you to scan and manipulate strings of text. "Strings" is one. There are others used for GPS output string processing. You'll have to browse through the Object Exchange and look at some of them.
Note: It's much much easier to use a menu system where each key on the keyboard has a special purpose. "A" might mean "increment the LED pin number". "B" might mean "decrement the LED pin number". "C" would mean "light the LED using the last information entered". "D" would mean "stop". Typing digits would enter the numeric value of the digits. "." would mean "take the last number entered as a fraction". Any non-numeric character would start a new number (by setting the number to zero after using it). The LCD display would always show the current LED pin number, the current number value, and any other useful status information.