Paso 2: compilar
Modificar el testMakefile:
LIBS=-L../../sample/core -larduino -lspiINCS=-I../../sample/core/include TARGET=../../sample/test OBJS = io_test adc_test pwm_test spi_test adxl345_test MQ2 all: $(OBJS) -p $(TARGET) $(OBJS) $(TARGET) io_test: io_test.c $(CC) $(LIBS) $(INCS) < -o $@ MQ2: MQ2.c $(CC) $(LIBS) $(INCS) < -o $@ adc_test: adc_test.c $(CC) $(LIBS) $(INCS) < -o $@ pwm_test: pwm_test.c $(CC) $(LIBS) $(INCS) < -o $@ spi_test: spi_test.c $(CC) $(LIBS) $(INCS) < -o $@ adxl345_test: adxl345_test.c $(CC) < -o $@ clean: i in $(OBJS); do rm -f $(TARGET)/$$i; done
MQ2: MQ2.c es un nuevo programa
Para abrir un archivo de biblioteca compilada terminal:
ubuntu cd c_enviroment ubuntu $ make