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

PORTB' was not declared in this scope #24

Open
cinehorse opened this issue Mar 11, 2022 · 1 comment
Open

PORTB' was not declared in this scope #24

cinehorse opened this issue Mar 11, 2022 · 1 comment

Comments

@cinehorse
Copy link

I get this failure

In file included from sketch\panTiltMount.cpp:11:
C:\Program Files (x86)\Arduino\libraries\Bridge\src/YunClient.h:24:2: warning: #warning "The use of YunClient is deprecated. Use BridgeClient instead!" [-Wcpp]
#warning "The use of YunClient is deprecated. Use BridgeClient instead!"
^~~~~~~
In file included from sketch\panTiltMount.cpp:12:
C:\Program Files (x86)\Arduino\libraries\Bridge\src/YunServer.h:24:2: warning: #warning "The use of YunServer is deprecated. Use BridgeServer instead!" [-Wcpp]
#warning "The use of YunServer is deprecated. Use BridgeServer instead!"
^~~~~~~

sketch\panTiltMount.cpp: In function 'void setStepMode(int)':
panTiltMount.cpp:144:9: error: 'PORTB' was not declared in this scope

     PORTB |=   B00001000; //MS1 high

     ^~~~~

panTiltMount.cpp:148:9: error: 'PORTB' was not declared in this scope

     PORTB |=   B00000100; //MS2 high

     ^~~~~

panTiltMount.cpp:152:9: error: 'PORTB' was not declared in this scope

     PORTB &= ~(B00001100); //MS1 and MS2 low

     ^~~~~

panTiltMount.cpp:155:9: error: 'PORTB' was not declared in this scope

     PORTB |= B00001100; //MS1 and MS2 high

     ^~~~~

sketch\panTiltMount.cpp: In function 'int setTargetPositions(float, float, float)':

sketch\panTiltMount.cpp:291:1: warning: no return statement in function returning non-void [-Wreturn-type]

}

^

exit status 1

'PORTB' was not declared in this scope /* <--- was is PORTB for a declaration?

@cbradburne
Copy link

Are you sure you've selected the Arduino Nano as the board?

From the error "The use of YunClient..." it looks like you've got the Arduino Yun selected instead.

I've just downloaded the current build, added the library files to the Arduino library folder, selected the Arduino Nano, and it compiled first time.

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