Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

The process of designing and writing source code as part of a program (or sketch) for Arduino. Do not use for uploading to an Arduino board.

0
votes
1answer
12 views

Can I use GSM and Data Logger Shield at the same time on one Arduino?

Me and my classmates are trying to make an arduino base project where we will be using sensors, GSM, and Data logger shield. We want the arduino to store the data collected and at the same time send a ...
0
votes
0answers
17 views

Reading raw values from MPU6050 using Arduino Mega

I am trying to connect Arduino Mega with a gyroscope/accelerometer with 6DOF, using MPU6050 micro ship. While searhing online, I found lots of codes with more than 200 lines, to just read raw values ...
0
votes
0answers
26 views

Lost code already loaded on Adruino Pro mini [duplicate]

Can I retrieve the code from an already programmed Adruino Pro mini 328? I have found avrdude who can make a perfect copy of the loaded firmware, but I just want to have the code back.
1
vote
2answers
35 views

Stopping a countdown timer when it hits 0 [closed]

I am trying to modify the following sketch to count down (which seems to be partially working). What do I need to modify, to get the timer to stop at zero? Right now it counts down from 10 seconds, ...
0
votes
1answer
24 views

How to upload program to custom arduino board without USB FTDI and making it read only? [duplicate]

If I was to mass produce a microcontroller board I have designed based around the atmega328 (very similar to an arduino uno) but for one embedded task where I want one program only to be stored on it. ...
1
vote
1answer
36 views

How to interface USB to custom Arduino Uno Schematic and programming atmega?

I'm fairly new to designing schematics and working with the atmega on its own and I'm designing an arduino schematic on eagle. Ive gotten to the stage where I need to incorporate a TTL USB interface ...
0
votes
1answer
42 views

How to automatically reset the nrf24l01+ with code?

I have two separate nrf24l01+ connected to two different Arduino UNOs, one as TX and the other as RX. The problem is the connection stops after a while between them. On the Arduino COM screen I have ...
0
votes
2answers
27 views

freeMemory() function from memoryfree library not returning decreased value in arduino UNO

I burned the code written below, I expect that as we declare the local variable in the loop, freeMemory() function should return decreased value. But it remains constant..! please explain why..? The ...
0
votes
1answer
13 views

MemoryFree library showing Irregular Behaviour..!

I simply burned the code written below but it is showing me irregular behaviour.. as in output's last paragraph, free memory increases after a runtime allocation, how it is possible? The output is ...
1
vote
4answers
61 views

Hex/Byte Reversing and Conversion

I'm working on an RFID system using a MFRC522 with this Library : https://github.com/miguelbalboa/rfid Here's the code I have right now: int A=(mfrc522.uid.uidByte[0]); int B=(mfrc522.uid.uidByte[1]);...
0
votes
0answers
31 views

MemoryFree library showing free memory more than capacity of Atmega328Pu MCU

I simply burned the code written below but it is showing me free memory as 2299 bytes please somebody clarify that how in an Atmega328pu can have 2299 bytes free with an overall capacity of 2048 bytes....
1
vote
1answer
20 views

Can't upload code to an Arduino LilyPad using FTDI

I've tried to upload my code to an Arduino LilyPad (328) using an FTDI basic breakout, but i get this: avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: ...
0
votes
1answer
33 views

Password.h and keypad.h change pass sketch for Arduino [closed]

I have a fixed password. If letter "D" is pressed on the keyboard and the correct password is entered, the fixed password will be then changed. This newly entered password is now the correct password, ...
1
vote
2answers
16 views

Reconstruct uint32_t from char array to RTC.set

I am currently experimenting with a Digistump ATTiny85. Since it has no Serial, I use the basic DigiUSB library for communication. The RTC library used is this one: https://github.com/JChristensen/...
0
votes
0answers
58 views

How to make use of HeatIndex and DewPoint. with BME280 library?

