Questions tagged [testing]
23 questions
245
votes
13 answers
Can I program for Arduino without having a real board?
I would like to start the development of some basic Arduino projects but I don't own an Arduino board yet. Is there a way I can write my code and emulate/test it using a desktop computer so after my board arrives I just have to upload and run my…
totymedli
- 2,929
- 3
- 20
- 22
22
votes
3 answers
How to check my Arduino board is working or dead?
When you have a board in your hand but you don't know is it working or not, how to verify if it's working or dead?
Hardik Thaker
- 1,407
- 2
- 12
- 15
18
votes
3 answers
What is the best way to unit test my code without controller?
I want to unit test my Arduino code. Ideally, I want to execute and test my code without uploading it to the board. What tools or libraries can help me with this?
There is an Arduino emulator in development which could be useful, but it doesn't yet…
Hardik Thaker
- 1,407
- 2
- 12
- 15
4
votes
5 answers
Mass testing of Arduinos
I am using Arduino for an IoT class (40 students). I have set up a test program to check all sensors and actuators used in the class (we need to recycle for next semester). However, I would also like to check the Arduino's themselves (and also…
Lasse Berntzen
- 41
- 3
4
votes
3 answers
How compile an Arduino program for a desktop PC
I have an arduino program that only does serial communications with a little bit of math, and I am writing another one to communicate with it on a second arduino. For testing purposes I was hoping I could run the serial only program on my desktop. …
bob mcgrath
- 55
- 2
- 4
4
votes
1 answer
Check contents of buffer after serial read
I would like to test the contents of data received over a serial connection. In my loop() I store the data in bffr; and afterwards I would like to test to see if there are some predefined words in it.
#define BFFSZ 90
char bffr[BFFSZ];
char bffridx;…
stUrb
- 351
- 2
- 5
- 10
2
votes
2 answers
Where should unit tests go in the Arduino IDE
I have an Arduino project where the file structure looks like this
myProject/
myProject.ino
ImportantClass1.hpp
ImportantClass1.cpp
ImportantClass2.hpp
ImportantClass2.cpp
Etc….
It compiles and runs fine. No problem…
Hubert B
- 71
- 9
2
votes
2 answers
SPI: test by connecting MOSI to MISO
Is it possible to test a SPI connection by wiring the MISO directly to the MOSI pin? I'm working on a low-level SPI implementation, and I want to check that the library is basically working. It would be nice to be able to test the connection…
Jonah
- 123
- 1
- 5
2
votes
1 answer
How to make universal remote controller?
I am trying to make simple TV remote using Arduino.
I got this link from Google for making a remote.
Code uploaded perfectly on my device. But all it does is blink a the LED on pin 13.
I hope I have got right code. I have tested it on my TV at home.…
Freddy
- 121
- 5
1
vote
0 answers
platformio native unit test Arduino.h not found
I'm writing code for a microcontroller project using PlatformIO.
I have a couple of classes that I want to write unit tests for. I've not unit tested with pio before so I'm starting with one of the easier classes. I wrote out the start of my…
Chris Schmitz
- 357
- 6
- 18
1
vote
1 answer
How to build and run AUnit tests
I found this example on how to create a project with AUnit tests: https://www.thecoderscorner.com/electronics/microcontrollers/embedded-testing/getting-started-unittesting-arduino/
According to it and projects I have found on github my project…
Jarosław Jaryszew
- 121
- 3
1
vote
1 answer
Is there a test framework for Arduinos?
I'm working on big Arduino project that involves lots proprietary libraries. Ergo, we need test scripts to ensure each library works. Is there a testing framework for Arduino similar to CPPUnit, JUnit, Cunit, etc.? It should preferable also have the…
HarrisonO
- 125
- 4
1
vote
1 answer
Can I emulate Arduino in a headless CI/CD setup?
6 years ago, there has been a question "How to emulate Arduino on PC".
Since then, probably many more Arduino emulators have been introduces.
With this question, I would like to narrow the search scope down to the following criteria:
Linux…
J. Doe
- 127
- 1
- 6
1
vote
2 answers
Interrupt is activated as soon as I insert a jumper wire into the port
I have written a very simple code to test the interrupt functionality of my Arduino Uno expansion board:
const byte buttonPin3 = 3;
void setup() {
pinMode(buttonPin3, INPUT);
attachInterrupt(digitalPinToInterrupt(buttonPin3), trigger,…
Foad
- 143
- 10
1
vote
2 answers
Can arduino-cli verify sketches?
I'm trying to do some simple unit testing with arduino-cli in a .gitlab-ci file like so
variables:
DOCKER_HOST: tcp://docker:2375
image: "docker:latest"
services:
- docker:dind
before_script:
- docker pull "arduino/arduino-cli:latest"
-…
mikeLundquist
- 163
- 5