This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/EK-TM4C123GXL: Beginner ask: How to accept input from keyboard?

Part Number: EK-TM4C123GXL

Tool/software: Code Composer Studio

Hello everyone. I am very new to this product. In here I want to write a program that will take inputs from keyboard. An example could be: when I type 'blue' on keyboard, the LED on the board will shine as blue. Are there any commands that can take inputs? The only one I can think of is 

ROM_UARTCharsAvail(UART0_BASE)), but I don't know how to use it.

Any helps are welcome. Thanks!


Adam
  • Hello Adam,

    Interesting to know you are moving from your background in Economy, and now venturing into embedded development!

    Since you are mentioning UARTCharsAvail(), it suggests you already downloaded the Tivaware library.

    Look at the /docs folder, there is a file there called SW-TM4C-UTILS-UG-2.1.4.178.pdf. One of the documented utilities is a Command Line Processing Module. You have access to all the programming code for it.

    You can either use it as is, or just get inspired by it to create your own solution. It won't be a simply "command that take inputs", but the library is "almost as easy as that".

    Regards

    Bruno
  • Beyond poster/friend Bruno's direction - you may consider reducing your command from, "blue" to just "b." This will greatly, "Speed, Ease & Enhance" your "essential" program's completion. Having to search thru "4 chars" (so that "blud" is rejected) does NOT serve your purpose - this early into your learning...

    This "simplify - most always" technique is known as, "KISS" - greatly aids & speeds the learning process...
  • That's indeed a good suggestion! One needs to master "identifying a single received byte" long before parsing a text-based command!

    Poster will only later worry controlling other color leds on his board, which are Burgundy, Barberry, Basalt, Beige, Bermuda, Black, Blush, Bordeaux, Brass, Bronze, Brown and Burnham... :)
  • What?     As gf notes, "How possibly could Bruno omit "Burnt Sienna?"    (love that aroma - not so much the color...)

    It is noted that your (assumed) dictionary reached to "BURN" (i.e. Burnham) - one more click would have exhausted "B List."     (maybe)