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
/* | |
* AJ Alves (aj.alves@zerokol.com) | |
*/ | |
#define RAIN_ANALOGIC_IN A0 // Arduino's analogic pin | |
#define RAIN_DIGITAL_IN 4 // Arduino's digital pin | |
#define BOARD_RESOLUTION 1024 // The analogic board resolution, for example Arduino Uno is 10 bit (from 0 to 1023) | |
void setup() { | |
Serial.begin(9600); // Serial Port setup |
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
int ledPin = 13; // Arduino' inner led | |
int sigPin = 4; // For sensor signal | |
int value = 0; // Holds the returned value | |
void setup(){ | |
Serial.begin(9600); | |
pinMode(ledPin, OUTPUT); // Arduino's led as output | |
pinMode(sigPin, INPUT); // signal pin as input | |
} | |
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
/* | |
* AJ Alves (aj.alves@zerokol.com) | |
*/ | |
int ANALOG_PIN = A0; // The NodeMCU Analogic Pin | |
int BOARD_RESOLUTION = 1024 ; // The analogic board resolution, for example NodeMCU ESP8266 is 10 bit (from 0 to 1023) | |
int val = 0; // A varaible to hold the value | |
void setup() { | |
Serial.begin(9600); // Serial Port setup | |
} |
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
/* | |
* AJ Alves (aj.alves@zerokol.com) | |
*/ | |
int ANALOG_PIN = A0; // The Arduino Analogic Pin | |
int BOARD_RESOLUTION = 1024 ; // The analogic board resolution, for example Arduino Uno is 10 bit (from 0 to 1023) | |
int val = 0; // A varaible to hold the value | |
void setup() { | |
Serial.begin(9600); // Serial Port setup | |
} |
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 <Fuzzy.h> | |
// For scope, instantiate all objects you will need to access in loop() | |
// It may be just one Fuzzy, but for demonstration, this sample will print | |
// all FuzzySet pertinence | |
// Fuzzy | |
Fuzzy *fuzzy = new Fuzzy(); | |
// FuzzyInput |
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
// Tests file: person-test.cpp | |
#include "Person.h" | |
#include "gtest/gtest.h" | |
#include "string" | |
using std::string; | |
TEST(Person, testNameMethods) | |
{ | |
string name = "AJ O. Alves"; |
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
/* | |
Implementation of Person class: Person.cpp | |
*/ | |
#include "Person.h" | |
Person::Person(){}; | |
void Person::setName(string name){ | |
this->name = name; |
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
/* | |
Definition on Person class: Person.h | |
*/ | |
#ifndef PERSON_H | |
#define PERSON_H | |
#include "string" | |
using std::string; | |
class Person |
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
// Arquivo de testes: pessoa-teste.cpp | |
#include "Pessoa.h" | |
#include "gtest/gtest.h" | |
#include "string" | |
using std::string; | |
TEST(Pessoa, testarMetodosParaNome) | |
{ | |
string nome = "AJ O. Alves"; |
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
/* | |
Implementação da classe Pessoa: Pessoa.cpp | |
*/ | |
#include "Pessoa.h" | |
Pessoa::Pessoa(){}; | |
void Pessoa::setNome(string nome) | |
{ |