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.

162 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. ...
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, ...
2
votes
0answers
530 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
378 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
356 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
48 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
0answers
74 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
105 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
36 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 (...
1
vote
0answers
173 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 ...
1
vote
0answers
47 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 ...
1
vote
0answers
57 views

Zero-ing Compass | Following Magnet Strip Robot

So my problem is purely programming, I understand the problem but can't figure out what to do, Is there a library? should I create my own code for Zero-ing my compass so I don't have value from earth ...
1
vote
0answers
179 views

Installing Optiboot loader for pro mini 3.3V 8MHz

I have tried to install a better bootloader in some chinese Arduino pro mini boards. I have tried the OptiLoader application via an ArduinoAsISP. I failed in some way. The boards got unstable, I can ...
1
vote
0answers
75 views

ALLBOT knee joints not moving

I am trying to write a simple script for an ALLBOT, but am encountering a very peculiar issue. With the following code, I can align all the servos: #include <Servo.h> #include "constants.h" // ...
1
vote
0answers
2k views

ESP8266 library / function for IR remote control

I am using IRremoteESP8266 for reverse engineering Hitachi AX-M76E mini stereos IR controller. I want to read the signal that the remote sends and send the same hexas to the stereos with IR led. ...
1
vote
0answers
201 views

How to pass input from a Midi controller to a function?

I am trying to pass the input[], data1(pitch) from a Midi controller to the waitForButton function. When a key is pressed it sends data1(pitch) into the array input[], and when the key is up the array ...
1
vote
0answers
67 views

Changing function to work with Midi controller instead of buttons

I am trying to change up this function to work with a midi controller instead of buttons most of the code for the function i will be using as is. it just the parts of the code the deal with button ...
1
vote
0answers
37 views

Not hearing PlayBack from code that records and plays back MIDI

I have altered some code that i found online that records and playback midi data from a midi controller. from my testing i am pretty sure that notes are being recorded from my midi controller, i have ...
1
vote
0answers
401 views

How to play Midi from the Sparkfun Mp3 Player Shield?

in the video: https://www.youtube.com/watch?v=zc1zbwheyE0 I suspect they may be using the midi playback functionality of the chip (VS1053b) on the Mp3 shield. how do you playback Midi from the mp3 ...
1
vote
0answers
506 views

Arduino Serial Communication Issue

I state that I have already written a similar question on StackOverflow thinking that the problem is with my computer software. Anyway, after some shell debugs, I notice that the real issue is on the ...
1
vote
0answers
63 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: ...
1
vote
0answers
249 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 ...
1
vote
0answers
225 views

OV7670 non FIFO with AL440?

I am trying to build a low-cost Arduino-based camera image to SD card prototype and would like to know if it is feasible to connect a non-FIFO OV7670 camera to an AL440B video buffer to avoid the ...
1
vote
0answers
209 views

Connection between Matlab and Arduino

I'm trying to connect Maltab and Arduino by this code: arduino=serial('COM7','BaudRate',9600); fopen(arduino); But I get this message: Open failed: Port: COM7 is not available. No ports are ...
1
vote
0answers
465 views

Arduino programming attiny13a

Hello I want to program an Attiny13a with Arduino code. I always have this error when I add repository "no file board.txt" in path. How to successfully configure IDE to able burn on it? I use : Link ...
1
vote
0answers
317 views

How to generate Analog Signal (Voice) to the microphone

I have question about microphone and generating sound signal. I have microphone in my intercom at home. It is simple analog microphone, not digital. What I want is to connect arduino analog ...
1
vote
0answers
2k views

Pelco D Library for Arduino

Does anyone know of any Pelco D libraries available for Arduino? I already have a PTZ joystick controlling 3 PTZ cameras, but I would like to add an Arduino 'intelligent' controller capable of ...
1
vote
0answers
93 views

27 Servo Project, Uno with Adafruit's 16-Channel Drivers

I'm working on a project where I need to be able to control 27+ servos. The problem is that I am unsure how to control them from a computer. I'd love to build a simple program with a user interface ...
1
vote
0answers
561 views

7 Key Educational Piano with Capacitive Sensor

I am working on a project for grade 10 computer science. I am supposed to make a piano that has 7 keys using a capacitive sensor, and the piano is supposed to teach you songs like Twinkle Twinkle ...
1
vote
0answers
597 views

Checking string condition?

I'm looking for my Arduino board to jump to a function based on an if condition, where a string (content) is checked to see if it matches the word FALLEN. However, the if condition never occurs ...
1
vote
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 ...
1
vote
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
1answer
848 views

PC Cannot Access HC-06 Bluetooth COM Port

I have an HC-06 Bluetooth module connected to an Arduino UNO board to allow for the data received by the Ultrasonic sensor to be transferred to my PC via bluetooth and serial communication. I am using ...
1
vote
1answer
154 views

Quick Programming Check/Review

I've been racking my head trying to start programming in a library organized method. My code works, but the translation and split to a .h and .cpp file is riddled with errors. It's gotta be stupidly ...
1
vote
1answer
1k views

Issues with PIR Sensor triggering by itself

I am currently working on my first Arduino project and I am having some issues that I am seeking help with. The robot I am building must have human following capabilities and to do so I am using 3 PIR ...
0
votes
0answers
38 views

Can the Arduino Pro (Portenta H7) communicate between threads?

I have an application that runs a stepper motor from an Arduino board. This requires use of the delayMicroseconds(int us) to control the speed at which the motor turns. For this reason, all code ...
0
votes
0answers
41 views

Is there a way for an Arduino to flash another one without a computer?

I am going to create a game console. The games will be in an SD card and an Arduino (or an Atmega chip) will read a hex file's contents to RAM and will flash it to another one. Something like this but ...
0
votes
0answers
35 views

Construct char arrays within function

I'm pretty new to C++ / Arduino code, please bear with me. Following code currently gives me a Exception (28): epc1=0x40201287 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000. I ...
0
votes
1answer
37 views

Matrix and State Space Arduino Implementation

I wrote an Arduino Matrix class. Then I used this class to implement State Space on Arduino. During tests I stomped upon a problem. After starting the program it stops at some point. I have no idea ...
0
votes
1answer
33 views

what is causing my esp8266 setup function to reinitialise?

Here is code I have written: #include <stdio.h> #include <ESP8266WebServer.h> #define MAX_WIFI_INIT_RETRY 50 #define WIFI_RETRY_DELAY 500 const char* wifi_ssid = "ssid"; const char* ...
0
votes
1answer
40 views

Getting error invalid conversion from 'const char*' to 'const uint8_t*

I have written this sketch, and I am trying to populate the array of wifi hotspots to set the value in html select using javascript dynamically. #include <Arduino.h> #include <Hash.h> #...
0
votes
1answer
59 views

Arduino Project Interrupt Error?

I have a project to be made i.e. water Billing System using RFID(Mfrc522) on Arduino NANO. There is one difficulty that I haven't been able to overcome. I hope someone could help me out. Project flow: ...
0
votes
0answers
17 views

DS3231 clock module with cascaded FC-16 led matrix modules + Arduino Nano

I am using a DS3231 real time clock module and 4 cascaded FC-16 modules(they are basically MAX7219 led matrices based modules). My goal is to display a timetable, a schedule for a classroom on the ...
0
votes
0answers
24 views

Modbus programming

I have a Controllino Mega running a code that rotates a stepper one revolution CW, and one revoluction CCW. I need the program to run, just when a signal is received from an HMI that I have connected ...
0
votes
0answers
30 views

hello,i have an problem with my arduino with an lcd

i've totally done everything i could,but when i run my arduino uno with my 16*2 lcd (with i2c) . it has a higher brightness on the top and a lower one in the bottom. ive even tried putting example ...
0
votes
0answers
21 views

Control of 3 LEDs over Bluetooth using MIT App Inventor

As per title, I have 3 LEDs connected to an Uno. Also connected is an HC-05. edit: forgot to add a question, my bad. Is there any glaring major issues in this code that I've overlooked? Not ...
0
votes
2answers
57 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 ...
0
votes
0answers
23 views

Simulate MPU6050

I’m not able to occur myself an MPU6050 on these circumstances, so is it possible to simulate the MPU6050 on Proteus or a similar software ?!
0
votes
1answer
237 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
0answers
22 views

Error compile board LOLIN(WEMOS) D1 R2 & mini

I have a wemos d1 mini and a mpu 6060 sensor. I am trying to send the data from the sensor to Firebase. However i have come across a hurdle which i cant seem to solve. This is my error, can you help ...