eta-systems / max7313-arduino Goto Github PK
View Code? Open in Web Editor NEWArduino Library for the MAX7313 Port Expander
License: MIT License
Arduino Library for the MAX7313 Port Expander
License: MIT License
The function: void digitalWrite(uint8_t num, uint8_t val); in max7313.cpp is missing the "MAX7313::" before the function name.
When Compiling the compiler can not find this function.
Need to add "MAX7313::" to this function then the compiler could find it and the code works.
Hello,
The library is often used by me and I would like to thank you very much for maintaining it!
In my latest project I want to increase the clarity and use tabs in IDE.
So in the main INO the tab is added via #include "file.h".
In other projects I have done this several times.
However, errors occur when copmpiling with this library.
I don't have a complete script yet and hope that the excerpts describe my problem well.
Now the question is am I doing something wrong or is the cause of this error coming from the library?
Main INO:
#include <Wire.h>
#include "MAX7313.h"
#include "shutter.h"
const int16_t ADDR = 0x64;
MAX7313 expander(ADDR);
void setup() {
Serial.begin(115200);
Wire.begin();
expander.begin();
expander.pinMode(0, OUTPUT);
expander.pinMode(10, INPUT);
expander.analogWrite(0, 15);
}
void loop() {
shutter();
}
Shutter.h:
void shutter() {
unsigned long currentMillis = millis();
if (expander.digitalRead(JAL_UP_BUTTON) == LOW && expander.digitalRead(JAL_DOWN_BUTTON) == HIGH && down_int == 0) {
// Abridged
Error:
Compilation error: 'expander' was not declared in this scope
Hi and a big thanks for this library. It works very welll but I havn't got the interrupt to work. I have the MAX7313 INT pin (1) connected to the Raspberry Pi Pico (GPIO 2) with a pullup to 3.3V (as I understand the INT should go low when a change is noticed).
pinMode(2, INPUT_PULLUP);
attachInterrupt(2, trigged, FALLING );
void trigged(){
Serial.println("Change happend!");
}
the max code (to enable interrupt)
pwm.pinMode(8, INPUT);
pwm.pinMode(16, OUTPUT); // Tried without this too
pwm.enableInterrupt();
but nothing happens when I press a button on port 8, if I read the port (digitalRead(8)) I can see when the button is pressed. What am I missing?
Hello, the library is very helpful so far.
However, I have a problem with reading out inputs.
I need a bit mask for the exact evaluation of the inputs.
As it is currently in the library, only a numerical value from 0-255 is output.
Do you have a possibility to improve the whole thing, so that one gets only a simple HIGH or LOW for each input?
Many 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.