Home » lcd keypad

Tag: lcd keypad

Arduino AD9850 Control – Reading Button Commands

The main program loop for my Arduino AD9850 control program begins by checking for button commands from the LCD 1602 Keypad. Then it moves on to checking the status of the KY-040 optical encoder. The encoder outputs are translated to equivalent button commands, depending on the direction of turn and closing the push switch. After this, the program moves on to processing the button commands, which tell the signal generator what to do.

void loop()
{
	int btn = BUTTON_NONE;

	/*
	* Get the Inputs. Priority given to LCD Keypad buttons.
	* Turning encoder produces BUTTON_UP or BUTTON_DOWN
	* Pressing encoder switch produces BUTTON_SELECT or BUTTON_SELECTLONG
	*/
	btn = ReadLCDBtn();
	if (btn == BUTTON_NONE) {
		btn = CheckEncoderTurning();
	}
	if (btn == BUTTON_NONE) {
		btn = CheckEncoderSwitch();
	}
	/* Deal with Menu activities, if any */
	btn = ProcessMenu(btn);

 

Read more

Arduino Signal Generator – Hardware and Software

Arduino signal generator

 

The best part about building an Arduino-based project is that you can take a modular approach. As described earlier, my Arduino signal generator involves the integration of a number of modules: Arduino, LCD Keypad, optical encoder and digital signal generator. The most successful approach is usually to get each module working correctly, one function at a time.

In this article, I describe integrating the controls and display.  This involves understanding the hardware, and writing the software to make everything work together.

Read more