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 <unistd.h> | |
#include "sdkconfig.h" | |
#include "driver/gpio.h" | |
#define pinLED 4 | |
#define ALTO 1 | |
#define BAJO 0 | |
double tiempoBajo = 0.1; |
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
/* UART Echo Example | |
This example code is in the Public Domain (or CC0 licensed, at your option.) | |
Unless required by applicable law or agreed to in writing, this | |
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | |
CONDITIONS OF ANY KIND, either express or implied. | |
*/ | |
#include <stdio.h> | |
#include <unistd.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 <stdio.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
#include <unistd.h> | |
#include "freertos/FreeRTOS.h" | |
#include "freertos/task.h" | |
#include "driver/gpio.h" | |
#include "esp_log.h" | |
#include "sdkconfig.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 <stdio.h> | |
#include <stdbool.h> | |
#include <unistd.h> | |
#include "freertos/FreeRTOS.h" | |
#include "freertos/task.h" | |
#include "driver/gpio.h" | |
#include "esp_log.h" | |
#include "sdkconfig.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
/* | |
* | |
Ejemplo en c++ para el uso del ADS1115 con un shield de adc de 4 canales para la raspberry PI 4 mas 4 entradas para PLC | |
Ruben Estrada Marmolejo. ruben.estrada@hetpro.com.mx | |
https://hetpro-store.com/shield-24v-para-raspberry-mas-adc-4ch | |
* Original: | |
https://github.com/WiringPi/WiringPi/blob/master/wiringPi/ads1115.c | |
* Para compilar: g++ -W -o ads1115 ads1115-wiringPi.cpp -lwiringPi | |
* Para ejecutar: ./ads1115 | |
* |
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
/* | |
Dr. Ruben Estrada Marmolejo | |
ruben.estrada@hetpro.com.mx | |
*/ | |
#include <HardwareSerial.cpp> | |
#include <IWatchdog.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
/* | |
* | |
Ejemplo en c++ para el uso del MCP23017 con un shield de relevadores 8ch para la Raspberry PI 4 | |
Ruben Estrada Marmolejo. ruben.estrada@hetpro.com.mx | |
https://hetpro-store.com/shield-relevadores-10a-para-raspberry/ | |
* Original: http://wiringpi.com/extensions/i2c-mcp23008-mcp23017/ | |
* Para compilar: g++ -W -o mcp23017-2 mcp23017-30A.cpp -lwiringPi | |
* Para ejecutar: ./mcp23017-2 | |
* |
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
/* | |
* | |
Ejemplo en c++ para el uso del ADS1115 con un shield de adc de 4 canales para la raspberry PI 4 | |
Ruben Estrada Marmolejo. ruben.estrada@hetpro.com.mx | |
https://hetpro-store.com/shield-adc-4ch-para-raspberry | |
* Original: | |
https://github.com/WiringPi/WiringPi/blob/master/wiringPi/ads1115.c | |
* Para compilar: g++ -W -o ads1115 ads1115-wiringPi.cpp -lwiringPi | |
* Para ejecutar: ./ads1115 | |
* |
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
/* | |
* | |
Ejemplo en c++ para el uso del MCP23017 con un shield de relevadores 8ch para la Raspberry PI 4 | |
Ruben Estrada Marmolejo. ruben.estrada@hetpro.com.mx | |
https://hetpro-store.com/shield-relevadores-10a-para-raspberry/ | |
* Original: http://wiringpi.com/extensions/i2c-mcp23008-mcp23017/ | |
* Para compilar: g++ -W -o mcp23017 mcp23017.cpp -lwiringPi | |
* Para ejecutar: ./mcp23017 | |
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
#define sensorTemperatura 34 | |
#define nSLEEP 13 //En Arduino pin8 | |
#define STEP 12 //En Arduino pin9 | |
#define DIR 14 //En Arduino pin10 | |
#define NENBL 27 //En Arduino pin11 | |
#define M1 26 //En Arduino pin12 | |
volatile double voltajeSensor = 0; | |
volatile uint16_t paso = 0; | |
volatile long int numeroPasos = 0; |