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
2answers
39 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 ...
0
votes
2answers
49 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 ...
0
votes
1answer
111 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....
0
votes
0answers
41 views

memcpy is corrupting serial output even before call

I just want to memcpy some data into a buffer, but it completely destroys my serial output. Arduino Nano Arduino IDE || VS Code with Platform.io Here the relevant declarations: uint8_t picture[4170]...
3
votes
1answer
50 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 ...
1
vote
0answers
70 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 ...
1
vote
0answers
35 views

Is it a rule of thumb to always use a buffer for realtime data acquisition from a microcontroller? [closed]

I probably have a misunderstanding one way or another, so this may be a bad question, but whenever I see sketches of projects that are outputting realtime data or in general, I always see the use of ...
1
vote
2answers
104 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 = ""; ...
2
votes
1answer
2k 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. ...
0
votes
2answers
671 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+...
0
votes
0answers
176 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 ...
0
votes
0answers
118 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: ...
2
votes
2answers
881 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, ...
1
vote
1answer
1k 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 ...
1
vote
0answers
292 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 ...
1
vote
2answers
897 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. ...
0
votes
1answer
431 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 ...
1
vote
1answer
2k 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((...