Home > 18FXXXX, LCD, microcontroller > Touchscreen Buttons & Sliders

Touchscreen Buttons & Sliders

Hey, I’m back. This time I’m posting my code for getting the hex color values for RGB combos. Mainly, it’s just some experimenting with the touchscreen to create a user interface for the microcontroller. In the past, it was either buttons, pots or rotary encoders and one would have to be crafty to use as little as pins possible for the greatest number of inputs. Now, its just a matter of defining an area with ifs and else ifs and being bounded within the LCD.

The RGB controller uses six buttons and three sliders. Here’s the main file; rgb controller.c. I figure it’ll be useful to define different shades of colors than just the standard RED, BLUE and GREEN. I updated the lcd code with a bar graph function for the slide controls, so you’ll need that;320×240 LCD.c & 320×240 LCD.h. The touchscreen code is the same as before.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: