Skip to main content
14 votes

Can I program for Arduino without having a real board?

Edit 2: Please hit the like button to support free Arduino simulator 😀 I am working with the new Wokwi Arduino Simulator. Wokwi Arduino simulator is based on AVR8js engine which is made open-source. ...
ArduinoFan's user avatar
  • 1,059
4 votes
Accepted

SPI: test by connecting MOSI to MISO

Yes, you can - and it's something I often do when doing low-level electrical testing an SPI interfacce. For every clock that you send out the data presented on MOSI will get reflected on MISO. So if ...
Majenko's user avatar
  • 105k
3 votes

How compile an Arduino program for a desktop PC

If you want to run the Arduino sketch on your desktop, you just have to implement the Arduino core library for your PC. It may not be as bad as it sounds. If your program makes only minimal use of ...
Edgar Bonet's user avatar
  • 43.3k
3 votes

SPI: test by connecting MOSI to MISO

Usually the SPI Master clocks data out while the Slave clocks data back in. So if you were sending and receiving 8 bits per transaction you can clock out 8 bits and at the same time clock in 8 bits ...
st2000's user avatar
  • 7,350
3 votes

Can I program for Arduino without having a real board?

a way I can write my code and emulate/test it using a desktop computer If you mean being able to "unit test" using a desktop computer, I can offer a library I wrote called arduino_ci. It doesn't ...
Ian's user avatar
  • 181
2 votes
Accepted

Can arduino-cli verify sketches?

In Arduino parlance the word "Verify" is used (erroneously) to mean "Compile the code into a binary or HEX file, but don't upload it to the board". To compile (and thus "verify") the code just pass ...
Majenko's user avatar
  • 105k
2 votes

Arduino Uno Wifi Module ESP8266 AT Command Test error

The first connection you made between arduino and esp which resulted in some random data means both are communicating whereas the second connection where the screen shows blank means communication ...
Rohits112's user avatar
2 votes

Interrupt is activated as soon as I insert a jumper wire into the port

Connect both Pin2 and Pin3 with two 1K resistors to ground. When a pin that's set as INPUT is "floating" (it's not connected to anything) the value on it is "undetermined" and interrupt can trigger ...
Filip Franik's user avatar
  • 1,292
1 vote
Accepted

Simulate pin behaviour based on PulseView recording

I've never heard of such a test framework and I doubt there is one, at least for hobbyists. Such a framework would need to include a lot of hardware to accommodate all the possible electrical test ...
chrisl's user avatar
  • 16.3k
1 vote

Where should unit tests go in the Arduino IDE

OK. Update, better late than never. I used soft links to overcome this problem. The final directory structure is like this: myProject/ .git/ myProject.ino Class1.hpp Class1.cpp ...
Hubert B's user avatar
1 vote

Where should unit tests go in the Arduino IDE

One way to do it is to use preprocessor conditionals. Name your project file and unit-test files with .cpp extensions and put them in a subfolder (called "sources" in my example). Then your ....
JRobert's user avatar
  • 15.3k
1 vote

Mass testing of Arduinos

A complete test would obviously be something fairly complex, and would probably require building some sort of rig. You can, however, perform a minimal test that checks for common failure modes, ...
Edgar Bonet's user avatar
  • 43.3k
1 vote

Mass testing of Arduinos

Testing microcomputers is a very complicated task. In your case I would suggest writing some programs to do exactly what you are saying. Then let the students do the testing. When the class starts you ...
Gil's user avatar
  • 1,843
1 vote

How to build and run AUnit tests

I eventually switched to PlatformIO. It took me less than half an hour to rearrange sources, fix some compiler issues, build and flash my device. Tests work really well. You just need to keep tested ...
Jarosław Jaryszew's user avatar
1 vote

Ardutester Millenium I2c Lcd Not Showing Anything!

The schematic you posted is not for I2C. You have a connection to the regular 2x16 LCD character display. For the I2C an SSD1306.
user72963's user avatar
1 vote
Accepted

Is there a test framework for Arduinos?

It should preferable also have the ability to simulate an Arduino. As said in the comments, only simulating the Arduino is mostly not enough, because you would also need to simulate all the connected ...
chrisl's user avatar
  • 16.3k
1 vote
Accepted

Can I emulate Arduino in a headless CI/CD setup?

The problems with this kind of software is: always behind the recent releases of cores/ hw variations. reliable only for simple programs/tasks Imho all the products I tested (mainly on Win) are ...
Codebreaker007's user avatar
1 vote

Interrupt is activated as soon as I insert a jumper wire into the port

CMOS inputs "float" when not connected to anything, and will give semi-random values. You can either connect the pin to ground via a medium value resistor (1kΩ-10kΩ), or set the pin to INPUT_PULLUP ...
Duncan C's user avatar
  • 5,702
1 vote

Can arduino-cli verify sketches?

@Majenko's is 100 % correct. Here's my updated .gitlab-ci.yml for my arduino library. image: ubuntu:latest before_script: - apt-get update -yq - apt-get install -yq ca-certificates - apt-get ...
mikeLundquist's user avatar
1 vote
Accepted

How to test if PWM mode is working correcly?

There are my options: The default way to do this is to use an oscilloscope. These can be quite expensive. Use a logic analyzer if the voltage is logic/binary (0 and 3.3 or 5V). These are very cheap. ...
Michel Keijzers's user avatar
1 vote

SD test is taking long answer when it fails

The SD library builds on the sdfatlib library, in which SD_INIT_TIMEOUT is defined as 2000 ms, which gives your 2 second timeout. You could try lowering that number to get a faster response, although ...
AndyW's user avatar
  • 111
1 vote

Can I program for Arduino without having a real board?

An alternative to simulators are services similar to online compilers like coliru, which allow users to build and run their code on a remote system. This approach has the same limitations as online ...
Dmitry Grigoryev's user avatar
1 vote

Can I program for Arduino without having a real board?

Yes you can, and fairly easily. There is a wonderful online simulation (completely free) called TinkerCAD. It has an excellent breadboard simulation, with parts like transistors, LEDs, ICs, and ...
I. Golsby's user avatar
  • 161

Only top scored, non community-wiki answers of a minimum length are eligible