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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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
...
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 ....
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, ...
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
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 ...
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 ...
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
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
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
Related Tags
testing × 23arduino-uno × 6
emulation × 3
arduino-mega × 2
programming × 2
arduino-ide × 2
interrupt × 2
windows × 2
platformio × 2
serial × 1
esp8266 × 1
c++ × 1
wifi × 1
spi × 1
atmega328 × 1
pwm × 1
sd-card × 1
string × 1
sketch × 1
hardware × 1
ir × 1
remote-control × 1
debugging × 1
visualstudio × 1
map × 1