cujomalainey / ant-arduino

An implementation of a ANT driver for Arduino, Mbed and ESP-IDF
GNU General Public License v2.0
104 stars 15 forks source link

'ArduinoNativeAnt' does not name a type #57

Closed silviocross closed 2 years ago

silviocross commented 2 years ago

I am trying to use the library on an nRF52840 (S340) using the internal radio, unfortunately I am stuck at the early beginning since I am not able to run even the exaple NativeAnt code. The compiler returns the following code:

NativeAnt:32:1: error: 'ArduinoNativeAnt' does not name a type; did you mean 'ArduinoSerialAnt'? 32 | ArduinoNativeAnt ant; | ^~~~~~~~~~~~~~~~ | ArduinoSerialAnt /tmp/arduino_modified_sketch_347487/NativeAnt.ino: In function 'void setup()': NativeAnt:54:5: error: 'ant' was not declared in this scope; did you mean 'int'? 54 | ant.begin(TOTAL_CHANNELS, ENCRYPTED_CHANNELS); | ^~~ | int /tmp/arduino_modified_sketch_347487/NativeAnt.ino: In function 'void loop()': NativeAnt:92:5: error: 'ant' was not declared in this scope; did you mean 'int'? 92 | ant.readPacket(); | ^~~ | int exit status 1 'ArduinoNativeAnt' does not name a type; did you mean 'ArduinoSerialAnt'?

Any suggestion on how to overcome this issue? Silvio

cujomalainey commented 2 years ago

Make sure you add a compile flag for S340

If you are using platformio add -DS340 to your build_flags