Skip to main content
Share Your Experience: Take the 2024 Developer Survey
4 votes
Accepted

Why isn't this EEPROM.get() working?

EEPROM can't store string. It stores numbers. put() takes a type and stores that type as numbers. The char[] isn't a string - it's a number. More specifically it's a memory address for where the ...
Majenko's user avatar
  • 105k
4 votes
Accepted

How to determine when a sensor's output signal changes significantly?

There is no simple and universal way of deciding what is to be considered a “significant” change. My recommendation would be to create an algorithm by playing with the data on your computer: Upload a ...
Edgar Bonet's user avatar
  • 43.3k
3 votes
Accepted

Arduino I2C external 32Kb fram data organization

It'll be easier if you use a struct, not a union. Store all the data you want to preserve in a struct, then cast a pointer to it to be a byte pointer and just treat it as an array of bytes and read ...
romkey's user avatar
  • 1,554
3 votes

Number of digits setting for serial printing the sensor output value

Three if statements look a bit simplistic, but are much better in code size than sprintf, if that's the only usage for sprintf. if (number < 1000) Serial.write('0'); if (number < 100) Serial....
DataFiddler's user avatar
  • 1,045
3 votes

Number of digits setting for serial printing the sensor output value

You can use the C function sprintf: char text[5]; sprintf(text, "%04d", number); Serial.println(text); The leading 0 in 04d will add zero's for the length (4) is met, so 1 will become 0001, 10 will ...
Michel Keijzers's user avatar
3 votes
Accepted

Arduino String: use a non-null-terminated char array?

Assuming you are talking about the function bool painlessMesh::sendBroadcast( String &msg, bool includeSelf = false) Then you'll see that ultimately, the library passes msg into the function ...
Maximilian Gerhardt's user avatar
3 votes

Problem converting character array into integer in arduino using atoi function

You have a few issues here. if (driver.recv(buf, &buflen)) { ... } You don't check the value of buflen after calling the recv() method. I didn't read the doc of the RH_ASK library you are ...
Edgar Bonet's user avatar
  • 43.3k
3 votes
Accepted

Why does the data I send to the server get rounded off and how do I send the entire float instead?

The constructor for the String object from float is this: String(double, unsigned char decimalPlaces=2); So if you don't want to have 2 decimal digits, you have to use String(someFloat, 3). Also you ...
KIIV's user avatar
  • 4,752
2 votes
Accepted

Writing data to a specific address in EEPROM

