isaac879 / Pan-Tilt-Mount

A stepper motor driven, 3D printed and Arduino controlled pan/tilt mount.
MIT License
377 stars 99 forks source link

PORTB' was not declared in this scope #24

Open cinehorse opened 2 years ago

cinehorse commented 2 years ago

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 commented 2 years ago

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.