Questions tagged [buffer]

The term "buffer" is a very generic term, and is not specific to IT or CS. It's a place to store something temporarily, in order to mitigate differences between input speed and output speed. While the producer is being faster than the consumer, the producer can continue to store output in the buffer. When the consumer speeds up, it can read from the buffer. The buffer is there in the middle to bridge the gap.

Filter by
Sorted by
Tagged with
0 votes
2 answers
113 views

Clear serial data for new incoming values

I'm trying to extract numbers from a string sent via serial and then convert the numbers to integer values which I can use for arithmetic operations or toggle an Led. But the problem is I have to send ...
bquark's user avatar
  • 9
0 votes
2 answers
39 views

Serial Buffer stays empty as soon as it becomes empty once

I have a question regarding serial buffer readout. At program start, I send a serial command to a sensor that 1. activates him and 2. let him send data - that works. When I unplug the sensor, the ...
Gymknopf's user avatar
1 vote
1 answer
86 views

How to optimize checking for specific string in a UART stream

I want to check for specific string (like "RecordStart") in a UART stream (115 200 baud 8N1) from a camera, to know when it is recording or not/if there is an SD. I am using an ESP32-WROOM-...
AyubowanPro's user avatar
3 votes
1 answer
303 views

Arduino IDE equivalent to DataView?

I am working on a project with Bluetooth commands between various devices. I would like to try and convert a string to a DataView Object on Arduino, so I can send it over BLE, much like this function ...
NRav's user avatar
  • 225
1 vote
0 answers
37 views

Why is this buffer not being sent to the server?

I'm loading a buffer with different data recorded by sensors and sending them to a server. But I also wanted to log when the data was sent on the client side, so I formatted the time of my RTC clock ...
5TableLegs's user avatar
0 votes
2 answers
244 views

Problem cleaning string read from serial buffer

I am trying to move a stepper motor when a specific command is send to Arduino Mega 2560. This command is read character by character and stored in a string variable. Whenever a new command is sent, ...
Yan Araújo's user avatar
1 vote
1 answer
223 views

Unexpected character added to char buffer array in serial monitor only when SD card initialized

I'm getting an unexpected extra character added to the serial monitor print line only when I initialize an SD card in the code. Normal The code below gives me this expected result in the serial ...
Dashiell Rose Bark-Huss's user avatar
1 vote
0 answers
268 views

Save Circularbuffer in RTC memory of ESP32

I would like to save my Circular Buffer in the RTC memory of my ESP32 when I use deep sleep. So I have initialized it with RTC_DATA_ATTR but when I go into Deep Sleep I lose the data I've saved. Is ...
EMall's user avatar
  • 11
1 vote
1 answer
52 views

Elements excluded from buffer array output after given structure (ESP8266 WifiSniffer) (snifferPacket)

I am currently trying to determine how the ESP8266 WifiSniffer program by Kalanda works. Here is the source code: #include <Arduino.h> extern "C" { #include <user_interface.h> ...
Lachlan Etherton's user avatar
-2 votes
1 answer
3k views

What is the maximum size of Static Json Document in Arduino JSON?

I'm trying to do serial communication between Arduino mega and a esp8266, and having issues with determining the size of the JSON document. I have read that the receiver buffer size should be greater ...
Binara Medawatta's user avatar
1 vote
2 answers
2k views

Clearing string buffer with memset after a serial read

In using the SerialTransfer.h / pySerialTransfer libraries to send commands between my laptop and an Arduino Mega, I am sending multiple sequential strings between the devices. However, I'm having ...
David W's user avatar
  • 39
0 votes
2 answers
600 views

Is Arduino Mega useing one buffer or multiple buffers?

So Arduino Mega has Serial, Serial1, Serial2, Serial3. However, does those Serial lines use the same buffer? or four independent ones? i.e. are they truly receive single independently, or actually ...
ShoutOutAndCalculate's user avatar
0 votes
1 answer
273 views

I can't use buffer without printing in my Nodemcu esp8266

