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

How do I program an LCD screen and do I need an Arduino

I am trying to create a small device with a screen that tells the date and time. I am thinking of using a UCTRONICS 0.96 Inch OLED Module (type that on Amazon). I am very new at coding, and I know ...
-3
votes
1answer
41 views

How to put a condition on HTTP.POST?

I set my code to if it executes HTTP.POST, the count will reset / back to zero, but I noticed that even it returns other http code than 201 (-1 or 500), the count still resets. How to put a condition ...
0
votes
1answer
49 views

Need help with millis () function for two linear actuators

Last week I was grateful to receive help programming the Arduino to control two linear actuators. I need help re-writing the code using the millis () function. I am more than happy to reimburse for ...
0
votes
0answers
25 views

How to understand arduino libraries [closed]

I'm new to arduino programming, and I want to learn programming without using any libraries. But did not find much resources to learn, so what I have decided is learn from the library source code. I ...
-1
votes
0answers
22 views

My question is about “expected unqualified-id before numeric constant” [closed]

I was trying something about a light that changes brightness depending on how bright it is around it from the "Arduino Projects Book" and it gave me the error "expected unqualified-id ...
0
votes
0answers
26 views

How to convert arduino code to be able to use with atmega 32 as standalone

So i have done a project using arduino and some ir sensors. But i wanted to try new things so i bought a standalone atmega 32 and a crystal ans assembeled the circuit to use that for the computation. ...
1
vote
1answer
32 views

How do I power a linear actuator at different speeds for specified periods of time

I am new to Arduino and wondering if anyone can help me get it programmed correctly. I am using two buttons to control a linear actuator to open and close a barn door. I want it to go a certain speed ...
0
votes
0answers
52 views

Infared: some controllers send code into infinite loop

I have a piece of code that captures input from infrared and spits it out to the serial port. When I use it with a simple controller that comes with a typical kit, it receives the infrared code just ...
0
votes
1answer
40 views

Splitting up code in multiple files causing `multiple definition` and `undefined reference` error

I have the following very basic program that reads MPU6050(accelerometer and gyroscope) sensor using the I2C library, and prints the sensor information. This program works as expected. #include <...
0
votes
0answers
11 views

query of arduino sketch with regards to employment of gsm sim900a module

what i'm trying to do is to send message to one whose no. is used in code about balance of sim_card plugged in sim900a. but i get commands in message or blank message after using ATE0. what i was ...
1
vote
1answer
33 views

Adding zero padding to decimal values

I want to add zero before the float number like this: 010.0 The code I'm using is this: if(value < 10){ lcd.print(F("0")); } lcd.print(value); But when the value is exactly 10, it ...
1
vote
2answers
54 views

Best Data model/Concept to Store Multi-Day Alarm for clock?

I'm writing a multiday day alarm program for a project. I'm not sure how I want to store the format of each of 10 alarms....I need to store it...in SPIFFS retrieve it(at boot) and then compare it to ...
1
vote
0answers
49 views

Binary to gray using arduino [closed]

I am using arduino two ic 4511 and two 7 segemnt I am trying to convert binary into Gray code and on one 7 segemnt I successfully showed binary of number as I use arduino pin 12,13,14 for input and ...
1
vote
0answers
28 views

Changing the servo motor operating direction using arduino

I want to turn the servo motor 90 degrees with the first double high inputs, then I want to turn the motor 180 degrees with double high inputs, but the motor turns 180 degrees with one high input. ...
0
votes
1answer
28 views

How to upload code to atmega32u4?

I recently created a pcb with the atmega32u4 to use it as a development board. The controller is connected to a micro usb port. Should I install the arduino bootloader instead of the deafult one? Or ...
1
vote
1answer
38 views

Why do I get different results when compiling the same code with different ide?

I have a basic code about reading true rms.I compiled the same code with arduino ide and atmel studio, then ran it in a proteus simulation.I'm trying to measure how long the read_rms() function takes. ...
0
votes
2answers
64 views

Rounding to the next upper (or lower) 0.1

I'm reading from a temperature sensor. I get float values with 2 decimals. I want to round them to nearest 0.1. This is my sketch: void setup() { Serial.begin(115200); } void loop() { float ...
0
votes
1answer
98 views

Bare Metal Programming of Due

I don't know much about Arduino but I am interested in buying a Due 32bit board. I was wondering if you can program it bare-metal and if this requires a separate debugger or not? Thanks
1
vote
0answers
39 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 ...
1
vote
0answers
26 views

Asymmetric encryption on a Teensy?

I want to monitor an input and then send the information in an encrypted way that can't be easily unlocked even if a malicious actor gets access to the device itself. I'm new to using the Teensy ...
1
vote
0answers
33 views

Bluetooth Controller

Im doing a project in which there are two arduinos with both of them having hc05 bluetooth modules. Now how to connect them both so that both stay connected and one is used as a remote control so that ...
1
vote
0answers
29 views

IR remote signal interference

Im trying to make an arduino project which uses IR remote control and does certain thing. My doubt is the weather the hex codes of some remotes be similar and if they are how to tell arduino to only ...
2
votes
2answers
49 views

RAM cost of entering functions

A friend has told me I shouldn't rely on functions because, during execution, they occupy a significant amount of RAM. Is that true or, if it isn't, what's the maximum suggested level of function ...
6
votes
5answers
2k views

Is there any better choice other than using delay() for a 6 hours delay?

I am designing this incubator system and I need to drive a motor forward and reverse every 6 hours. Is there any better choice other than using delay(). A 6 hours delay seems a little unprofessional.
0
votes
1answer
104 views

I can't find what I did wrong [closed]

