Stuck when trying to write a sketch for the Grove 5-Way Switch

I am having hard time to write a sketch using the Grove 5 way Switch.
What I am trying to achieve: I want to use the switch as a pad to navigate a menu on a LCD screen (with the left and right keys) and changing some variables (with the up and down one).
For the time being I simply try to change the values of one variable using the Up and Down keys…
I am trying to use the sketch provided as an example and to tweak it to fit my needs, but I don’t have any success in my attempts.
I know I am missing something because and I have to admit I don’t understand very well how the sketch provided as example, is working.
I past here the sketch I am trying to write.
Can somebody can be so kind as to point me in the write direction?
Thank you very much for your time and your help
With Kind Regards
My Code:
#include <Wire.h>
#include “rgb_lcd.h”
#include “Grove_Multi_Switch.h”

rgb_lcd lcd;
GroveMultiSwitch mswitch[1];
unsigned char cycles = 0;

int deviceDetect(void) {
if (!mswitch->begin()) {
return -1;
// enable event detection
return 0;
void setup() {
lcd.begin(16, 2);
// Initial device probe
if (deviceDetect() < 0) {
for (;;);
void loop() {
GroveMultiSwitch::ButtonEvent_t* evt;
evt = mswitch->getEvent();
if (!evt) {
// dynamic device probe

if (!(evt->event & GroveMultiSwitch::BTN_EV_HAS_EVENT)) {
#if 0

if (evt->button[0] && GroveMultiSwitch::BTN_EV_RAW_STATUS == LOW) {
cycles = cycles + 1;
if (evt->button[2] && GroveMultiSwitch::BTN_EV_RAW_STATUS == LOW) {
cycles = cycles - 1;
lcd.setCursor(1, 0);
lcd.print("Sequences: ");