Skip to content

Instantly share code, notes, and snippets.

View zeliatomazini's full-sized avatar

zeliatomazini

View GitHub Profile
@zeliatomazini
zeliatomazini / I2Cdev.cpp
Created December 1, 2016 10:40
Bibliotecas para o projeto pêndulo invertido: I2Cdev
// I2Cdev library collection - Main I2C device class
// Abstracts bit and byte I2C R/W functions into a convenient class
// 2013-06-05 by Jeff Rowberg <jeff@rowberg.net>
//
// Changelog:
// 2013-05-06 - add Francesco Ferrara's Fastwire v0.24 implementation with small modifications
// 2013-05-05 - fix issue with writing bit values to words (Sasquatch/Farzanegan)
// 2012-06-09 - fix major issue with reading > 32 bytes at a time with Arduino Wire
// - add compiler warnings when using outdated or IDE or limited I2Cdev implementation
// 2011-11-01 - fix write*Bits mask calculation (thanks sasquatch @ Arduino forums)
@zeliatomazini
zeliatomazini / LMotorController.h
Created December 1, 2016 10:36
Bibliotecas para o projeto pêndulo invertido: Motor Controle - L293D (ponte H)
#ifndef LMotorController_h
#define LMotorController_h
#include "Arduino.h"
class LMotorController
{
protected:
@zeliatomazini
zeliatomazini / MPU6050.cpp
Created December 1, 2016 10:31
Bibliotecas para o projeto pêndulo invertido: MPU6050
// I2Cdev library collection - MPU6050 I2C device class
// Based on InvenSense MPU-6050 register map document rev. 2.0, 5/19/2011 (RM-MPU-6000A-00)
// 8/24/2011 by Jeff Rowberg <jeff@rowberg.net>
// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib
//
// Changelog:
// ... - ongoing debug release
// NOTE: THIS IS ONLY A PARIAL RELEASE. THIS DEVICE CLASS IS CURRENTLY UNDERGOING ACTIVE
// DEVELOPMENT AND IS STILL MISSING SOME IMPORTANT FEATURES. PLEASE KEEP THIS IN MIND IF
@zeliatomazini
zeliatomazini / PID_v1.cpp
Last active December 1, 2016 10:26
Bibliotecas para o projeto pêndulo invertido: PID
/**********************************************************************************************
* Arduino PID Library - Version 1.0.1
* by Brett Beauregard <br3ttb@gmail.com> brettbeauregard.com
*
* This Library is licensed under a GPLv3 License
**********************************************************************************************/
#if ARDUINO >= 100
#include "Arduino.h"
#else
@zeliatomazini
zeliatomazini / Pêndulo Invertido
Created November 30, 2016 12:08
Instituto Federal do Espirito Santo - Campus Guarapari/Eletrotécnica (ELIG3M), Projeto da Matéria de Sistemas Digitais.
#include <PID_v1.h>
#include <LMotorController.h>
#include <I2Cdev.h>
#include "MPU6050_6Axis_MotionApps20.h"
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include "Wire.h"
#endif