Questions tagged [code-review]

Code review is systematic examination of your Arduino sketch. It is intended to find and fix mistakes overlooked in the initial development phase, improving both the overall quality of software and the developers' skills.

41 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
396 views

Integration of MAX30100 and DS18B20 Thermal Probe Integration

This is for my final year project that I have been tasked with designing a patient monitoring system. However, during the last stretch of model prototyping, I am experiencing issues with my MAX30100 ...
Roschlynn Dsouza's user avatar
3 votes
0 answers
2k views

Encoder + Bounce2 Library

I am working towards debouncing my keyes rotary encoder using the Bounce2 library found here ( https://github.com/thomasfredericks/Bounce2 ). I believe the problem lies in my code as there isn't much ...
kevinconnectable's user avatar
2 votes
0 answers
57 views

Am I maximising my A0 readout rate with this peak-detection code?

I have a pulse going into A0 on a Nano, and want to detect the peak voltage. With low-pass filtering to slow down the input pulse I'm still reading marginally too slow. The code overall inhibits a ...
Chris H's user avatar
  • 146
2 votes
0 answers
150 views

Please help with my tinkercad code. Debouncing stopwatch with lcd

#include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int ssPin = 8; int resetPin = 9; bool cntrRunning = false; int sec = 0; int min = 0; double currentMillis; void setup() { ...
Amy's user avatar
  • 21
2 votes
0 answers
393 views

Error compiling for board Arduino Nano 33 BLE

I am trying to use pulse sensor with Arduino Nano 33 BLE sense, but when I verify it, it shows Error compiling for board Arduino Nano 33 BLE. The code is from the pulse sensor website. The code works ...
Syfian Bukhari's user avatar
2 votes
0 answers
131 views

Help with code for changing motor speed depending on MPU6050 angles read

I have been trying to create code where my MPU6050 is constantly reading the angle it is at and based on that angle, increase or decrease the motor speed. For example the motor will be off when the ...
miles's user avatar
  • 21
2 votes
0 answers
2k views

Sending data from webserver to Arduino

Hello Arduino enthusiasts! I've been working on a keypad lock system for school lately and I need some advice.Basically, my code checks if the entered passcode is the same than a predefined passcode ...
Arxkz's user avatar
  • 23
2 votes
0 answers
2k views

Arduino Uno doesn't work as Manchester code receiver

I'm sending some data from ATTINY85 to Arduino UNO using 433Mhz modules. Coding is Manchester using Manchester.h library from here. Transmitting data works perfectly, 433 receiver gets data alright. ...
Em Ka's user avatar
  • 151
1 vote
0 answers
188 views

Code question: LCD keypad Shield. How do I define the buttons?

I am trying to adapt a alarm clock sketch that used external buttons, but I would like to utilize a LCD Keypad Shield. The data sheet says all the buttons are on pin A0, so every button is "set ...
SV Savannah's user avatar
1 vote
0 answers
103 views

RFM69 Sending Failure

Hi I'm trying to get the RFM69 rf module to work on an arduino uno. Here is my code: #include <SPI.h> // Addresses for this node. CHANGE THESE FOR EACH NODE! #define NETWORKID 0 // Must be ...
Aaron's user avatar
  • 121
1 vote
0 answers
30 views

servos act strangely instead of stopping/starting

I am trying to make it so that my robot rolls straight when pin 8 is high and stop when pin 8 is low, the 2 servos is constant rotation servos. instead the servos spin when the wire touches it pin ...
Nate's user avatar
  • 11
1 vote
0 answers
104 views

Project doesn't work after 2 - 3 times, requires frequent turning off and on

I am new to Arduino and I am working on a project. This project inspired me and I tried doing it. The following code was provided in the description: int maxPeople = 5; // maximum number of people ...
19aksh's user avatar
  • 113
1 vote
0 answers
527 views

U-blox GPS module (and TinyGPS library): altitude data getting stuck at strange values

We have built a HAB (high-altitude balloon) tracker based on an Arduino and a U-blox GPS module, but we have a sporadic issue where the altitude data gets stuck at odd (usually low) values. The ...
Rustony's user avatar
  • 31
1 vote
0 answers
677 views

How to stop my 16*2 lcd blink?

Here I wrote code for my weighting scale measurement. In which I added an on/off switch for my LCD display. But in defined delay time my LCD is a blink and I do not want it. I want my LCD switch on/...
sunfarma hulla's user avatar
1 vote
0 answers
1k views

Wemos d1 mini code not uploading

I have a wemos d1 mini. I uploaded a code in wemos d1 mini and after that my wemos mini not working. I tried to upload another code in it even the led blink sketch and even a blank sketch but whenever ...
Talal zahid's user avatar
1 vote
0 answers
235 views

Why is my buzzer always on?

I wanted to make a buzzer go off when the distance measured by the ultrasonic sensor becomes more than 100cm. The things used in this project are a 4x4 keypad, an hc-sr04 ultrasonic sensor, and a ...
Abhi's user avatar
  • 31
1 vote
0 answers
59 views

Can someone check my schematic and code? My Led is not turning on

Led1 is on the left Led2 is on the right The code is making LED1 blink every second but it should also turn on Led2 so that whenever I press the push button it should turn off Led2. But Led2 isn't ...
Lone Wolf's user avatar
1 vote
0 answers
58 views

Automatic water pump Trigger System - I need my code FIXED

int out = LED_BUILTIN; int strt = 3; int stp = 9; void setup() { pinMode(out,OUTPUT); pinMode(strt,INPUT); pinMode(stp,INPUT); } void loop() { while(true) { if(digitalRead(strt) == LOW) ...
Saagar G's user avatar
1 vote
0 answers
131 views

Help with code not working

I built a button box, everything is wired up and all of the push buttons work using the code below, but for some reason my rotary encoders are not working, well 3 out of the 4 are not working. Is ...
Nc Bean's user avatar
  • 11
1 vote
0 answers
256 views

ESP32-POE/ISO unstable after 10 days of power up

i have one ESP32-POE and ESP32-POE and i'm using the Olimex RS485 module to read a power meter that is placed near the ESP32 (5 meters of CAT5 cable - 9600 8N1). My device has this workflow (it's ...
SardoMan's user avatar
  • 167
1 vote
0 answers
659 views

How to Adjust MQ131 Sensor?

The problem Hey. I'm trying to use the sensor Mq131 to measure some ozone data in a closed environment, but I'm having some bad time to adjust the trim in the sensor and get results in ppb. By ...
Herr Schrödinger's user avatar
1 vote
0 answers
800 views

I2C master's output is always 255

we are using 2 Arduino UNO as a master/slave for this i2c protocol. we used the first Arduino(slave) as a sensor that will input dummy data (in this case, temperature data). the Arduino(master) should ...
user67152's user avatar
1 vote
0 answers
545 views

I am trying to rewrite an RFID with a MEGA2560 and a RFID-RC522

I have been trying to rewrite an RFID tag so it is the same as my other one. I have code that will read both separately but I cannot find any already written for the MEGA2560 that will work for me. ...
cameron cain-jones's user avatar
1 vote
0 answers
71 views

Potentiometer motor system is not working

I am setting up a potentiometer system that includes a motor that is supposed to spin with the potentiometer changing the speed of the spin and a button to reverse it. I checked the coding and it is ...
Lea French's user avatar
1 vote
0 answers
114 views

lightshow project

Hello guys. I'm working on a little lightshow that has 3 extra feature's when i press the button. depending on the variable counter the lights should do something and it should message you that you ...
Dashcarwash's user avatar
1 vote
0 answers
38 views

How do I get my servo to turn using bluetooth, is this a glitch?

I'm very new to coding with arduino so please excuse my naivety, For an electronics assignment I am making a servo turn back and forth using a HM10 BLE however each time I press a button that sends '0'...
glyphz's user avatar
  • 11
1 vote
0 answers
65 views

How do I have this audio and LED activate ONLY when a button is held using an Arduino?

I have this code that I am using to play a sound effect where I used a program called wav2c to convert a .wav file to number values that I put into a header file that I use in the code to generate the ...
jaduuuui's user avatar
1 vote
0 answers
226 views

Sending a union from Arduino via serial communication and parsing it in python

I want to send a union from Arduino to a python script running on a pc, and I want to parse the received union. I have read lots of topics online but I am stuck on how to do it in the most efficient ...
L_T's user avatar
  • 133
1 vote
0 answers
74 views

Analog pins giving off the same value

So recently I made code that used two custom sensors that are connected to the analog pin A0 & A5. Schematic can be seen here (http://inmoov.fr/test-your-finger-sensor/). const int ono = A0; ...
Brilliant Purnawan's user avatar
1 vote
0 answers
2k views

Nested "switch" statements menu

I know that menus were discussed perhaps a thousand times here and everywhere. But using a ready solution is not something that I'm looking for because I know I won't learn the concept if I use them. ...
MDChaara's user avatar
  • 185
1 vote
0 answers
322 views

Arduino button trigger coding

I am trying to write a simple coding to change the color of an RGB LED using a push button trigger. I just need the the pin output to change when the button is pressed. I would like to do this using ...
Muscle Nerd's user avatar
1 vote
1 answer
688 views

Using a keypad to play an audio file on Arduino Mega and Adafruit VS1053?

I am trying to use a keypad to trigger an audio file using an Arduino Mega and Adafruit VS1053 Music Maker. I have gotten the music files to play independently, and when the correct number is entered ...
Rick's user avatar
  • 21
1 vote
1 answer
223 views

Quick Programming Check/Review

I've been racking my head trying to start programming in a library organized method. My code works, but the translation and split to a .h and .cpp file is riddled with errors. It's gotta be stupidly ...
MiddleMan's user avatar
0 votes
0 answers
228 views

problem controlling rgb led with one button

I'm trying to make a lamp which quality to change color by pressing a button, pressing once turns on red, pressing again turns on blue and so on, but I also want it to have a light effect in which it ...
jhon flores's user avatar
0 votes
0 answers
57 views

RF24 code not working:

I watched this video and used his transmitter code and receiver code. However, it's not working. There's no response from the receiver. The transmitter stuck at the loop: if (!radio.write( &data,...
ShoutOutAndCalculate's user avatar
0 votes
0 answers
148 views

when submit data to ESP8266, ets Jan 8 2013,rst cause:4, boot mode:(1,6) wdt occurs

I am trying to make my ESP8266(nodemcu) as a Web server. When my code operates, and user connects esp's wifi and enters '192.168.4.1/set_peroid' by IE or chrome, this webpage appears: This is ...
lee du's user avatar
  • 53
-1 votes
1 answer
45 views

Relays fail to engage/disengage when prompted initially in setup code for Arduino ATmega2560 and 2560 proto shield

The following code is what I have written so far. All of my pin connections, declarations, and writes seem to be correct, but when I implement the code, none of my relays (Smart Board Relay Modules) ...
Jacie Graber's user avatar
-1 votes
1 answer
154 views

Code causing Servo motor not to work!

My sketch is compiling and loading, but when the program runs, the Servo motor does not work. The buttons work, the LED light works, Piezo buzzer plays the melody, the Stepper motor works but not ...
Stevie_D's user avatar
-1 votes
1 answer
1k views

Wemos D1 mini freezing after a few minutes

I´m using a Wemos D1 mini board to control a RGB LED Strip and programmed a simple code with the Arduino IDE. The Wemos conects to my Internet just fine and with the IP adress I can change the RGB ...
rlcmtzc's user avatar
-2 votes
1 answer
157 views

Can someone check my code? My Arduino isn't doing a consistent count cycle

I'm wondering if someone could have a look at my code and let me know if there's something wrong with it. I had the code done for me a while back and did a quick test and it seemed to work. I have now ...
Jase's user avatar
  • 1
-2 votes
1 answer
2k views

hx711 and load cell read out 0 for calibration

I'm using this tutorial from Sparkfun https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide And using THEIR code. The only difference is I added a delay so it wouldn't ...
SnowboardBruin's user avatar