rogerclarkmelbourne / Arduino_STM32

Arduino STM32. Hardware files to support STM32 boards, on Arduino IDE 1.8.x including LeafLabs Maple and other generic STM32F103 boards
Other
2.54k stars 1.26k forks source link

Bluepill - many standard arduino examples fail to compile #587

Open RickKimball opened 5 years ago

RickKimball commented 5 years ago

Trying to compile analog examples that use A0 fail to compile.

AnalogInOutSerial1:24:25: error: 'A0' was not declared in this scope
 const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to
                         ^
exit status 1
'A0' was not declared in this scope

I'm creating this issue for tracking purposes only. Not expecting it to get fixed.

rogerclarkmelbourne commented 5 years ago

I presume this should be PA0 ?

Edit.

Umm. I see what you mean. These are the AVR examples, and sometimes there is no nice way to make them compile.

e.g. #define A0 PA0 is not exactly ideal

stevstrong commented 5 years ago

Everyone is welcome to contribute and make some necessary changes in the available examples.