+ case 2:
+ {
+ static bool set = false;
+ int raw_adc = 0;
+ //GPIO_Set(GPIO0_30, true);
+ ADC_Read(ADC0, &raw_adc);
+ d->value = (double)raw_adc; //ADC #0 on the Beaglebone
+ //Log(LOGDEBUG, "Got value %f from ADC0", d->value);
+ //GPIO_Set(GPIO0_30, false);
+ set = !set;
+ //GPIO_Set(GPIO1_28, set);
+
+ usleep(100000);
+
+ break;
+ }
+
+ default:
+ d->value = rand() % 2;
+ usleep(1000000);
+ break;
+
+