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
    
  
  
    
  | import serial | |
| porta = "/dev/ttyACM0" | |
| baud = 9600 | |
| arquivo = "logger.csv" | |
| ser = serial.Serial(porta,baud) | |
| ser.flushInput() | |
| print("Abrindo Serial") | |
| amostra = 10 | 
  
    
      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
    
  
  
    
  | // Adafruit IO Subscription Example | |
| // | |
| // Adafruit invests time and resources providing this open source code. | |
| // Please support Adafruit and open source hardware by purchasing | |
| // products from Adafruit! | |
| // | |
| // Written by Todd Treece for Adafruit Industries | |
| // Copyright (c) 2016 Adafruit Industries | |
| // Licensed under the MIT license. | |
| // | 
  
    
      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 <ESP8266WiFi.h> | |
| const byte LAMP1 = 16; | |
| const byte LAMP2 = 5; | |
| const byte LAMP3 = 4; | |
| const byte LAMP4 = 0; | |
| const byte LAMP5 = 2; | |
| const byte LAMP6 = 14; | |
| const byte LAMP7 = 12; | |
| const byte LAMP8 = 13; | 
  
    
      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
    
  
  
    
  | //Teste LCD Keypad Shield | |
| //Por Fábio Souza | |
| // biblioteca para LCD | |
| #include <LiquidCrystal.h> | |
| //Instancia do LCD | |
| LiquidCrystal lcd(8, 9, 4, 5, 6, 7); | 
  
    
      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
    
  
  
    
  | /**************************************************** | |
| Contador simples de 2 digitos | |
| Exemplo para uso de I/Os no AVR | |
| ****************************************************/ | |
| #include <avr/io.h> | |
| #include <util/delay.h> | |
| // MACROS | |
| #define setBit(valor,bit) (valor |= (1<<bit)) | 
  
    
      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 <LiquidCrystal.h> | |
| LiquidCrystal lcd(2, 3, 4, 5, 6, 7); | |
| int errorLED = 13; | |
| String ssid = "Simulator Wifi"; // Nome da rede wifi simulada | |
| String password = ""; //o simulador de wifi nao tem uma senha | |
| String host = "api.thingspeak.com"; // Thingspeak API | |
| const int httpPort = 80; //porta http | 
  
    
      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 os pinos utilizados na comunicação com o ESP8266 | |
| #define PINO_ESP8266_RESET 7 // Inicializa o ESP8266 | |
| #define PINO_ESP8266_ATIVAR 8 // Ativa o ESP8266 | |
| #define ESP8266_RESET LOW | |
| #define ESP8266_ATIVAR HIGH | |
| #define ESP8266_BAUDRATE 115200 | |
| void setup() | 
  
    
      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
    
  
  
    
  | /* | |
| Exemplo para escrita em display de 7 segmentos | |
| */ | |
| //definição dos pinos | |
| #define A 2 | |
| #define B 3 | |
| #define C 4 | 
  
    
      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
    
  
  
    
  | //Acionamento de 2 lampada e leitura do DHT11 com MQTT Dash | |
| //Por: Fábio Souza | |
| //Data: 19/06/19 | |
| #include <ESP8266WiFi.h> | |
| #include <PubSubClient.h> | |
| #include "DHT.h" | |
| #define INTERVALO_ENVIO_DHT 20000 | 
  
    
      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
    
  
  
    
  | /* | |
| * Curso - Controle dispositivos remotamente com ESP8266 | |
| * Por: Fábio Souza | |
| * | |
| * Web Server - Entrada e Saida Digital | |
| * Faz a o acionamento de Saida digital através de botão em página HTML com CSS e a Leitura do estado de uma entrada Digital | |
| */ | |
| #include <ESP8266WiFi.h> |