This file contains hidden or 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 <Arduino.h> | |
| #include <SPI.h> | |
| #include <Ethernet2.h> | |
| #include <PubSubClient.h> | |
| #include <ArduinoJson.h> | |
| #include <DFRobot_ADS1115.h> | |
| DFRobot_ADS1115 ads(&Wire); | |
| // Update these with values suitable for your network. | 
  
    
      This file contains hidden or 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 <Arduino.h> | |
| #include <ArduinoJson.h> | |
| #include <EEPROM.h> | |
| #include <StreamUtils.h> | |
| #include <Update.h> | |
| #ifdef DEBUG | |
| #define DEBUG_PRINT(x) //Serial.print(x) | |
| #define DEBUG_PRINTLN(x) //Serial.println(x) | |
| #else | 
  
    
      This file contains hidden or 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 <Wire.h> | |
| #include "ClosedCube_HDC1080.h" | |
| #define PWRPIN 26 | |
| #define RSTPIN 27 | |
| #define LEDPIN 2 | |
| #define SENSES_ID 178 | |
| #define SENSES_KEY "g9plf6uynqd7" | |
| #define SENSES_SLOT 1 | 
  
    
      This file contains hidden or 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 pin usage | |
| #define IN1 2 | |
| #define IN2 4 | |
| void setPWM(int ch, int duty) { | |
| //map value from 0-100 to 0-1023 | |
| int new_duty = map(duty, 0, 100, 0, 1023); | |
| ledcWrite(ch, new_duty); | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | //download lib from Library Manager Search ESP32 Servo | |
| #include <ESP32Servo.h> | |
| Servo myservo; // create servo object to control a servo | |
| // 16 servo objects can be created on the ESP32 | |
| int pos = 0; // variable to store the servo position | |
| // Recommended PWM GPIO pins on the ESP32 include 2,4,12-19,21-23,25-27,32-33 | |
| int servoPin = 22; | 
  
    
      This file contains hidden or 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 <Adafruit_NeoPixel.h>//Adafruit neopixel | |
| #define PIXELPIN 6 // connect to DI pin on LED Ring | |
| #define NUMPIXELS 16 | |
| //Neopixel Ring Vcc to 5V ,Gnd to Gnd and DI to pin PIXELPIN define above | |
| Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMPIXELS, PIXELPIN, NEO_GRB + NEO_KHZ800); | |
| void setup() { | |
| strip.begin(); | |
| strip.show(); // Initialize all pixels to 'off' | 
  
    
      This file contains hidden or 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 <WiFiClientSecure.h> | |
| #include <ArduinoJson.h>//Arduinojson By Benoit Blanchon version "5.13.5" | |
| const char* ssid = "...@ makerlab"; // your network SSID (name of wifi network) | |
| const char* password = "@Pinnqwerty"; // your network password | |
| const char* server = "www.aismagellan.io"; // Server URL | |
| String tokenID= "90b411d0-87e9-11e8-9738-71bdb0d8f3b4";//token ID from aismagellan | |
| String readString = String(100); | 
  
    
      This file contains hidden or 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
    
  
  
    
  | /* | |
| Basic ESP8266 MQTT example | |
| This sketch demonstrates the capabilities of the pubsub library in combination | |
| with the ESP8266 board/library. | |
| It connects to an MQTT server then: | |
| - publishes "hello world" to the topic "outTopic" every two seconds | |
| - subscribes to the topic "inTopic", printing out any messages | |
| it receives. NB - it assumes the received payloads are strings not binary | 
  
    
      This file contains hidden or 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
    
  
  
    
  | /* | |
| Basic ESP8266 MQTT example | |
| This sketch demonstrates the capabilities of the pubsub library in combination | |
| with the ESP8266 board/library. | |
| It connects to an MQTT server then: | |
| - publishes "hello world" to the topic "outTopic" every two seconds | |
| - subscribes to the topic "inTopic", printing out any messages | |
| it receives. NB - it assumes the received payloads are strings not binary | 
  
    
      This file contains hidden or 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
    
  
  
    
  | /* | |
| Basic ESP8266 MQTT example | |
| This sketch demonstrates the capabilities of the pubsub library in combination | |
| with the ESP8266 board/library. | |
| It connects to an MQTT server then: | |
| - publishes "hello world" to the topic "outTopic" every two seconds | |
| - subscribes to the topic "inTopic", printing out any messages | |
| it receives. NB - it assumes the received payloads are strings not binary | 
NewerOlder