You are cycling outside the string, thus creating undefined behavior. Try replacing the second block with this: char first_eeprom_value1; if (state1 == LOW) { state1 = HIGH; char example_string1[...
frarugi87's user avatar
  • 2,721
2 votes

Two data outputs to be displayed on one 16x1 lcd display

You can use lcd.setCursor(x, y); To set the cursor. Than you can output text with lcd.print("Text"); Make sure you add spaces in case there is already text written to overwrite older text. You ...
Michel Keijzers's user avatar
2 votes

Passing serial data to Processing using something other than ln to trigger Processing

If I understand your question (which is not certain): Pick a different "trigger" byte that you won't be sending in your messages. Maybe TAB? In your "Processing" program, use: port.bufferUntil(...
NVRAM's user avatar
  • 161
2 votes
Accepted

Getting Accurate Velocity Readings From IMU

The process of integrating acceleration to derive velocity and integrating velocity to derive position are commonly known as dead reckoning. In this link it is stated: Dead reckoning is subject to ...
st2000's user avatar
  • 7,338
2 votes

Question on how "f" value is calculated in converting Morse Code to laser audio from this tutorial

This is not a good tutorial. The receiver works by assuming 14 dotLen time periods for each character. There is a loop that runs 14 times, with a 200ms delay between each iteration. If the laser is ...
jose can u c's user avatar
  • 6,974
2 votes

Arduino MKR GMS alternative

There are multiple options for this project as you just want to send/ upload data on the cloud server rather than using Arduino MKR 1400 you can use any of the following. Arduino UNO with GSM module: ...
Maaz Sk's user avatar
  • 345
2 votes
Accepted

How to send data from one Arduino to another isolated?

[Consolidating an answer from the comments] A wired connection using Optical isolation (aka Optocouplers) is the recommended way to solve this problem. There are tutorials available online regarding ...
2 votes
Accepted

How can I log data to a thumb drive?

In principle you can log to a thumb drive any data you want, binary and text (thus also CSV). However, the Arduino Uno does not support connecting a USB stick directly. If you want to connect a USB ...
Michel Keijzers's user avatar
2 votes

How can I log data to a thumb drive?

[Updated] As an alternative to a Uno host shield, changing to a different Arduino MCU may also assist. USB host capabilty is needed for communicating with thumb drives. Some Arduino models have a ...
RowanP's user avatar
  • 869
1 vote

How to program an Arduino Uno to collect data using a timer interrupt and analyze that data in matlab?

I've configured the timer differently making use of its UserData property. The timer will update the data every fixed period for a specified number of samples. close all; clear all; % Some useful ...
tim's user avatar
  • 699
1 vote

Arduino : send data via satellite (or other solutions ? without GSM)

My two cents: A possibility might be LoRaWAN on the 2.4GHz spectrum, for which there are also satellites in orbit. The LoRaWAN ("Long Range Wide-Area-Network") protocol is based on a chirp-...
Maximilian Gerhardt's user avatar
1 vote

Is it possible to gather data while the Arduino is being powered with a battery, connect to comp, and then read off the values in Serial Monitor?

Yes, this is perfectly possible. You will need to write a routine that you can trigger via Serial. For example you will listen on Serial until you get the dump command. Then run a function that spits ...
Kwasmich's user avatar
  • 1,513
1 vote

Can an Arduino access a network database?

The M0 has a "native" USB interface. Because of that it can be programmed to appear as any kind of device you can image - as long as you can find (or write) the code to do that. You could (...
Majenko's user avatar
  • 105k
1 vote
Accepted

How can I split data coming from JSON?

Finally, I got it. I have fixed length of data. So, I use a counter to calculate the how many characters are there in my data. Now using the index of this characters, I find out proper data and then ...
Hasan's user avatar
  • 1,476
1 vote

Efficient way to store array with repeating values?

Without a better understanding of what the data is or how you intend to use it it's impossible to give you real recommendations. However it is simple enough to store your data in flash memory. ...
Majenko's user avatar
  • 105k
1 vote

Getting external data to the Arduino

It depends on the kind of data and where it will be coming from. Trigging your gate really only needs a signal to start moving, though a directional signal would be better ("Open" or "Close"). What is ...
JRobert's user avatar
  • 15.3k
1 vote
Accepted

Getting external data to the Arduino

How do people generally get data onto the Arduino, I found a lot of conflicting information online. There are various ways depending on what the data is and how you access it. Does this thing have ...
Majenko's user avatar
  • 105k
1 vote

How to get the free/used space on a SD card and transmit it

As SD.h includes #include "utility/SdFat.h" #include "utility/SdFatUtil.h" or if you use the SDfat library than this function is more efficient than going all over the place: #include <...
Codebreaker007's user avatar
1 vote

Receiving multiple Values from android via Bluetooth

If there are no other constraints, send them as a text with delimiters and a terminating character. e.g. something like "123;45;678\n" On the arduino, either manually check for those delimiters and ...
DataFiddler's user avatar
  • 1,045
1 vote

Can not receive data from Python code

It would be easier if you used Arduino <--> Python compatible libraries to ensure the communication between the two is robust and reliable. An example of such libraries would be pySerialTransfer ...
P_B's user avatar
  • 305
1 vote

Combined code and nothing works. Head scratcher for sure

DateTime now = rtc.now(); Does not belong above void setup() 4hours to troubleshoot this little mistake.
RobE's user avatar
  • 7
1 vote
Accepted

How do I make a character array scanner properly?

If I had to guess, I'd make a loop that will reasign the index of each character one step back or something like that but I'm not sure if that's how I should do it. Yep, that's pretty much it... ...
Majenko's user avatar
  • 105k

Only top scored, non community-wiki answers of a minimum length are eligible