1

Hello fellow Arduino enthusiasts,

I created an Arduino project for a Mega2560 board in Microsoft Visual Studio. Before loading the code on the board I want to test it on my Windows desktop computer.

I'd like to automatically provide input (e.g. with a file containing some values) for the 4 hardware Serials as well as the I2C/Wire bus and check their output for validity. How can one achieve that?

I read about mocking (e.g. "Arduino-mock") but this does not seem to be what I need since it is more a way of ignoring the absence of object implementations. Are there maybe some simulators that can automatically generate input and create output logs or even check the output?

Thank you for any advice!

2
  • You can check this thread for some ideas: arduino.stackexchange.com/questions/61/… The question is a couple of years old, but not much has changed since then. There are a whole bunch of half implemented solutions that don't work very well. The best way to test Arduino code at this point in time is still to just run it on the hardware. – Jake C Jan 29 '16 at 10:37
  • 1
    Shameless plug: check out this I2C test example: iobtoolkit.com/docs/tutorials/i2c_python_mcp7940n_test.html This project is in active development. If you need some specific I/O function it'd like to hear from you. – IOB Toolkit Team Jan 29 '16 at 11:05