greygnome / adaencoder Goto Github PK
View Code? Open in Web Editor NEWLibrary for handling quadrature encoders for the Arduino microcontroller.
Library for handling quadrature encoders for the Arduino microcontroller.
Hi @GreyGnome
As ooPinChangeInt is no longer maintained and your own EnableInterrupt is named as it's replacement, could you update this library to work with EnableInterrupt instead?
I just discovered very strange behaviour in arduino sketch run when libraries AdaEncoder and u8g are used in the same time.
Following testing sketch runs correctly only time after it is written to Atmega328p (ICSP). but only until the AVR is first time turned off. Runs after powercycle seems to hangs in some reset loop in AdaEncoder::addEncoder
.
Reset doesn't cause this, only power on/off cycle.
I tested this with 2 different displays (SPI and I2C), multiple arduinos and bare atmega328p avrs and encoder connected many different pin combination. After power cycle, this program always hangs in 'addEncoder' - it newer comes to setup function (tested with LED on digitalWrite(13, HIGH);)
The strange thing is that it works fine after ICSP programming.
#include "U8glib.h"
#include <ooPinChangeInt.h>
#include <AdaEncoder.h>
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE|U8G_I2C_OPT_DEV_0); // I2C / TWI
AdaEncoder encoderA = AdaEncoder('a', 6, 7);
int8_t clicks=0;
char id=0;
void setup()
{
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
u8g.setColorIndex(1);
}
void loop()
{
u8g.firstPage();
do {
draw();
} while( u8g.nextPage() );
updateClicks();
}
void updateClicks(){
AdaEncoder *thisEncoder=NULL;
thisEncoder=AdaEncoder::genie();
clicks += thisEncoder->query();
}
void draw(void) {
u8g.setFont(u8g_font_unifont);
u8g.setPrintPos(16, 16);
u8g.print(clicks);
}
(tested with lates u8g and ooPinChangeInt libraries)
crappiest library ever
bits are missing and why do you use bytebuffer crap just to print serial in an example
what a waste of time
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.