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.

207 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
107 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 ...
3
votes
1answer
160 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 ...
3
votes
0answers
383 views

How do I install a library in Arduino Yun cross compile environment?

A few days ago, I've asked this question. Thanks to the replies I've received, I've set up a cross compile environment for Yun by following this guide. I've created a virtual machine with virtualbox ...
2
votes
0answers
31 views

Arduino buzzer code sequence not triggering

I have a problem with my arduino buzzer: the code should be doing the following: I have a security system where in order to open the door you have to enter a 4 digit code from the remote. If the code ...
2
votes
0answers
69 views

Please help with my tinkercad code. Debouncing stopwatch with lcd

#include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int ssPin = 8; int resetPin = 9; bool cntrRunning = false; int sec = 0; int min = 0; double currentMillis; void setup() { ...
2
votes
0answers
30 views

loop once per startup for stepper motor

First of all sorry that i dont know much about programming, most of my codes are just copy paste. And of course, i know this question has been asked before, but while using this code: #include <...
2
votes
1answer
58 views

RS-485 Serial communication problem with arduino

I use 485 modules to transmit data serially from one arduino uno to another uno. If I connect the 2 arduino boards directly without using the rs485 module, the data is sent and received without a ...
2
votes
1answer
75 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 ...
2
votes
0answers
62 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
0answers
38 views

Troubleshooting Program using sensors and actuators