Modified library example using HeatIndex and DewPoint calculations; from the BME280 Library by Tyler Glenn. /* BME280 I2C Test.ino This code shows how to record data from the BME280 ...
0
votes
2answers
22 views

Can I control relays through an Arduino while using USB joystick? [closed]

I was curious if i could control maximum of 9-10 relays with an arduino while using USB joystick? Id also want to connect a camera to see what my robot is doing, so i had few ideas. 1. Try and do it ...
-2
votes
1answer
51 views

hx711 and load cell read out 0 for calibration

I'm using this tutorial from Sparkfun https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide And using THEIR code. The only difference is I added a delay so it wouldn't ...
0
votes
1answer
23 views

Fade effect analog RGB strip and NodeMCU

I have an analog or dumb RGB strip that I control with HTTP commands. I want to be able to make the strip fade between different colours when I call http://XX.X.X.XXX/fade. I want it to do this ...
0
votes
1answer
37 views

Way(s) to store an integer from the serial output and sutract it from the next Serial output

This seems so simple but I can't solve it. (I'm new to Programming) I do not want to use EEPROM. Just store it and do the math. I strip the Azmuth and Elevation values from a satellite tracker program ...
-3
votes
1answer
29 views

Coding multiple servos in Arduino [closed]

I'm a first year persuing Mechatronic engineering, and I'm having trouble with this code that I am using to control a biped robot for my project. #include <servo.h> Servo myservoa; ...
0
votes
1answer
37 views

How will I solve my problem : expected primary-expression before '>' token [closed]

// defines pins numbers const int trigPin = A0; const int echoPin = A1; // defines variables long duration; int distance; #include <moving.h> #include <Servo.h> Servo servo; moving car(...
-2
votes
1answer
31 views

a code problem for arduino GSM 1400 to send a SMS when tilt movment is detected using accelerometer [duplicate]

There is a mistake in the design implementation of the code probably in if statment - when using the serial monitor it repeatedly shows printf() statements from the code instead of "Sending SMS ...
0
votes
0answers
29 views

Where to find MegaDueShield.h?

Hackster has a project that uses this as an include. I can't find it anywhere.
0
votes
0answers
17 views

Save my data into different tables

I use this library EDB master I want to save my data into 3 different tables what's the best way to do this? #include "Arduino.h" #include <EDB.h> // Use the external SPI SD card as storage #...
2
votes
2answers
136 views

HC-05 bluetooth module not accepting AT commands

I have been attempting to program my HC-05 ZS-040 Bluetooth module for quite some time, and I cannot get the AT commands to return any values. I have searched google for quite some time, and I none of ...
0
votes
1answer
49 views

Arduino OTA port not updating in Arduino IDE

The OTA (from the ArduinoOTA library) on my ESP8266 does not show up in the programming ports on the Arduino IDE unless I restart the IDE. Even when I plug in a usb cable and the ports list updates ...
-2
votes
1answer
18 views

I want to add a interval of 1 minute in the code to display output continuously for one minute and than not display it for other minute? [closed]

/* MPU6050 Triple Axis Gyroscope & Accelerometer. Pitch & Roll Accelerometer Example. Read more: http://www.jarzebski.pl/arduino/czujniki-i-sensory/3-osiowy-zyroskop-i-akcelerometr-...
0
votes
2answers
39 views

Reed Sensor matrix for chess board query

NOTE: This is not a question that has been answered previously in similar questions. I am using an arduino Mega I have gone through Bergers Blog(schematic is in this link), but have been breaking my ...
0
votes
1answer
35 views

Where can I find the code for Arduino's “attachInterrupt”?

Where can I find the code for Arduino's attachInterrupt function? A search on the Arduino's Github repo yielded nothing. I suspect it might be a wrapper for some avr-libc function but nothing in the ...
-3
votes
1answer
54 views

whats wrong. idk what im doing [closed]

#include <IRremote.h> #include <LiquidCrystal.h> #define first_key 48703 int receiver_pin = 2; int first_led_pin = 7; pinMode(first_led_pin, OUTPUT) if(receiver.decode(&output){ ...
-1
votes
1answer
49 views

I want a code for 6 LDR/LED pair

Each LDR is connected to one LED because I am doing a parking lot model. I have tried but with no luck. Help! int ledPin = 11; int sensorInput = A0; boolean ledIsOn = false; void setup() { ...
0
votes
1answer
40 views

Trying to read the current position of a flex sensor and store it as a variable? NANO ATmega328p

I am trying to write a code to read the current position of a flex sensor when a button is pushed and use that data to pulse a piezo. I set it up to read the flex sensor and to alarm when it gets 100 ...
0
votes
1answer
25 views

Need help with an Arduino project using a RTC and LEDs

I need some help with a project I am doing involving the DS1307 RTC. I am trying to make what is essentially a way to mins quickly check the time which involves nine LEDs slowly lighting up every 10 ...
0
votes
1answer
63 views

Clock generator up to 8 MHz using pin 3 arduino nano

I would like to generate square signal up to 8 MHz using internal timer of arduino, I have done successfully in pin 11, but i want to change it in pin 3, but still stuck. Here is the code pinMode(11,...
0
votes
0answers
32 views

Can I output the movement(steps has done or degrees) of a stepper-motor that i manualy turned his axis?

I'm thinking for a project that involves a stepper motor; What I want to do with it is if I can somehow output the steps that has done when I manually rotate the axis ? I want to record that value ...
0
votes
2answers
53 views

Can I simulate a clock without an RTC connected? [closed]

I want to program for a timer that works as set timer such as in an oven where user can set their own time. One of the way I know is using an IC(RTC) for the timer. However, I don't have the IC yet ...
0
votes
1answer
85 views

How to digital read and send the data through serial to PC with speed around 2 MHz?

I would like to read analog data with frequency sampling around 2 MHz and send it to PC to be processed with python for digital oscilloscope. I use Arduino Nano. I have found ADC (AD9057, PDF) that ...
0
votes
0answers
55 views

Camera VC0706 No camera found?

I have followed steps of this tutorial https://www.elecfreaks.com/7861.html But the problem No camera found? #include camera_VC0706.h #include SD.h #include SoftwareSerial.h #define chipSelect 10 ...
0
votes
2answers
75 views

2 buttons, 1 servo, turn when pressed only

I have a code problem. I need to turn a servo clockwise or counter clockwise using 2 microswitches. The problem is that my code is fine on startup, but when i press the button the servo continues to ...
1
vote
1answer
44 views

strtok() command with Serial communicaton

After i take char* variable from serial communication, i use strtok to split variables with " ". But when i do that it acts like there is " " after every character. i dont know why. How can i fix this ...
4
votes
2answers
1k views

if/else statements without comparison operators and curly braces

I recently came across this code in a tutorial. The code works, but this form of syntax seems to differ quite a bit from https://www.arduino.cc/reference/en/language/structure/control-structure/if/, ...
1
vote
0answers
25 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 ...
0
votes
1answer
49 views

Rc receiver giving wrong values when controlling servo

So I'm building a helicopter. That why I need a receiver (tgy 9x) to read the values from my controller. Those values get passed to my Arduino due where some calculation happen and then get sent to ...
0
votes
1answer
196 views

“function” was not declared in this scope (called in setup)

I have this bit of code I'm trying to execute only once. but I seem to get this error every time I try to compile: "calcOppervlakte' was not declared in this scope" when it's being called in the setup....
2
votes
3answers
243 views

Arduino Uno programed from a Nvidia Jetson tx2

I'm trying to program my Arduino Uno with a Jetson tx2 and get the error avrdude: Send: 0 [30] [20] avrdude: ser_recv(): programmer is not responding avrdude: stk500_recv(): programmer is not ...
2
votes
3answers
38 views

Set variable value with serial?

so I need to make a arduino program, generates 2 random numbers, makes a + calculation with them and asks user the right answer. If the answer is right AKA Calculation==User Answer, then led is set to ...
0
votes
0answers
56 views

Problem on sms.GetSMS(pos,n,smsbuffer,100); - candidate expects 5 arguments, 4 provided

I have problems on sms.GetSMS(pos,n,smsbuffer,100);. This is my coding: #include <LiquidCrystal.h> #include "SIM900.h" #include "sms.h" #include "SoftwareSerial.h" #include "sms.h" #include &...
-1
votes
2answers
32 views

Do prototypes need to follow the order of the functions? [closed]

I define prototypes prior to calling the functions. Does the order of the prototypes have to match the order of the functions in the code? I'd like to sort the prototypes alphabetically, while I ...
1
vote
1answer
65 views

When RFID tag is removed

After rewriting and getting a good grip on what I have got in my sketch so far, I need some assistance. So in my sketch I can play an MP3 track with a certain tag, but when that tag is removed I can'...
0
votes
1answer
83 views

Program doesn't read memory well

My program does not read the contents of the memory card, in this case the file "objects.txt". What I wanted to do was: the program reads the objects contained in the text file and allocates the table,...