Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ArCOM error when uploading to Arduino
Hi, Josh and other Bpod users.

I would like to integrate some hardware I have wired up using an arduino to my Bpod state machine.
I took the example code from the Github (Bpod_Gen2-master\Examples\Firmware\Bpod Shield\DIO) and tried uploading it to my arduino uno. However, I obtain a "prototype for '`' does not match any class in 'ArCOM' " error. I have attached the full error message below. How can I address this error?

I have seen a similar error previously when there was a header file class and .cpp file discrepancy, but I'm a little lost on how to proceed. Any feedback would be appreciated!

Arduino: 1.8.9 (Windows Store (Windows 10), Board: "Arduino/Genuino Uno"

ArCOM.cpp:42:6: error: prototype for 'void ArCOM::writeUint16(short unsigned int)' does not match any in class 'ArCOM'

void ArCOM::writeUint16(unsigned short int2Write) {


In file included from sketch\ArCOM.cpp:22:0:

ArCOM.h:44:8: error: candidate is: void ArCOM::writeUint16(uint16_t)

  void writeUint16(uint16_t int2Write);


ArCOM.cpp:65:16: error: prototype for 'short unsigned int ArCOM::readUint16()' does not match any in class 'ArCOM'

unsigned short ArCOM::readUint16() {


In file included from sketch\ArCOM.cpp:22:0:

ArCOM.h:54:12: error: candidate is: uint16_t ArCOM::readUint16()

  uint16_t readUint16();


DIO:29:18: error: 'Serial1' was not declared in this scope

ArCOM Serial1COM(Serial1); // Wrap Serial1 (UART on Arduino M0, Due + Teensy 3.X)


ArCOM.cpp:188:6: error: prototype for 'void ArCOM::readInt16Array(short int*, unsigned int)' does not match any in class 'ArCOM'

void ArCOM::readInt16Array(short numArray[], unsigned int nValues) {


In file included from sketch\ArCOM.cpp:22:0:

ArCOM.h:69:8: error: candidate is: void ArCOM::readInt16Array(int16_t*, unsigned int)

  void readInt16Array(int16_t numArray[], unsigned int size);


DIO:60:3: error: 'Serial1' does not name a type



exit status 1
prototype for 'void ArCOM::writeUint16(short unsigned int)' does not match any in class 'ArCOM'
Hi Millenial Falcon,

This chart gives you a list of the serial interface names for different Arduino boards.
Arduino Uno has a single serial interface, called Serial(). It's the same serial interface used for USB - so if you're exchanging data over a USB serial connection, you can't simultaneously talk to the state machine. If you want to use Uno, change all references to Serial1() in your sketch to Serial(). 

For many applications, it can be very useful to have a USB connection in parallel with the link to the state machine. The following boards are compatible with the Arduino shield and allow for Serial1() in parallel with Serial() or SerialUSB():

Adafruit Metro M4
Arduino Due

These work too, but they're retired products so they may be harder to find:

Arduino M0
Arduino Zero

I'd caution that Arduino Uno has a 16MHz, 8-bit processor which may not be able to keep up reliably with Bpod's 1.3Mb/s serial bus speed (this speed is necessary to ensure reliable state machine transitions). On our product page, we recommend 32-bit Arduino boards like the ones I listed above, which all have much higher clock speeds. It's possible that Uno is fast enough to work - we just haven't tested it here. If you find that it works reliably, please let us know!

Thanks for the explanation, it was very helpful.
I'll let you know how the uno works out.

Forum Jump: