Created
December 31, 2018 07:50
-
-
Save RQF7/4027f2e6d6e03052beefd8bc0337ee91 to your computer and use it in GitHub Desktop.
Flashlight program for CULET. http://www.comunidad.escom.ipn.mx/ALIROB/CULET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* led.c | |
* Program for the light cube. | |
* CULET: a Turing machine with Cubelets and Lego. | |
*/ | |
#include "cubelet.h" | |
#define CONTROLLER 85562 | |
void setup() | |
{ | |
block_value = 0; | |
} | |
void loop() | |
{ | |
uint8_t instruction = get_block_value(CONTROLLER); | |
if (instruction == 0) { | |
set_flashlight(255); | |
} else { | |
set_flashlight(0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment