Questions tagged [programming]

The process of designing and writing source code as part of a program (or sketch) for Arduino. For questions about uploading code to an Arduino board, use the [uploading] tag instead.

Filter by
Sorted by
Tagged with
0
votes
2answers
61 views

using different variables in a function

I have a function SetTFgr (float T, int FGr) to set the time and filtergrade of my LED enlarger. It works without a problem and changes the values of T or Fgr according to the buttons I press. Both T ...
1
vote
2answers
48 views

help explain pulseIn function with arduino and Ultrasonic sensor

dears Engineers.. i got stuck with this issue couldn't understand.. please help with explanations. first i was upset of my ultrasonic sensor reading deviations, that is i examine my sensor indoor and ...
0
votes
2answers
731 views

Why I could not read the other sms's except the first SMS?

I have to read the incoming SMS on my GSM module SIM900, and I want to print the sender number and message to the serial monitor. I first configure the GSM module with AT commands and Response() ...
4
votes
2answers
100 views

just a silly doubt about glowing an LED

what will happen if i insert the anode of a LED to pin 12 and cathode of the LED to pin 11 and set pin 12 to high and pin 11 to low,will the led glow??
0
votes
0answers
21 views

Multiple functions at the same time with Arduino Uno

I would like to make a stepper motor run in for loop in time intervals. I also want to stepper motor run when I press the button. Two functions independently. One does not affect the other. I wrote ...
1
vote
2answers
44 views

Is it possible to send 2 or more o/p signal at the same time?

I wanted run two motors using Cytron MDD10A Dual Channel motor driver. So my concern is based on execution of code that is done line by line, in that case when I'm driving two motors will this delay ...
2
votes
1answer
86 views

My motor driver gets stuck in either high or low with a certain speed super randomly. Motor output stops going based on accelerometer input

Running a DC motor(6.5A max input), motor driver (MD10C 7Amp peak output), and arduino Mega. Basically, I am creating a stabilized object based on the accelerometer's input. It works great but all of ...
1
vote
1answer
61 views

Can Arduino UNO permanently store a code?

I'm really new to Arduino and wanted to know if I can make Arduino a permanent controller? and could you help me with a cheaper alternative? I also wanted to know about "fuse", i read it ...
3
votes
1answer
142 views

why is “if” slow?

I am new to the Arduino world and I hope I can find a solution here. The code below functionally works ok. The problem I have is, at line 45 I've inserted an if statement to change dac_value. It is ...
0
votes
1answer
84 views

servo starts rotating whenever it is plugged

I am making a fish feeder using an Arduino Mega 2560, servo motor SG90 and RTC DS3231. I want to make it rotate twice a day, i.e. morning and 9 o'clock evening. Whenever I plug my Arduino board to ...
1
vote
1answer
36 views

send configuration commands with arduino

I am using ublox zed F9P multi GNSS module. I have to program it for its configuration messages. Like I have to run a specific configuration of my receiver with the help of Arduino. I know arduino ...
4
votes
1answer
1k views

Leonardo-based tachometer?

I'm new here. I'm not a native speaker, so pardon my English. I just received my Arduino Leonardo today. I tried some basic calculations and stuff like blinking and LCD interfacing. Its interesting. ...
0
votes
1answer
34 views

Arduino + Codeblocks C++

I'm writing the code for my Arduino board using Code::Blocks editor. When I create a new project, there is AVR Project and Arduino Project under Projects category. Which one do I select?
2
votes
0answers
17 views

Getting atsam3x8e (Arduino Due) to work

I decided to make a pcb based on the atsam3x8e (microcontroller used in Arduino Due). For the design I copied most of the layout that I found on this site and looked at the official Arduino Due ...
1
vote
1answer
57 views

Understanding Debounce code

I don't understand the following Debounce code. (The complete code is at the bottom.) From what I understand, when the pin reads something, we wait at least 50 milliseconds before performing anything. ...
-1
votes
2answers
79 views

Is there a way to get about a 10ns Timer resolution from an AVR CPU?

I have an 8Mhz ATM32u4 that is able to read external pulse inputs at 125ns ticks using InputCapture3 (PC7) on its 16-bit timer. Is there a magical way (bitbanging?) to get around 10ns tick resolution ...
1
vote
2answers
35 views

How to properly put a u8g2 handle in a class

I'm trying to create a small battery powered alarm clock using an Arduino MKRZero and a generic SH1106-controlled, 128x64 pixel oled. I started out just dumping all code into a single file named Clock....
2
votes
1answer
60 views

Branchless programing on arduino?

So I've been looking into branchless programming to speed up code and I'm curious as to how exactly Arduino (or rather atmega328) actually reads machine instructions. Does it have a memory cache or ...
1
vote
1answer
39 views

Why is their need of response time needed in esp8266 AT commands?

I am writing an AT commands firmware for esp8266 via connecting it to atmega2560. Now the question is how will I come to know the response time for AT commands for writing its firmware to read the ...
1
vote
1answer
44 views

Static ip for esp8266 based on gateway

I'm new to Arduino programming. I want to make my esp8266 get static IP based on gateway. I mean if gateway is 192.168.0.1 then it should get 192.168.0.15 as static IP. And if gateway is 192.168.1.1 ...
1
vote
1answer
58 views

Cannot successfully implement singleton

I have spent the better part of today trying to figure out why I can't get this to work... I have this project where, because of previous design considerations, have implemented a singleton class that ...
1
vote
0answers
46 views

avrdude not in sync

So this uno was working before, now i can't upload anything, can't even burn the bootloader. Using another arduino as isp does not work. It always says avrdude: stk500_recv(): programmer is not ...
1
vote
1answer
81 views

I´m trying to make a kind of videogame with Arduino UNO

it´s a school project, but I'm having some problems to create a menu selection. In the LCD, all the character are overwriting, I'm a beginer, so i dont have any idea of what i was doing wrong (ps.: ...
1
vote
1answer
187 views

Arduino ultrasonic sensor project

I'm a newbie at Arduino, and I'm trying to make a project with ultrasonic sensor, I'm using the grove ultrasonic ranger, not the HC-SR04, and I already did test with distance and it worked very well, ...
1
vote
1answer
131 views

led chaser fill color effect

Please help. I am learning a lot about Arduino. Most all in lightning. I am a newbie. I play with nano and LED ws2812 and use fastled library. What ask is to make effect like fill effect. For ...
3
votes
3answers
145 views

Programming Arduino Uno R3 to trigger a relay once every 24 hours

I programmed Arduino UNO R3 to trigger a relay once every 24 hours from the moment it is powered on I calculated milliseconds and used the function delay() 24 hours * 60 minutes each hour * 60 second ...
0
votes
1answer
565 views

OTA-program SPIFFS on the ESP8266

Something I'd like information on is whether it is possible to upload a SPIFFS filesystem image to the ESP8266. In theory it might work: It can be uploaded over USB, and according to the logs the ...
0
votes
1answer
179 views

Use JYETech 2.4 Inch LCD Display Screen Module with Arduino?

I have this JYETech 2.4 Inch LCD Display Screen Module that I would like to use for a project I have in mind, however, I'm not sure how to wire it up with my Arudino Mega. Here is the datasheet for ...
1
vote
0answers
49 views

SG 90 servos randomly spinning

I started one project where i need 4 servos to control 4 grabbers jaws. i use STM32F103C8T6 with arduino IDE for programming it. The motor TZT Micro Servo 9g SG 90. First, I was playing with stepper ...
2
votes
4answers
777 views

Arduino Object Oriented Programming

Can anyone send me a link tutorial about Arduino Object Oriented Programming? I want to learn Arduino, I am just a beginner.
1
vote
1answer
63 views

I need some help getting data from a rangefinder

I have wired up my range finder (CJVL53L0XV2) to a breadboard for testing and have run the arduino example code for the rangefinder. The rangefinder works, but I do not know how to take the distance ...
0
votes
2answers
124 views

Programming Servo How To Get -90 Degrees

as the question title states, how will I go about turning the servo opposite of 90 degrees? I have written my code as such; // Turn servo to the right if(x > 520 && y < 510 &&...
0
votes
2answers
350 views

Regarding PGA bypass in ADS1262

I want to bypass the PGA to change the input signal range from +/-2.5 to 0/5 V range. I have taken the reference of example given in this library. I have interfaced protocentral-ads1262-32-bit-...
1
vote
2answers
94 views

Counter program

I'm an absolute beginner, and lately I had some problem with this program I was trying to do. Basically I wanted with the Arduino to count 3 pulses from an oscillator and store the time of these 3 ...
1
vote
3answers
9k views

Global variables use to much space in the dynamic memory

I use two simple libraries (see 1, 2) I found online for my code on the Arduino Uno, unfortunately I also use ROS and all those libraries take away to much space, when I compile my code I get this ...
0
votes
3answers
51 views

What's the most direct way to assign Serial.read() bytes to an array?

I'm trying to send NMEA 0183 sentences through LoRa. Every dinstict NMEA message looks like several char arrays (sentences) followed by '\n'. In the below picture we see one NMEA distinct message: ...
2
votes
1answer
36 views

WebSocket Server for MKR1000

I was looking for a websocket server for my MKR100 but nothing I found looks it works. I tried all the libraries that come with arduino but half of those doesn't compile on MKR1000 and those that did ...
-1
votes
1answer
33 views

Sending data struct with 2 int fields from Arduino to Raspberry via NRF24L01

I'm trying to do wireless thermometer on max31865 arduino and nrf24l01 but I'm having problem sending whole data struct I can send int or char arrays but when I try to send whole struct I got output ...
1
vote
0answers
16 views

Arduino and ZMPT101B But Not Stable Sigma Output In 7segment Display(TM1637) using filter library

#include <Arduino.h> #include <math.h> //TRUE RMS START #include <Filters.h> //Easy library to do the calculations #include <TM1637Display.h> float testFrequency = 100; ...
1
vote
1answer
52 views

Problem with if condition

So my project is including detecting the temperature in the room by using dth11 sensor. my idea is to add 3 LED lights were each light represent the temperature if its cold or hot or perfect. the ...
0
votes
2answers
90 views

How to set cables to connect Cp2102 to Pro Mini?

How to connect the cables in order to program the pro mini with the CP2102 usb interface ? The TX RX and GND is easy, but I am not sure about the RST, DTR, DST, etc I attached the images of both. ...
3
votes
2answers
349 views

DS18B20 with only OneWire library

Peter Scargill found a way to use DS18B20 temperature sensor without any library and just using OneWire library, and it's amazing how blazing fast it is! (it's an old article from 2013) #include <...
0
votes
1answer
51 views

