Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Digistump/attiny85 compiling #54

Open
saddys opened this issue Mar 3, 2021 · 2 comments
Open

Error with Digistump/attiny85 compiling #54

saddys opened this issue Mar 3, 2021 · 2 comments

Comments

@saddys
Copy link

saddys commented Mar 3, 2021

Error with Digistump/attiny85 compiling. Any suggest? Thanks!

C:\Users\utente\Documents\Arduino\libraries\EasyButton\src\EasyButton.cpp: In member function 'bool EasyButton::supportsInterrupt()':
C:\Users\utente\Documents\Arduino\libraries\EasyButton\src\EasyButton.cpp:99:36: error: 'digitalPinToInterrupt' was not declared in this scope
return (digitalPinToInterrupt(_pin) != NOT_AN_INTERRUPT);
^
C:\Users\utente\Documents\Arduino\libraries\EasyButton\src\EasyButton.cpp: In member function 'void EasyButton::enableInterrupt(EasyButtonBase::callback_t)':
C:\Users\utente\Documents\Arduino\libraries\EasyButton\src\EasyButton.cpp:104:44: error: 'digitalPinToInterrupt' was not declared in this scope
attachInterrupt(digitalPinToInterrupt(_pin), callback, CHANGE);
^
C:\Users\utente\Documents\Arduino\libraries\EasyButton\src\EasyButton.cpp: In member function 'void EasyButton::disableInterrupt()':
C:\Users\utente\Documents\Arduino\libraries\EasyButton\src\EasyButton.cpp:110:44: error: 'digitalPinToInterrupt' was not declared in this scope
detachInterrupt(digitalPinToInterrupt(_pin));
^
C:\Users\utente\Documents\Arduino\libraries\EasyButton\src\EasyButtonBase.cpp: In member function 'void EasyButtonBase::_checkPressedTime()':
C:\Users\utente\Documents\Arduino\libraries\EasyButton\src\EasyButtonBase.cpp:71:23: error: range-based 'for' loops are not allowed in C++98 mode
for (Sequence seq : _sequences)
^

@TheLastGimbus
Copy link

This dosn't let me use this library at all on Attiny. Could someone take a look?

@TheLastGimbus
Copy link

I added a hack in my fork. You can use it with platformio like:

[env:digispark-tiny]
platform = atmelavr
board = digispark-tiny
framework = arduino
lib_deps = 
	...
	git+git://github.com/TheLastGimbus/EasyButton#attiny85-hack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants