void BlackBoxApp::draw() { toogleRGB(); if(noEffects) return; ofPushMatrix(); ofTranslate(ofGetWidth() / 2, ofGetHeight() / 2); switch (drawMethod) { case 1: rotationPointCloud += (kbControlEase - rotationPointCloud)/ease; ofRotateY(rotationPointCloud); zoom += (kbZoom - zoom) / ease; ofScale(400 * zoom, 400 * zoom, 400 * zoom); drawPointCloud(); break; case 2: zoom += (kbZoom - zoom) / ease; ofScale(400 * zoom, 400 * zoom, 400 * zoom); drawCircleCloud(); break; case 3: ofScale(400, 400, 400); drawParticlesCloud(); break; case 4: ofScale(1000, 1000, 1000); drawPixels(); break; case 5: drawTriangleLines(); break; case 6: drawLaser(); break; case 7: drawContour(); break; case 8: drawTriangleColor(); break; case 9: drawTriangleBlue(); break; } ofPopMatrix(); ofSetColor(255, 255, 255); string showrgbString = "showRGB: "+ofToString(showRGB, 2); }
/** \brief Main function * * This is the main entry point of the software. * * \returns 0 * * \remarks This function never returns. Return value is only to avoid compiler * warnings or errors. */ int main(void) { InitLed(); InitTeclas(); uint32_t i; edu_ciaa_ledRGB RGB; edu_ciaa_key mi_key; apagarLed(rojo); apagarLed(amarillo); apagarLed(verde); RGB.LEDrojo=ENCENDIDO; RGB.LEDverde=ENCENDIDO; RGB.LEDazul=ENCENDIDO; /* perform the needed initialization here */ while(1) { leerTeclas(& mi_key); for (i=PERIODO; i!=0; i--) { asm ("nop"); } if(mi_key.Tecla_1==PULSADO) { toogleRGB(& RGB); } if(mi_key.Tecla_2==PULSADO) { toogle(rojo); } if(mi_key.Tecla_3==PULSADO) { toogle(amarillo); } if(mi_key.Tecla_4==PULSADO) { toogle(verde); } /* add your code here */ } return 0; }/*este es el del main*/
/** \brief Main function * * This is the main entry point of the software. * * \returns 0 * * \remarks This function never returns. Return value is only to avoid compiler * warnings or errors. */ int main(void) { uint32_t i; edu_ciaa_ledRGB RGB; InitLed(); prenderLed(rojo); apagarLed(rojo); apagarLed(amarillo); apagarLed(verde); apagarRGB(& RGB); /* perform the needed initialization here */ while(1) { toogle(amarillo); RGB.LEDrojo=ENCENDIDO; RGB.LEDverde=APAGADO; RGB.LEDazul=APAGADO; for (i=PERIODO; i!=0; i--) { asm ("nop"); } toogleRGB(& RGB); RGB.LEDrojo=APAGADO; RGB.LEDverde=ENCENDIDO; RGB.LEDazul=APAGADO; for (i=PERIODO; i!=0; i--) { asm ("nop"); } toogleRGB(& RGB); RGB.LEDrojo=APAGADO; RGB.LEDverde=APAGADO; RGB.LEDazul=ENCENDIDO; for (i=PERIODO; i!=0; i--) { asm ("nop"); } toogleRGB(& RGB); } return 0; }/*este es el del mail*/