Hot answers tagged

43 votes

Can I program for Arduino without having a real board?

Plenty of options exist in the world of electronics simulators, but circuits.io aka TinkerCAD is probably the most versatile one out there. You can compose your circuit on a virtual breadboard which ...
18 votes

Can I program for Arduino without having a real board?

Be aware that no simulator will reproduce real-life situations. There have been plenty of posts on the Arduino forum about problems with code or electronics, which turn out to be something subtle, ...
  • 35.4k
14 votes

Can I program for Arduino without having a real board?

You can use Yenka (free for home use) to simulate Arduino, PIX, PIXACE and other boards with digital, analog and serial I/O. It provides a lot of components and sample projects. Screenshot:
  • 243
11 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. ...
11 votes

Can I program for Arduino without having a real board?

I believe this website has a list of both emulators and simulators along with their price and availability. Update: Since some users mentioned there are broken links in that website, here's a ...
8 votes

Can I program for Arduino without having a real board?

Virtualbreadboard has a new VBB4Arduino 'Two Arduino's' edition which includes BOTH a JVM Arduino emulator AND a AVR Instruction set simulator with examples that cover almost all of the Arduino ...
5 votes

Can I program for Arduino without having a real board?

You could e.g. use my simulator. It is especially suitable for PLC-like applications, where multitasking is achieved by cyclic evaluation of interconnected circuit-like objects: Timers, Markers, ...
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 ...
  • 103k
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 ...
  • 6,646
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 ...
  • 181
2 votes

How to check my Arduino board is working or dead?

If you have another, working, Uno, and both have socketed microcontroller chips, you could use the known board to program a test sketch onto the unknown board's chip, put it back on the unknown board, ...
  • 14.5k
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 ...
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 ...
  • 103k
2 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 ...
  • 37.4k
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 ...
  • 1,272
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 ...
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 ...
  • 14.2k
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 ....
  • 14.5k
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, ...
  • 37.4k
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 ...
  • 1,506
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 ...
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.
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 ...
  • 14.2k
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 ...
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 ...
  • 5,529
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. ...
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 ...
  • 111
1 vote

Testing Arduino with Visual Studio Community 2013 raise LNK error

I use Visual Studio Community Edition 2013 along with the Visual Micro extensions, which I think is what you need as the "missing link" between VS and Arduino.
  • 176
1 vote
Accepted

How to make universal remote controller?

As you've stated in your question, the TSOP-15 is a receiver. That means it detects infrared signals rather than sending them out. To make a remote control with that code, you need a simple infrared ...
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 ...

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