Skip to content

Instantly share code, notes, and snippets.

@KEVINALBO13
KEVINALBO13 / CODIGOBRASO.INO
Created October 14, 2019 03:39
CODIGO BRASO REAL ALSW
#include <Servo.h>
int PinServo[5] = {A0, A1, A2, A3, A4};
int Pmax[5] = {140, 160, 160, 160, 20};
int Pmin[5] = {40, 0, 0, 20, 160};
int Pactual[5] = {90, 90, 90, 90, 90};
int Ppasado[5] = {90, 90, 90, 90, 90};
Servo Dedo[5];
int VMaxSensor = 0;
#include <Servo.h>
int PinServo[5] = {A0, A1, A2, A3, A4}; //A4 MEÑIQUE,A3 ANULAR,A2 MEDIO,A1 INDICE,A0 PALMA
int Pmax[5] = {140, 160, 160, 160, 160};
int Pmin[5] = {40, 0, 0, 20, 20};
int Pactual[5] = {90, 90, 90, 90, 90};
Servo Dedo[5];
int PinSensor = A5;
int VMaxSensor = 0;
modified 8 Nov 2013
by Scott Fitzgerald
http://www.arduino.cc/en/Tutorial/Sweep
*/
#include <Servo.h>
int PinServo[5] = {A0, A1, A2, A3,
};
Servo Dedo[5];
#ifdef ARDUINO_ARCH_ESP32
#include <WiFi.h>
#include <WiFiMulti.h>
WiFiMulti wifiMulti;
#else
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
ESP8266WiFiMulti wifiMulti;
#endif
#include "PCD8544.h"
#ifdef ARDUINO_ARCH_ESP32
#include <WiFi.h>
#include <WiFiMulti.h>
WiFiMulti wifiMulti;
#else
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
ESP8266WiFiMulti wifiMulti;
#endif
#ifdef ARDUINO_ARCH_ESP32
#include <WiFi.h>
#include <WiFiMulti.h>
WiFiMulti wifiMulti;
#else
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
ESP8266WiFiMulti wifiMulti;
#endif
@KEVINALBO13
KEVINALBO13 / Motor.ino
Created October 12, 2018 16:48
MOTOR NEMA 23
#include <Servo.h>
#include <WiFi.h>
#include <WiFiMulti.h>
#include <PubSubClient.h>
const char* ssid = "No Es De Choto";
const char* password = "99568550";
const char* mqtt_server = "iot.eclipse.org";
int mqtt_port = 1883;
@KEVINALBO13
KEVINALBO13 / PRUEBAHTML.INO
Created September 14, 2018 02:11
PRUEBA.HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="https://raw.githubusercontent.com/eclipse/paho.mqtt.javascript/master/src/paho-mqtt.js" type="text/javascript"></script>
<script src="./mqtt.js" type="text/javascript"></script
<title>MQTT Demo</title>
</head>
<body>
<h1>MQTT is awesome!</h1>
@KEVINALBO13
KEVINALBO13 / MQTT.INO
Created September 14, 2018 02:10
MQTT.JS
// Create a client instance
var client = new Paho.MQTT.Client('test.mosquitto.org', 1883, "clientId");
// set callback handlers
client.onConnectionLost = onConnectionLost;
client.onMessageArrived = onMessageArrived;
// connect the client
client.connect({onSuccess:onConnect});
@KEVINALBO13
KEVINALBO13 / itexsal.ino
Last active September 13, 2018 22:57
CODIGO BASE DE PROYECTO 13/9/2018
#include <Servo.h>
#include <WiFi.h>
#include <PubSubClient.h>
const char* ssid = "ALSW";
const char* password = "2526-4897";
const char* mqtt_server = "test.mosquitto.org";
int mqtt_port = 1883;
WiFiClient espClient;