int lightPin = 13; int buttonPin = 2 void setup() { pinMode(lightPin, OUTPUT); //red pinMode(buttonPin, INPUT); } void loop() { int buttonValue = digitalRead(buttonPin); if (buttonValue == ...
4
votes
1answer
82 views

Why does Arduino round off some integers but not others when my desktop PC does not do this?

I am writing (in C) some low level digit manipulation routines that convert int to float and vice versa for Arduino. I came across some puzzling behaviour with Arduino rounding some numbers but not ...
0
votes
1answer
45 views

arduino parking lot

I want to make a project where there is a parking lot and a ir sensor which senses when a car comes and displays a message on lcd saying to insert a rfid card and then it opens a gate and there are ...
0
votes
1answer
35 views

Question: how to join two different codes

I’m dabbling in Arduino and having trouble running two sketches on my Arduino UNO simultaneously. The first is about a program that reads temperature and relative humidity and the second is a program ...
0
votes
0answers
23 views

Is it possible to program an atmega32 via internet or remotely with Android app?

There is a board with atmega32 microcontroller, sim card and Bluetooth modules. I used to program this microcontroller using a serial port cable. As long as the circuit is able to connect to internet, ...
1
vote
0answers
30 views

How to change the update rate in TinyGPS++?

I am working with TinyGPS++ library and Arduino-nano and I want to change the update rate. I worked before with Adafruit GPS and uses the below code for updating it. // Set the update rate GPS....
1
vote
2answers
53 views

Read Comma Separated String

I have a string that looks like this "10.00,20.00,-50.00," in which these are angle values and they have 2 decimals and can be negative. I want to separate them into 3 separate floats. Here ...
3
votes
2answers
51 views

Arduino Nano randomly resetting

I am currently struggling with an intermittent problem with an Arduino project. Background I am using a LabVIEW program to control a few pieces of hardware. One of them is a NEMA 17 stepper motor that ...
0
votes
0answers
34 views

How does one upload a synthesized solution to the Arduino Vidor FPGA?

I've compiled a solution and have received a ttf file from Intel Quartus which is designed for the Vidor 4000 Arduino board. The file represents a synthesized bitstream to be sent to the FPGA. How do ...
1
vote
3answers
107 views

How do i make my DC motors run simultaneously?

Im coding an adafruit motor shield for 3 DC motors to go forward & backwards, and so my concern is why only my motor3 is running the whole time and motors 1 & 2 are switching off meaning 1 ...
1
vote
1answer
35 views

Uno Wifi Rev2 Programming via Uno R3 ArduinoISP

I'm attempting to program Atmega4809 (Uno Wifi Rev2) via the ICSP pins on the board by connecting in this manner: The difference is that I have a Uno Wifi Rev2 on the right instead of a Uno R3. I've ...
3
votes
2answers
204 views

Form a signal from an array of bits

I need to reproduce with a digital pin of an Arduino such a key in the form of a sequence of 1's and 0's, where a one takes 2 ms high and 2 ms low, and a zero takes 1 ms high and 1 ms low. int key =...
0
votes
0answers
38 views

Set acceleration for stepper motor with no ending

I have a problem. I am using a stepper motor with 2 buttons. In my code I am trying to rotate the stepper motor clockwise while holding button1 and counter-clockwise while holding button2. To do that, ...
1
vote
2answers
51 views

(very new to C) I'm trying to use irsend with what I think is char* but it won't take it. How can I convert it to what it needs?

I'm attempting to use a raspberry pi to send ir codes directly to my arduino to have as simple as a C program as possible. Here's my code I've been tinkering with that leads to errors or not working ...
2
votes
1answer
45 views

TFMini Sensors with Arduino

I have three TFMini sensors I need all of them to detect. I only got one to work , pins 4,5 . My info in coding is basic . I really appreciate your help . Thanks in advance. I think the problem is ...
3
votes
1answer
44 views

Pass Color to a function without using a specific Adafruit_NeoPixel

I'm initializing my strips as an array: // Declare NeoPixel strip array: Adafruit_NeoPixel strip[] = { Adafruit_NeoPixel(LED_COUNT[0], LED_PIN[0], NEO_RGBW + NEO_KHZ800), Adafruit_NeoPixel(...
0
votes
1answer
19 views

Use Android on Arduino TFT

I don't know whether this is possible or not but is there any way that I can run something similar to Android on a normal TFT. I want to make complex graphics but can't program those complex programs ...
1
vote
0answers
30 views

How can I interface, received HC-12 data and transmit the received data using sx-1278 RF-module in arduino-UNO?

I am currently working on a project, where I need to send data from first unit to the second unit which is a few km apart, so I decided to go with hc-12 RF module as it covers upto 5km. Then the data ...
2
votes
3answers
57 views

Count specific range of output as 1 single output

The LDR sensor gives a range of values to show whether a LED is OFF/ON, let's say above LDR range 400, the led is ON. When a LED is ON, after reading the sensor values it shows above LDR range 800, ...
0
votes
0answers
28 views

combine the two sensors(DHT22 and Apds 9960 rgb gesture) code,, anyone help me? thankyou

i am making the prototype of my project using DHT22 and Apds 9960 RGB gesture with Ardunio, i dont know how to combine two sensor and at a time
1
vote
0answers
34 views

esp8266 sending to both webserver and myphpadmin

I have tried to send all the variables to both the webpage and to myphpadmin. I seperated the code into two functions and put the functions inside the void loop() function under the impression that it ...
0
votes
0answers
90 views

Alternatives to Nextion display

I am wanting to have a display where I can design the GUI on a program and then somehow transfer it to the display. For the graphics I want to make, it would be really hard to manually write the code. ...
1
vote
0answers
60 views

Programming multiple arduino at once

I actually made a prototype with multiplexing Chip select pin on Arduino, which connects to RESET pin of target board to program. When I am connecting one target board at once I am able to program it ...
1
vote
0answers
50 views

Help using uint32_t? Trying to feed arduino serial from raspberry pi. Any help is very very much appreciated

So I don't know C so I'm just trying to get some very very basic code running on my arduino to send it commands over serial. I'm feeding serial into buf irsend.sendNEC(0x210704FB, 32) this works but I ...
3
votes
2answers
75 views

'Servo_Pointer' was not declared in this scope

I can't seem to find the error I made; can anyone help me? The error message: 'Servo_Pointer' was not declared in this scope I get the error at the end of the code with the line: Servo_Pointer.write(...
0
votes
1answer
49 views

how can I stop my Arduino code after 1 second?

I want to send message NRF24L01 to NRF24L01. I want to see if I can send just one second. How can I stop code after 1 second?

1
2 3 4 5
32