#include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> #include <WiFiClientSecureBearSSL.h> #define WIFI_SSID "ssid" #define WIFI_PASSWORD "password" void setup() { Serial....
alphaceph's user avatar
3 votes
1 answer
90 views

writting to buffer from serial input

Can some one explain this behaviour please, i have the following code byte buffer[512]; byte block; byte len; Serial.setTimeout(60000L) ; // wait until 20 seconds for input from serial ...
DevilWAH's user avatar
  • 143
2 votes
0 answers
361 views

Reading byte per byte from a txt file on SD Card without using the 512Bytes buffer

I am trying to read every sequenced-byte that is located on a txt file in the SD card. I have been reading quite a lot about the SPI and SD libraries, But I have found a lot of different information ...
DEMPEROR's user avatar
1 vote
2 answers
321 views

Error handling strings and chars

I'm having an error in buffers that handle strings and I can not figure out what the problem is. The example below shows what is happening. Can someone help me? void setup() { char* ss1 = ""; ...
wBB's user avatar
  • 293
2 votes
1 answer
5k views

How to transmit string data using the rc-switch library?

I am using the rc-switch library for sending and receiving data. In rcswitch library, there is no method to send string data. I am using below method to send the string message in char buffer. ...
Chayan Mistry's user avatar
0 votes
2 answers
3k views

What is the minimal possible latency between arduino and PC

Case specifications: PC OS: Debian 9, x64 arch Starting time point: i have a 1kb buffer on arduino that i want to send to host PC Ending time point: i have recieved the buffer in a custom written C\C+...
xakepp35's user avatar
  • 133
1 vote
0 answers
368 views

Overwrite image buffer (inside Adafruit SSD1306)

I'd like to add a method that replaces the entire image buffer into the Adafruit_SSD1306 library. I haven't worked with dynamic memory handling for ages and I'm not sure how to just simply overwrite ...
haxpanel's user avatar
  • 187
1 vote
0 answers
168 views

Baud rate dependency

I am currently trying to write (obtain) a code for getting raw acceleration values and yaw, pitch and roll angles using these Jeff Rowberg's examples. I have used MPU6050_DMP example to get this code: ...
virmis_007's user avatar
2 votes
2 answers
1k views

What causes Serial.available() to become false after Serial.read() gets data?

As serial data bytes are being read from the serial buffer by Serial.read(), are they removed from the Arduino's 64-byte serial buffer altogether? In my current situation I'm using SoftwareSerial, ...
JRiggles's user avatar
  • 123
1 vote
1 answer
2k views

Buffer reverse to string

A few hours since I started messing with my first Arduino and I was trying to understand a small program and need some help. The program sends out the MAC address to the serial port. As it's little ...
R.W's user avatar
  • 155
1 vote
0 answers
388 views

Arduino hardwareSerial Bluetooth.println not sending string over 310 chars

Hey all I am wondering if my code below can be modified in order for the Arduino to send more than 300 chars to a HM-10 bluetooth 4.0 le module? #include <SoftwareSerial.h> #define ...
StealthRT's user avatar
  • 257
1 vote
2 answers
994 views

Communication with socketserver fails after specific number of packets

I'm trying to implement a full-duplex communication between my ESP8266 and a socketserver running on my laptop. In concrete I need each of the devices to initiate communication whenever it needs to. ...
Sim Son's user avatar
  • 1,829
0 votes
1 answer
743 views

Transfer byte-buffer with ENC28J60

How do I transfer a series of byte[256]-buffers to a server with an ENC28J60 Ethernet adapter? I get blocks of uint8_t from an Arducam camera module and I'd like to transfer them to a host. Does ...
goetzmoritz's user avatar
1 vote
1 answer
4k views

How can Arduino know Wire.available() is true or false?

In this part of code void readFrom(byte device, byte fromAddress, int num, byte result[]) { Wire.beginTransmission(device); Wire.write(fromAddress); Wire.endTransmission(); Wire.requestFrom((...
Andrea Ciufo's user avatar