Skip to main content

Questions tagged [code-optimization]

The process of improving the efficiency of a program such that is uses less memory and/or less computational time.

18 questions with no upvoted or accepted answers
2 votes
0 answers
88 views

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
  • 168
2 votes
0 answers
2k views

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
1 vote
0 answers
61 views

Please let me know if this post has the wrong tags, I will make sure to change it. My goal is to get the highest sampling rate possible from the Adafruit LSM6DSOX (6667Hz) using the Arduino MKR WIFI ...
infinite_yeet's user avatar
1 vote
0 answers
93 views

I am using a ATTINY85 Digispark board with an IR receiver to light some LEDs in my project. The Digispark has a limitation that does not allow it to use the IRremote.h library. I know that there a ...
user3347814's user avatar
1 vote
0 answers
69 views

Can Windows 10 computer use Arduino IDE 1.8.10 sometimes, AND use Arduino IDE 2.0.0 the rest of the time?
martymarty's user avatar
1 vote
0 answers
1k views

I am trying to send data from one arduino to another over ethernet using udp protocol. In arduino writing data over udp is like this UDP.write(buffer, size); where buffer is an array to send as a ...
eToll Systems'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
0 answers
75 views

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

I'm trying to drive an external DAC via SPI interface using ESP32 chip. But I cannot achieve the desired speed (>1M transfers/sec, each transfer consists of 16bits). The reason is not the SPI speed ...
Wjx's user avatar
  • 111
1 vote
0 answers
53 views

Im reading the voltage applied to my microcontroller using the internal voltage reference. Here the topic is talked, and there are some working examples. Im NOT using this examples, im using my own ...
Martin's user avatar
  • 11
1 vote
0 answers
118 views

I am new to arduino and lora technology and i have dragino lorashield for arduino Uno and dragino gateway. I have also MQ-3 gas sensor and I want to detect the alcohol value and to send it to the ...
Svetoslav's user avatar
1 vote
0 answers
665 views

So, I have a very basic project where I cycle through 8 IR individual transmitters. After setting the individual transmitter high, I cycle through all 8 IR receivers and print their values, RX_CYCLES ...
dandev's user avatar
  • 53
1 vote
0 answers
80 views

I have two codes for my to sensors and they work separately. However, I need to combine them in one program please can you help? The pulse code /* PulseSensor Starter Project and Signal Tester * ...
Mayada Yusuf's user avatar
1 vote
0 answers
434 views

I'm working on an inverse pendulum project, and am using an adafruit NXP_FXOS8700_FXAS21002 along with an Arduino due, and an esp8266 (two separate projects, same code however). I'm using a Magdwick ...
DrMrstheMonarch's user avatar
1 vote
0 answers
382 views

EDIT: The problem is my op-code catch is op >= 0x20 || op <= 0x2F rather than op >= 0x20 && op <= 0x2F and so most of the switch-case was being optimised away! This is a really ...
Patrick's user avatar
  • 111

15 30 50 per page