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
#include <Fuzzy.h> | |
// Instantiating a Fuzzy object | |
Fuzzy *fuzzy = new Fuzzy(); | |
void setup() | |
{ | |
// Set the Serial output | |
Serial.begin(9600); | |
// Set a random seed |
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) | |
{ |
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
/* | |
Definição da classe Pessoa: Pessoa.h | |
*/ | |
#ifndef PESSOA_H | |
#define PESSOA_H | |
#include "string" | |
using std::string; | |
class Pessoa |
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) | |
*/ | |
#include <SPI.h> | |
#include "nRF24L01.h" | |
#include "RF24.h" | |
// Instantiate RF24 class with CE and CSN values | |
RF24 radio(2, 15); |
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) | |
*/ | |
#include <SPI.h> | |
#include "nRF24L01.h" | |
#include "RF24.h" | |
// Instantiate RF24 class with CE and CSN values | |
RF24 radio(9, 10); |