arielnh56 / ace128 Goto Github PK
View Code? Open in Web Editor NEWArduino library for Bourns 128 position Absolute Contacting Encoder
License: MIT License
Arduino library for Bourns 128 position Absolute Contacting Encoder
License: MIT License
I am trying to test the I2C capability with the correct PCF8574 board, but even when I try to compile the example ino file I get an error of:
no matching function for call to 'ACE128::ACE128(int, uint8_t*)'
Can anyone explain what is happening? I have not changed or edited the file at all. I would assume it would compile just fine.
Sometimes gives a result one turn off. Tip of master fixes, but not fully tested.
The Sketch ACE128pintest can not be compiled with Version 2.0.0
Error Message: no matching function for call to 'ACE128::ACE128(int, int, int, int, int, int, int, int, uint8_t*)'
With Version 1.7.0 it works
I ordered an ACE128 QWIIC module here. I choose the option 0x38-0x3F with 2K EEPROM.
The product arrived and It says on the package:
ACE-128 QWIIC
0x38 EEPROM
So far so good.
Unfortunately I can't get it to run on my SAMD21 board.
When I run the SW, there are just no encoder values printed on to the Serial bus.
My Serial settings are: baud 9600, Carriage return
As read somewhere, I have to set the correct flag inside the ACE128.h
library file:
Here is what I uncommented inside ACE128.h
file (this is the only mutation I did).
#define ACE128_EEPROM_I2C // I2C EEPROM - e.g. Microchip 24CW160T
Does anybody know why the encoder does not spit out any value on my SAMD21 Serial ???
As you can see in my Arduino code below, I work with
#define ACE_ADDR 0x38
And I use the following initializer:
ACE128 myACE(ACE_ADDR, (uint8_t*)encoderMap_87654321, 0); // I2C using EEPROM address 0
Not sure what I do wrong by having those settings in place.
Any idea ???
Here is my entire Arduino code:
// PCF8574A 0x38
#define ACE_ADDR 0x38
#include <ACE128.h> // Include the ACE128.h from the library folder
#include <ACE128map87654321.h> // mapping for pin order 87654321
// ACE128 myACE(ACE_ADDR, (uint8_t*)encoderMap_87654321); // I2C without using EEPROM
// ?????????????????? NOT SURE WHAT TO CHOOSE HERE EXACTLY ????????????????????????????????
ACE128 myACE(ACE_ADDR, (uint8_t*)encoderMap_87654321, 0); // I2C using EEPROM address 0
uint8_t oldPos = 255;
uint8_t upos;
int8_t pos;
int16_t mpos;
void setup() {
Serial.begin(9600);
myACE.begin(); // this is required for each instance, initializes the pins
}
void loop() {
pos = myACE.pos(); // get logical position - signed -64 to +63
upos = myACE.upos(); // get logical position - unsigned 0 to +127
mpos = myACE.mpos(); // get multiturn position - signed -32768 to +32767
if (upos != oldPos) { // did we move?
oldPos = upos; // remember where we are
Serial.print(" pos ");
Serial.print(pos, DEC);
Serial.print(" upos ");
Serial.print(upos, DEC);
Serial.print(" mpos ");
Serial.println(mpos, DEC);
}
}
The wiring is simply done by using the QT connector on the SAMD board connected to the ACE128 QWIIC module.
I'm having an issue with the code from the example to start the loop after the setup instruction. I'm new to Arduino and decided to try this example out. The issue I'm having is when I upload, the LCD displays "Looking for pins" "Turn ACE128". When I turn it nothing changed on the LCD. I have the circuit set up exactly as in the example. Also I do not know much about mapping the pin locations, I think this may be related. Any help is appreciated, thanks!
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.