Most Popular

1500 questions
5
votes
1 answer

How do I send a string to master using i2c

I want to write an Arduino program that simply recieves a string (via the I2C wire library) from a master Arduino, then waits for a request, and sends that string back. Here is my code: #include void setup() { Wire.begin(4); …
Hoytman
  • 747
  • 5
  • 13
  • 26
5
votes
2 answers

Not enough memory error using OneSheeld.h

I'm a dairy farmer and I'm new to playing around with Arduino's. I created a code to send me SMS's when my equipment stops working as it should, but I run into a "Not enough memory" error. Here's my code: #include int IPFeed = 13; …
5
votes
2 answers

Having difficulty uploading sketch to an Arduino Pro Mini

Having developed and tested a project using an Arduino Uno, I would now like to upload it to an Arduino Pro Mini (5V, 328, 16MHz) for semi-permanent, long-term use, but I can't get any sign of life from the Pro Mini. I'm using the latest Arduino IDE…
Tim Morley
  • 63
  • 1
  • 5
5
votes
1 answer

How arduino PORTB pins are addressed if I want to access them with pointer?

So Let say I want to access Digital Pin 13. Thats port B pin. Is there an memory address associated with this pin 13 of Arduino Uno r3? How Port B pins are addressed with corresponding pin numbers like What is the address of digital pin…
user786
  • 155
  • 7
5
votes
2 answers

Can I improve EEPROM lifetime by not changing bits?

In my current project I need to store the current elapsed time in hours to retrieve it in case of power loss. Since I am using a Arduino Nano I would ideally like to use the built in EEPROM without additional hardware. The written values and their…
maxmilgram
  • 151
  • 3
5
votes
1 answer

Powering fans and arduino pro mini from single 12v supply

So, I have a 5V Arduino Pro Mini, which is running the logic behind a multi-DHT22 sensor array, and using that input to control a 12v 24mm fan (12v, 0.16 A). This is currently a working board on an Arduino Nano with two separate power supplies (1 to…
jvc26
  • 255
  • 1
  • 2
  • 7
5
votes
1 answer

VSCode vs. Arduino IDE - same program, different behavior

I've got this simple program for testing DS18B20 temperature sensors. #include "OneWire.h" #include "DallasTemperature.h" #define ONE_WIRE_BUS D3 // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas…
Llaves
  • 261
  • 3
  • 10
5
votes
1 answer

Reading three signals sent serially on Simulink from Arduino

I am sending three signals from one Arduino mega to another using xbees. On the receiving end I am using these signals in a Simulink code to control servo motors. Currently it is set up to read from analog pins without the wireless set up. With the…
user734
  • 91
  • 1
  • 4
5
votes
1 answer

Ultrasonic Sensor scanning too often resulting in a whirring noise

I am using an HC-SRO4 ultrasonic sensor for a wall-avoidance, maze-solving robot. However, I have recently run into an issue where I am getting a whirring noise from the sensor because it is taking measurements way too often. This is the code I have…
5
votes
2 answers

Connect Arduino via TX RX Pins to Computer's USB Port

I want to avoid using the big USB B connector to program my Arduino Mega. Since there are those RX TX Pins I thought, it would be possible, to connect my USB - Wires from my PC directly to those RX TX Pins. D+ -> TX and D- RX. This Post on Arduino…
Joel
  • 185
  • 1
  • 2
  • 6
5
votes
1 answer

ESP32 how to preserve RTC time during brownout

I want to use the ESP32 built-in RTC clock. In my situation, my ESP32 will not have access to an NTP server I do not want to use external RTC modules ESP32 provides a pin VDD_RTC will powers the RTC domain exclusively My problem would be solved if I…
mquevedob
  • 51
  • 3
5
votes
1 answer

How Do I Send An Email WITHOUT An Ethernet or WiFi Shield

I can only find info relating to the wifi shield, but I want to send an email without the wifi shield. For now, I just plan on leaving my arduino plugged into a computer, so I just want to use the computer's network connection. Is there a library or…
rys
  • 153
  • 3
5
votes
1 answer

What does a delay(0) actually do?

I've seen some code where the developers add delay(0), it doesnt make sense, what does it do? Delay with zero milliseconds, why? bool DFRobotDFPlayerMini::waitAvailable(unsigned long duration){ unsigned long timer = millis(); if (!duration) { …
Sigma
  • 296
  • 4
  • 13
5
votes
3 answers

Can I corrupt my Arduino if it's unplugged during an upload?

When messing around with code and uploading a sketch to my Arduino board, I almost accidentally pulled out the USB cord. Everything is fine, but then I started thinking what would've happened if I had pulled it out. How safe is avrdude? Could it…
Anonymous Penguin
  • 6,285
  • 10
  • 32
  • 62
5
votes
1 answer

Delay() and millis() functions don't work in cpp external files

I'm currently facing an issue using delay() and millis() functions in an external cpp file. The issue is that when I used delay() in my main program (meaning .ino file) it works well but when I call the same function in an external cpp file, I'm…
Cyril_Ram
  • 53
  • 2