I am doing a project on waste management. I have to separate waste majorly as metal, plastic and other materials. For that using Arduino Mega 2560. I have connected Inductive proximity sensor @ A0 (...
2
votes
1answer
126 views

LCD displays an “A” instead of 0

I am trying to make a timer that has a accuracy up to 1 tenth of a second. However when it is suppose to print "0", it will print an "A". For example, when printing "10", it will print "1A". This ...
2
votes
0answers
417 views

Ideal voltage level for attachInterrupt()

Well I am working on old textile machines, it is taking motor RPM with ISR. I want to read this RPM and publish on web. but the output voltage of this old system is 0 and 22 Volt. (0 Volt when the ...
2
votes
0answers
49 views

Arduino Communication with Xbee

I'm trying to establish a wireless connection between two Arduino's(M0) using xbee s2c, one Arduino as the sender and other as the receiver. But I am not able to receive the message what the Arduino ...
2
votes
0answers
552 views

Do software SPI read from a register using shiftin()

How to read from a register using software SPI, presumably shiftin()? It works using the builtin SPI library + hardware SPI. I seem to be able to write but not read using manual shiftin()/shiftout()...
2
votes
0answers
65 views

Issue regarding executing sketch code when not connected to USB

`I have an Arduino Uno A000066 Board R3 that has an Arduino A000079 Motor Shield Rev3 attached to it. Also I have connected two DC Servo Motors to the Motor Shield and wrote the following sequence: ...
2
votes
0answers
253 views

Problem with my Arduino project

I am making a smart bin which automatically sense (with the help of IR sensor ) and dispose the trash by moving with help of DC geared motor 12V 60 RPM and it also detects for obstacles with the help ...
2
votes
1answer
212 views

Background processes - Arduino Mega and SeeedStudio CAN shield

I am attempting to interface an Arduino Mega 2560 with a system of four Black Jaguar motor controllers connected in CAN. I'm using the CAN shield from SeeedStudios to accomplish this. The way Jaguars ...
2
votes
0answers
5k views

Aduino Due Can messages

I am trying to read/send CanBus messages using a Arduino Due. As of now I have used https://github.com/collin80/due_can library to setup my Can Bus interface. I am using Vector Software CanAylzer ...
2
votes
0answers
1k views

MODbus response for configure data

I am not able to receive data. I am able to send data from master but am not getting any response. This program uploaded successfully. I have below setup to monitor data from Modbus. I have included ...
1
vote
0answers
26 views

Expected initializer before 'myservo'

Hello i am getting into Arduino and want to get my code tidy. I dont know how but thought by #include "Stepper.h" and "Servo.h" would work. The programm shows it works. But now it ...
1
vote
1answer
30 views

Is there a way to go to the start of the void loop() function kind of like a “continue” keyword in c in loops?

I am new to Arduino programming and am trying to make an obstacle avoiding car with an ultrasonic sensor and a differential driver model. While learning how to code it, I learned that you can exit the ...
1
vote
0answers
26 views

Problem getting data from Arduino pro mini

I am currently working on a drone project using multiwii. I m using mpu6050 as gyro and accelerometer sensor with i2c protocol. I was able to read data coming from mpu6050 while using Arduino Uno ...
1
vote
0answers
23 views

Arduino Mega with Sensors and tftlcd 2.4 inch

I am working with tftlcd 2.4 inch with Arduino mega 2560 board. In this code I just want to show clock as my default or home screen. By clicking on clock at any point on screen user should get a new ...
1
vote
0answers
14 views

Error in program that measures distance from a ultrasonic sensor

I am trying to use an ultrasonic sensor in conjuncture with different devices like a proximity sensor and a solenoid and alarm. This is how the project is supposed to work: A container is placed on a ...
1
vote
0answers
16 views

Use AGPS functionality with Arduino and GPS module

Recently, we developed the UTRAQ L100 GNSS Module base board for testing all the capabilities of the GPS receiver. https://www.elementzonline.com/blog/utraq-gps-l100-module-based-on-irnss-supported-by-...
1
vote
0answers
27 views

Create a 7 segment display out of controllable LED strips to display digits

Highschool newbie here I'm trying to create a 7 segment two-digit display (88 shaped) to display the number of times a distance sensor detects something passing in front of it Here's what I've done so ...
1
vote
0answers
39 views

Problem using sequential loop

So I have created this project to have an LED blinking at a constant speed whenever the program is running. The first LED (green) will blink faster and faster the closer an object gets to the sensor. ...
1
vote
0answers
41 views

converting int or float into bytes array in arduino

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

Touch sensor trouble

I need help I use Touch Sensor(T)v.0 and it always receives a signal not matter I touched it or not. Here is the code. #define TOUCH_PIN 7 int touchVal = 0; void setup() { Serial.begin(115200); ...
1
vote
0answers
21 views

Directly synthesising an OOK modulated LF signal using a CSV file

I'm looking to transmit some data (CSV files) from a measurement instrument underground to a receiver on the surface. I've learned that in order to penetrate the limestone, low frequencies have to be ...
1
vote
0answers
75 views

Arduino mega PinChangeInterrupt with 16 bit timer

With reference to this question ::I have written a program by using 16-bit timer, The program is as follows . volatile uint32_t ovfCount = 0; struct Pulse { uint32_t last_toggle; uint32_t width; ...
1
vote
0answers
39 views

How do I take nrf24l01 received data and place its value into another sketch

I am working ( attempting more like it). To complete a direction sketch showing up to 360 degree rotation remotely using nrf24l01 modules. I have succeeded following Robin2 examples up to this point. ...
1
vote
0answers
69 views

Arduino interface of push button and led using millis()

I am working on a project of blinking of led using push button without delay().The limitations of led blinking is in accordance with the no of times the push button is pressed the led should blink ...
1
vote
0answers
40 views

Storing data in Arduino Portenta H7's SDRAM

I am working on storing data from Portenta H7's ADC through a high sample rate (>100kSa/sec) per channel. I am using 2 ADC channel for my work. Through the forum, I learned that the serial. print ...
1
vote
0answers
29 views

Aurdino EMG sensors and servos?

I'm new here and to the aurdino. I'm building a 3D printed robotic arm controlled by a EMG sensor. I purchased a V3 EMG board and leads on Aliexpress. Here's a list of the things I've purchase for ...
1
vote
0answers
33 views

Controlling fluid flow with ball valve and flow control using arduino

I am pondering on a project to do the following : I want to control fluid rate using a ball valve and servo/stepper motor I have a flow rate sensor that can give me a flow value. I want to use a 1602 ...
1
vote
0answers
33 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. ...
1
vote
1answer
48 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. ...
1
vote
0answers
89 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
35 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
36 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 ...
1
vote
0answers
50 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
0answers
33 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 ...
1
vote
0answers
45 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 ...
1
vote
0answers
71 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
58 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 ...
1
vote
0answers
40 views

Can someone check my schematic and code? My Led is not turning on

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 ...
1
vote
1answer
86 views

Bluetooth module(HC 05) issues

I am trying to make a Bluetooth controlled 4WD robot. i was following a tutorial i found online (https://howtomechatronics.com/tutorials/arduino/arduino-robot-car-wireless-control-using-hc-05-...
1
vote
0answers
28 views

How do I reset to servo position everytime I excecute a particular sequence

I'm trying to make a prosthetic hand that can play rock, paper, scissors with a human. It is based on the premise that you push a button and it randomly selects a move to play. After each move, I'd ...
1
vote
1answer
31 views

AMIS30543 | DataSheet Understanding CIRCULAR TRANSLATOR TABLE

I was reading the data sheet of AMIS-30543 stepper motor and I didn't understand fully what does this Circular Translator Table means, I have a couple of doubts What does Circular Translator table ...

1
2 3 4 5