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
/* | |
Código para mover servomotores de la cabeza InMoov | |
*/ | |
#include <Servo.h> | |
const int pinJoystickOjosX = A1; | |
const int pinJoystickOjosY = A0; | |
const int pinJoystickCuelloX = A3; | |
const int pinJoystickCuelloY = A2; | |
const int pinJoystickBoca = A4; |
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
/* prueba de la libreria de FFT | |
toma 256 muestras con fmuestreo variable, y a continuacion | |
calcula la FFT. | |
Luego envia 128 muestras por el puerto serie a 9600 baudios | |
*/ | |
# define LIN_OUT 1 //salida lineal en 16 bits de resolucion | |
# define FFT_N 256 //transformada de 256 puntos | |
#include<FFT.h> //incluimos la libreria |
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
import processing.serial.*; | |
Serial myPort; | |
String data; | |
float fm; | |
float mod; | |
float sdat; | |
int cont=0; | |
PFont Ejex, textox; | |
int intensidad = 30; |
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 <Servo.h> | |
int LEDgrande = 3; | |
int sensorPin = A0; | |
int sensorValue= 0; | |
int outputValue= 0.0; | |
float promOutputValue = 0; | |
int pos= 0; | |
int pos_anterior=0; | |
unsigned long Timer; |
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
import java.io.IOException; | |
class VariableComp { | |
private int valor = 0; | |
private boolean disponible = true; | |
public VariableComp (int valorInicial){ | |
valor= valorInicial; | |
} | |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#define BUFSIZE 1028 |
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 <stdio.h> | |
#include <time.h> | |
#include <stdbool.h> | |
bool Contenido (int *p1, int *p2, int tam_p1, int tam_p2, int *indice) { | |
int i,j; | |
bool parcial= false; | |
bool final= false; | |
//bucle para recorrer p1 | |
for (i=0; i<tam_p1; i++){ |
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 <stdio.h> | |
#include <time.h> | |
#include <stdbool.h> | |
bool Contenido (int *p1, int *p2, int tam_p1, int tam_p2) { | |
int i,j; | |
bool parcial= false; | |
bool final= false; | |
for (i=0; i<tam_p1; i++){ | |
//printf("p1[i] =%d, p2[0]=%d \n", p1[i], p2[0]); |
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 <stdio.h> | |
#include <time.h> | |
void copiarArray (int *v2, int *v1, int tamano) { | |
int i; | |
for (i=0; i<tamano; i++){ | |
v2[i]=v1[i]; | |
} | |
} |
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 <stdio.h> | |
main() | |
{ | |
float numero; | |
float total=0.0; | |
int contador=0; | |
float promedio; | |
int i; | |
printf("\n*****Generador de promedios*****\nIntroduzca cada número y presione Enter.\nPara terminar introduzca 0 y presione Enter: \n"); |
NewerOlder