Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
112 views

I'm using an Arduino Mega 2560 to control a DRV8871 motor driver connected to a DC brushed motor. The setup includes: Three buttons: UP, DOWN, and FAST One limit switch input, where the upper and ...
Luigi's user avatar
  • 181
2 votes
1 answer
115 views

I am trying to make a battery load cycler to charge and discharge a battery repeatedly for a certain amount of cycles and here is my code: bool in_charge_mode; int cycles = 0; float cutoffvoltage = 2....
risa's user avatar
  • 21
1 vote
1 answer
208 views

I am building a small art project to display my current age with an accuracy of 1/100th of a second. I am using a XIAO SAMD21, a DS3231 RTC, and a 128x32 OLED screen. Here is what it looks like right ...
Mir's user avatar
  • 113
1 vote
1 answer
150 views

I'm making a school project that allows plants to 'talk'. As in when the plant is in an un-ideal environment (low or high soil moisture, not ideal temperature or humidity and not enough light). I have ...
I-like-turtles's user avatar
3 votes
1 answer
783 views

I'm working on a project to build a plant monitor that works from the outside with Arduino that picks up light and water values from it's environment then uses a nRF24L01 with an antenna and I've come ...
Mario Ronci's user avatar
-2 votes
2 answers
92 views

im sending the value 1500 from another MCU with fdserial_txChar(transmit, send >> 7); // send Higher 7 bits fdserial_txChar(transmit, send & 0x7F); // send Lower 7 bits and was ...
benjamin nikkel's user avatar
1 vote
1 answer
401 views

I’ve got a question about this code I’ve attached please- would it be correct to read it like this: After defining the variable temperature and humidity and assigning measurement_timestamp to millis(),...
Tom's user avatar
  • 13
0 votes
1 answer
166 views

So I have created a method to read and return Ultrasonic Sensor Data. I have 2 Ultrasonic Sensors. Below is my code.    // Ultrasonic Pins    #define T1 2 &...
Ansari Aquib's user avatar
-1 votes
1 answer
192 views

So I asked this question a couple days ago but did some more work with some of the coding, but I'm really stuck and need some help. I'm trying to display the temperature for each separate thermistor ...
GarthDanti's user avatar
1 vote
1 answer
144 views

The code I use probably has a math problem since an Arduino can only count a 16 bit integer. This problem is with the WeekDelay() function. The project is for an Aerogarden. It pumps water into the ...
alexlikesallthegamez's user avatar
-1 votes
1 answer
158 views

This is the code. The /// are where I added the countdown. Unfortunately the countdown only goes down 9 seconds. What I want it to do is go down the full 24 hours. I have been trying to fix this error ...
alexlikesallthegamez's user avatar
-1 votes
1 answer
60 views

The first time, pow() works. But inside of a 'for loop', or again afterwards, it doesn't behave !? (I'm using a Chinese Pro Mini with Arduino 1.8.16) EDIT To clarify what I am asking, my question is:...
TRS-80's user avatar
  • 21
5 votes
3 answers
2k views

So, I've just started programming Arduino (and also in general), so I'm doing basic things, like switching on and off LED's. I've made them light in a sequence and then turning them off (in the same ...
AndreFro's user avatar
1 vote
2 answers
764 views

My NodeMCU wont connect to Blynk with my code but works fine with example code and same auth token and WiFi info. Cant figure out why its not working. Must be something in my code interfering with it (...
Randomaker's user avatar
2 votes
2 answers
152 views

I have a OLED SSD1306 & DS3231 RTC, 2 buttons to set the time & date. My project is to display a scrolling text at the top of the OLED, the RTC time in the middle, the day & date on the ...
Stiglitz's user avatar
1 vote
2 answers
434 views

I am having some trouble getting my board to perform the function I want it to perform. This is a project I have due in a few days, and I have hit a wall I just can't seem to get past. Now, I will say ...
Geraldo's user avatar
  • 13
1 vote
2 answers
332 views

Adding another flow sensor to sketch I have a water flow sketch I use for my freshwater consumption. I would like to adapt it to use for diesel fuel consumption. The difference is with a diesel ...
SV Savannah's user avatar
1 vote
1 answer
66 views

i found following code online, to read the value of a touch sensor... i am having difficulties understanding how the 2 second timeout on the marked line works.. if ((touch_sensor_value (...
sharkyenergy's user avatar
1 vote
0 answers
955 views

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
1 answer
1k views

I am using the Preferences.h library in my Arduino code. I initialize some values. I save them with the preference library. I then modify all the values, then read back the original saved values. All ...
Rudy's user avatar
  • 993
1 vote
0 answers
2k views

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
4 votes
2 answers
2k views

Im trying to move a servo from one place to another while using the typical for loop you find in the servo's library example: int lightON = 180; int lightOFF = 90; for (pos1 = lightOFF; pos1 <= ...
Marcelo_M's user avatar
  • 121
1 vote
1 answer
264 views

I have two sets of 4 LEDs. Set A (Led1 Led2, Led3, Led4) Set B (Led5 Led6, Led7, Led8) Both sets have its own tactile button: Tactile A, Tactile B, Tactile A, turning on the LEDs set A and tactile B ...
Habib Anwari's user avatar
1 vote
0 answers
286 views

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
89 views

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
2 3 4 5 6