Skip to content

Instantly share code, notes, and snippets.

AJ Alves zerokol

View GitHub Profile
@zerokol
zerokol / arduino_advanced_sample.ino
Created Mar 1, 2019
Advanced Sample of eFFL with Arduino
View arduino_advanced_sample.ino
#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
@zerokol
zerokol / arduino_simple_sample.ino
Last active Mar 3, 2019
Simple Sample of eFLL with Arduino
View arduino_simple_sample.ino
#include <Fuzzy.h>
// Instantiating a Fuzzy object
Fuzzy *fuzzy = new Fuzzy();
void setup()
{
// Set the Serial output
Serial.begin(9600);
// Set a random seed
View person-test.cpp
// 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";
View Person.cpp
/*
Implementation of Person class: Person.cpp
*/
#include "Person.h"
Person::Person(){};
void Person::setName(string name){
this->name = name;
View Person.h
/*
Definition on Person class: Person.h
*/
#ifndef PERSON_H
#define PERSON_H
#include "string"
using std::string;
class Person
View pessoa-teste.cpp
// 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";
View Pessoa.cpp
/*
Implementação da classe Pessoa: Pessoa.cpp
*/
#include "Pessoa.h"
Pessoa::Pessoa(){};
void Pessoa::setNome(string nome)
{
View Pessoa.h
/*
Definição da classe Pessoa: Pessoa.h
*/
#ifndef PESSOA_H
#define PESSOA_H
#include "string"
using std::string;
class Pessoa
@zerokol
zerokol / test_nrf24l01_nodemcu_receiver.ino
Created Aug 12, 2018
To test NodeMCU as a receiver, conected with nRF24L01
View test_nrf24l01_nodemcu_receiver.ino
/*
* 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);
@zerokol
zerokol / nrf24l01-receiver-test.ino
Last active Aug 9, 2018
Code to test nRF24L01 with Arduino (Receiver)
View nrf24l01-receiver-test.ino
/*
* 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);
You can’t perform that action at this time.