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.

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.

22 questions
3
votes
1 answer

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 // Ask personal data: Family name …
DevilWAH
  • 143
  • 5
2
votes
0 answers

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 that makes me feel confused. Is it really…
DEMPEROR
  • 31
  • 2
2
votes
1 answer

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. send_string("Hello…
Chayan Mistry
  • 123
  • 1
  • 5
2
votes
2 answers

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, but this question applies to both software and…
JRiggles
  • 123
  • 5
1
vote
0 answers

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 and tried to include it in the buffer, but this…
5TableLegs
  • 33
  • 3
1
vote
1 answer

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 monitor: Serial Monitor 23:31:12.745 -> inputString:…
1
vote
0 answers

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 there a way to do this? Here is my…
EMall
  • 11
  • 2
1
vote
1 answer

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 extern "C" { #include } #define DATA_LENGTH 112 #define TYPE_MANAGEMENT …
1
vote
2 answers

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 trouble "clearing" the receiving buffer on the…
David W
  • 39
  • 6
1
vote
2 answers

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 = ""; char* ss2 = ""; String txt = ""; …
wBB
  • 283
  • 1
  • 2
  • 8
1
vote
0 answers

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 its pointer to point to a different memory address…
haxpanel
  • 187
  • 1
  • 1
  • 9
1
vote
0 answers

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: // I2Cdev and MPU6050 must be installed as…
virmis_007
  • 13
  • 4
1
vote
1 answer

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 endian, the "printBufferReverse" reverses the…
R.W
  • 145
  • 1
  • 1
  • 7
1
vote
0 answers

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 #define SERIAL_BUFFER_SIZE 512 SoftwareSerial bluetooth(8,9); // RX,…
1
vote
2 answers

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. The ESP is measuring temperature all the time and…
Sim Son
  • 1,809
  • 9
  • 18
1
2