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.
253 questions
1
vote
1
answer
241
views
Seeburg Consolette Jukebox
I am working on a Seeburg Jukebox wall unit, I have it playing one track at a time form a SD card no problem. But what I need help with being new to programming is:
1. The code is long because it can ...
-2
votes
1
answer
177
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 ...
0
votes
1
answer
2k
views
How to Simulate and Tune a PID
I've been trying to simulate a PID using Brett Beauregard's PID library in order to understand it better. Here is my code.
#include <PID_v1.h>
const unsigned int numReadings = 500;
double ...
1
vote
0
answers
81
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;
...
2
votes
0
answers
149
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 ...
1
vote
1
answer
1k
views
Proper use of the tone() function within the loop () function [duplicate]
I am trying to have my sketch run a short series of tones (melody) through a Piezo buzzer after a selection is made by the user. I am getting a compilation error with my use of the tone function in ...
0
votes
2
answers
981
views
Combining 2 sensors in one code with 1 push button
I am trying to create a circuit with one tactile pushbutton, and LCD and two sensors: 1) temperature, and 2) pulse sensor. When the circuit is on, the LCD initially shows the reading from the temp ...
0
votes
1
answer
4k
views
Problem “Didn't find PN53x board” Arduino NFC Card Reader
i am using the elechouse PN532 RFID Module with an Wemos D1 mini in the Arduino IDE.
I use the ISO1443a_uid example from the elechouse library. All works fine if i plug the USB Cable into the wemos ...
-1
votes
1
answer
93
views
Am I able to set up a code where I can have two ways of turning something on?
I am pretty new to Arduino.
I've created a code with the help of many YouTube tutorials to control a servo with a button. I decided it has gotten a little un-exciting so I've been trying to add a ...
0
votes
1
answer
983
views
Ultrasonic sensor showing weird reading
When i run a test code in Newping library for ultrasonic sensor SR04 then in works properly but when i run the actual code for obstacle avoiding robot then it shows 0 cm everytime. This means that ...
-1
votes
1
answer
523
views
esp8266 WiFi Cannot Connect to a PHP Server
I am using a magnetic float switch sensor to monitor water level in a tank. I am using a ESP8266 board.
I am trying to send the data collected by it to a php page in a host called "weris.link". I've ...
0
votes
1
answer
41
views
Arduino loop over a function is always displaying 0 as final values
I trying to loop over a function in arduino to get values for 2000 times, and then divide it by 2000 to get an average offset:
int16_t x_offset = 0;
int16_t y_offset = 0;
int16_t z_offset = 0;
And ...
1
vote
1
answer
105
views
Compile Error for Arduino Sketch
I am attempting to increase the volume of a Max9744 20 watt amplifier from Adafruit using an Arduino sketch. I am just a very beginner and working with my grandson, this may be more than I am capable ...
-2
votes
1
answer
3k
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 ...
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 ...
0
votes
2
answers
2k
views
Keypad password check issue
I am working on a school project, basically I have to create a lock system that opens a fictive gate when the correct code is entered. We have been asked to simulate our system before actually ...
0
votes
1
answer
1k
views
Problem to display Ntp time on an oled using U8G2 lib
So I have this code to get ntp time and display it on serial port. But I want to display it on a 1.30 inch I2C oled with a SH1106 controller using the U8G2 library. The only problem is I don't know ...
-1
votes
2
answers
6k
views
Problem "Didn't find PN53x board" in Arduino Uno E-Card Reader [closed]
This is component to make E-Card reader, using arduino uno pn532
Code
if (success) {
// Display some basic information about the card
Serial.println("Found an ISO14443A card");
Serial....
0
votes
1
answer
2k
views
Combining codes for 3 sensors [closed]
I am trying to combine codes for my 3 sensors: GSR, Pulse sensor, and ECG but I keep getting errors. I have a poor background in coding. I have the 3 codes separately and I'm not the one who wrote ...
2
votes
2
answers
15k
views
Getting error ets jan 8 2013,rst cause:4,boot mode(1,6) wdt reset
I'm working on a project to send ultrasonic sensor data to my webserver. For that I'm using ESP8266 WiFi module, 3.3V regulator IC by giving input volt of 5v from aduino uno.
I successfully uploaded ...
0
votes
2
answers
2k
views
LED Blinking Using Push button
Whenever I upload the following program I am getting error message
showing "expected initializer before interval".
Kindly Help me to solve out this probleme.
const byte button=2;
const byte LED=10;
...
-1
votes
2
answers
4k
views
Need help on the "expected primary expression before "}" token"
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include "Arduino.h"
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
#define M11 2
#define M12 3
#define M13 ...
0
votes
1
answer
2k
views
Code is not working (Matrix keypad) [closed]
I am new to Arduino. I am learning from Arduino Cookbook. I was using tinkercad.com for running my Arduino code. But it is not working.
The Serial monitor should show the key which I have pressed on ...
0
votes
1
answer
2k
views
Checksum is wrong - Air Quality Monitoring Station PMS5003, BME280 | Code review
I working at air quality station. I measure particulate matter with PMS5003 and meteorological parameters with BME280. Everything seems to work just fine, but sometimes program hangs on checksum ...
-1
votes
1
answer
912
views
I keep getting stray '/302'. [duplicate]
I even rewrote the code and it still didn't work. How can I fix this?
#include "pitches.h"
void setup() {
// put your setup code here, to run once:
pinMode(4, OUTPUT);
}
void loop() {
// ...