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
/** | |
* Cabezal de lectura de la máquina. | |
* | |
* Programa para el bloque rotador. Es desde este bloque desde donde se controla | |
* la operación de toda la máquina: sube o baja el sensor de luz para leer | |
* o escribir en la cinta; con su valor de bloque controla la dirección de las | |
* los motores. | |
*/ | |
#include "cubelet.h" |
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
#include "cubelet.h" | |
/** | |
* Sensor izquierdo: 88467 | |
* Sensor centro: 88373 | |
* Sensor derecho: 83755 | |
*/ | |
void setup() | |
{ |
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
// Program for the wire: a flashlight cube. | |
#include "cubelet.h" | |
void setup() { | |
block_value = 0; | |
} | |
void loop() { | |
if (weighted_average() >= 128) { |
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
#include "cubelet.h" | |
void setup() { | |
block_value = 0; | |
} | |
void loop() { | |
block_value = maximum(); | |
} |
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 |
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
/** | |
* motor.c | |
* Program for the two drive cubes. | |
* CULET: a Turing machine with Cubelets and Lego. | |
*/ | |
#include "cubelet.h" | |
#define CONTROLLER 85562 | |
#define MOTOR_POWER 80 |
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
#include "cubelet.h" | |
#define DOWN_SENSOR 83755 | |
#define UP_SENSOR 88467 | |
#define THRESHOLD_CERCANY 250 | |
#define DESCENT_TIME_ONE 1200 | |
#define DESCENT_TIME_CERO 700 | |
#define POWER_ROTATOR 76 | |
#define POWER_ROTATOR_RISE 75 |
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
#include "cubelet.h" | |
#define DOWN_SENSOR 83755 | |
#define UP_SENSOR 88467 | |
#define THRESHOLD_CERCANY 250 | |
#define DESCENT_TIME_ONE 1200 | |
#define DESCENT_TIME_CERO 700 | |
#define POWER_ROTATOR 76 | |
#define POWER_ROTATOR_RISE 75 |
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
{ | |
"states": [ | |
"s1", | |
"s2", | |
"s3", | |
"s4", | |
"s5", | |
"s6" | |
], | |
"initial_state": "s1", |
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
{ | |
"states": [ | |
"S_x0", | |
"S_01", | |
"S_11", | |
"S_L", | |
"T_x0", | |
"T_01", | |
"T_11" | |
], |
NewerOlder