connected between 2 arduino

i want to connect SPI 2 arduino master and slave through the MUX , to write and read in external memory , when the master write in memory slave read . pls help . code to master #include <SPI.h&...
1
vote
2answers
114 views

Detecting an incoming 7.875 kHz pulse to use as trigger

I have written a code that detects an incoming pulse (square) of 7.875 kHz to trigger the output High for the entire duration of pulse, and trigger the output low if the pulse is off or not detected. ...
0
votes
1answer
65 views

Run a part of a code only 4 second

I have two different programs written for my Arduino. One control the rockets thrust vector. The other one is for parachute. I need to first run rotationmatrices() for a 4 second and then parachute. ...
2
votes
3answers
1k views

Using an accelerometer with an Arduino as a shock sensor

I really need some help. I have absolutely no experience with accelerometers and have a project that would work great if I could integrate one into it. I am not hinting to have some write me a code, ...
1
vote
1answer
35 views

I want to program multiple arduino at once

I am aware that using a USB Hub you can attach multiple arduino to one computer and either upload code one by one or use bash script to upload code on all arduinos together. But you can attach only as ...
0
votes
1answer
185 views

Ultrasonic sensor and ledstrip color problem

So I've made a parking sensor with the Ultrasonic sensor and a ledstrip. But the ledstrip doesn't turn yellow or green. I think it has to do with the Thresholds. Can anyone help me to set this up? I ...
1
vote
1answer
44 views

More effecient datalogging code

Background: I am using a Teensy 3.6 to data log over a dozen sensors. I am printing to Serial1 for local Serial access, Serial3 for remote access (via xbee, same data is on Serial1 as on Serail3, just ...
1
vote
1answer
34 views

Please , explain about MAX30100 using for Arduino to read ADC in format (0-1023) [closed]

can anyone help me..? I am using MAX30100 with arduino, and my expectation is i can to process the ADC as usual (0-1023), but I do not understand the signal processing. Has anyone used the MAX30100 ...

1
2 3 4 5
30