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.

190 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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. ...
3
votes
0answers
32 views

ESP32 3v3 logic needs to be stepped up to 5 V for the DRV8825 driver?

A stepper motor program successfully runs from an Arduino Uno. When I change to an ESP32 development board, the motors make little sounds and do not move. I troubleshooted, and all the voltages seem ...
3
votes
0answers
36 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
0answers
381 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
1answer
38 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 ...
2
votes
0answers
53 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
27 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
35 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
65 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
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
0answers
281 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
543 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
209 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
366 views

USB Keyboard in Retro Emulators

I have created a retro keyobard using a ZX spectrum and a PRO MICRO based on the info here: http://blog.tynemouthsoftware.co.uk/2013/04/arduino-leonardo-based-zx81-usb-keyboard.html When plugged into ...
1
vote
0answers
36 views

Buzzer not working

First of all, i just bought my first arduino kit and start to learn how to do the code, so in the first place I want to know if my code is kinda right :b I am trying to elaborate a program that uses ...
1
vote
0answers
28 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
29 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
54 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
44 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
36 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
48 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
22 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
25 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
vote
0answers
29 views

Clocking issues while programming ATMEGA32U4-AU via USB bootloader

Hi, I'm designing a custom board with the ATMEGA32U4, with a GPS receiver and LoRa radio and it is powered from a LiPo battery. Since I'll need to make hundreds of this board later on, I'd like to ...
1
vote
0answers
49 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
79 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
54 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 ...
1
vote
0answers
21 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
2answers
71 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....
1
vote
1answer
51 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 ...
1
vote
0answers
54 views

How to get my LCD contentiously updating with data from sensor?

EDIT DOWNSTAIRS: Hello beautiful people of the internet! How are you smart people doing with all that's going on these days. Okay so the title says it pretty much. I've got a code and inside of my if'...
1
vote
1answer
231 views

24/14 second countdown timer or shot clock for basket ball start/stop button doesn't respond well

Start button doesn't respond correctly, i can't figure out whats wrong with the code ? pls help, this code is for 24 second and 14 second countdown timers in a same unit comes with three physical ...
1
vote
0answers
248 views

Ethernet TCP communication between two arduinos not working

So I've got two arduinos Leonardo ETH, both plugged into a local network I host on my computer, and I'm trying to make them communicate through ethernet. One of my arduinos is collecting data from 2 ...
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
154 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 ...
1
vote
0answers
32 views

How to adapt this code using a DF Mini Player and interrupts for the ATTiny85?

So I programmed my Arduino Mega 2560 to play certain sound effects from a DF Mini Player that I have. I took the base code that I modified from online so some fo the names might seem odd. Currently, ...
1
vote
0answers
89 views

Having problem in coding Arduino Uno

I'm making a timer program which takes the Time Duration as input from the user by two button switches (one for 'up' and one for 'down'), and after pressing an another button switch ('start'), the ...
1
vote
0answers
27 views

UV sensor help!

I am creating a uv sensor. The sensor detects a certain amount of UV light and turns on the respective light (eg uv of 1-3 turns on a blue light). However I am getting an error: "expected primary-...
1
vote
0answers
499 views

Is it possible to convert RCA(video only) to Arduino Uno then to a computer?

I have an old wireless RCA output camera. I was wondering if I can convert its analog input to a digital one and have it saved on a file in my laptop?
1
vote
0answers
84 views

ARDUINO PROGRAM

I have a project that consists in measuring the mass of an object with a strain gauge HX711. so I found an interesting Arduino program and the editing that goes with it. but I have a problem, I ...
1
vote
0answers
225 views

UDP Packet not receiving

I started a project where I wanted to send sensor data from one arduino to another and let this 2nd Arduino send the data to a tablet to visualize sensordata like speed, temperature etc. I wanted to ...
1
vote
0answers
39 views

Trouble running two NEMA 17's with a joystick

So I'm trying to make a motorized dobsonian telescope using two NEMA 17 motors with Easy Driver boards. I want to control the x and y axis with a joystick. I found a code that ran one with a joystick ...
1
vote
0answers
154 views

Clear Timer on Compare or CTC in ATmega328P, Toggle OC0A on Compare Match

I want to use the CTC on the ATmega328P to play same notes with a speaker, a project that I find in this book. In the data sheet I read: For generating a waveform output in CTC mode, the OC0A ...
1
vote
0answers
82 views

Serial communication problem NodeMCU

this is my first post here. Before I ask you my problem, I'm sorry if I'm wrong to write but my English is bad. So, my problem is this: I'm developing a "client-server" system with serial ...
1
vote
0answers
392 views

invalid pure specifier (only '= 0' is allowed) before 'int'

#include <PixySPI_SS.h> #include <Pixy.h> #include <Adafruit_MotorShield.h> #define X_CENTER ((PIXY_MAX_X-PIXY_MIN_X)/2) #define Y_CENTER ((PIXY_MAX_Y-PIXY_MIN_Y)...
1
vote
0answers
54 views

how do i fill an array from a grayscale sensor (SKU:SEN0147)?

I'm designing a safe lock of 4 digits, but the password is in terms of colors, I have 3 colors. we are obliged to use a grayscale sensor (SKU: SEN0147). The assignment is as follows: Write a program ...
1
vote
0answers
734 views

ESP8266 to send data to thingspeak while doing unblocked read on Serial.readString()

I have a requirement to get RFID data on Arduido UNO and send it to ESP8266 to be sent to ThingSpeak via the Wifi module. However, ESP8266 is also programmed to send Temperature and humidity data to ...