uint8_t (C language - Type). uint8_t stores an 8-bit unsigned number, from 0 to 255. It is equal to unsigned char.
Questions tagged [uint8t]
272 questions
0
votes
1 answer
Playback of recorded kinect depth stream on matlab - cdata not in uint8 type
I am new to Matlab and Kinect programming. I have managed to struggle through to line 155 of 162 of my code but now I have come stuck and would appreciate any help.
I am trying to record both colour and depth streams so that I can image process them…

Anthony White
- 13
- 1
- 4
0
votes
2 answers
C-1 dimension array of uint8_t is actually 2 dimensions array?
ok,i know very little on C from university course, so i hope you will understand my question.
im using FFmpeg library for android so i just need to understand somethings in their C code.
so,
i have this struct:
typedef struct AVFrame {
#define…

yarin
- 543
- 1
- 5
- 18
0
votes
1 answer
Passing an array of uint8_t to Arduino using gcc and termios
I'm currently working on a project that requires serial communication between a g++ compiled program and an Arduino ATMega2560 using termios as a means of serial communication. The g++ program sends an array of 5 uint8_t values that are parsed by…

MSalmo
- 352
- 1
- 14
0
votes
0 answers
Assign charracters/value to uint8_t array
Have a look at the code below:
/* NDEF messages TEXT */
const uint8_t text1[] = "This is message No1";
This is used to set a NDEF message. Is it possible to write an array with a function instead of defining the array like above?
I want to make a…

Matthijs
- 133
- 6
0
votes
1 answer
uint8_t[] array transform to NSString got (null)
I have no idea why the (char *)uint8_t array transform to NSString doesn't work.
ivString always is (null)
- (IBAction)encryptPacketBtnTouchDown:(id)sender {
NSString *key = @"1234567890123456";
NSData *plain = [plainMessage.text…

Yi Jiang
- 3,938
- 6
- 30
- 62
0
votes
2 answers
Dealing with uint8_t in javascript
G'day peoples,
I'm using MavLink to obtain GPS information. One of the message types is GPS_STATUS which is described by MavLink using a series of uint8_t[20].
If I run the following code:
console.log(' sat prn: ' +…

Metalskin
- 3,998
- 5
- 37
- 61
-1
votes
1 answer
How to convert char array to uint8_t and print it in c?
I have a decimal number and we have converted it to hex and have stored in a hex array. After that I added a "0x" to this number (in fact char array). Now I want to convert this hex number (in char array) to Uint8_t and then print it. The first…

sh.sagheb
- 27
- 1
- 1
- 7
-1
votes
1 answer
Converting uint8_t array to a char array or string in C
How can I convert a uint8_t array to a char array or string in C?
uint8_t array[10];

Eric
- 23
- 4
-1
votes
1 answer
Reuse a uint8_t buffer to store UART responses
I have a uint8_t rxBuffer[200] = {0}; array.
The buffer receives messages from UART
USART1.Receive(rxBuffer, sizeof(rxBuffer));
I want to receive UART responses in this rxBuffer, parse them and then reuse this array to parse further responses. How…

omkar joglekar
- 35
- 7
-1
votes
1 answer
Converting a given 2d array into a binary image using opencv in python
So here is the incomplete code
import cv2
import numpy as np
arr= np.zeros((30,30))
# bw_image =
cv2.imshow("BW Image",bw_image)
cv2.waitKey(0)
cv2.destroyAllWindows()
#please use arr at 4th line to complete the code
I am actually…

Rahul
- 3
- 2
-1
votes
2 answers
uint8_t array return is causing errors using all scenarios (**, *, &, nothing)
int8_t** FileToColorMap(char* colorfile, int* colorcount)
{
FILE* fp = fopen (colorfile, "r");
if (fp==NULL)
{
printf("no such file.");
return 0;
}
int r,g,b;
fscanf(fp, "%d", colorcount);
uint8_t*…
-1
votes
2 answers
How produce two's complement of a Uint16?
I have two bytes of data. I converted each of them to Uint8 then I produced a Uint16 from them.
How I can produce two's complement of this Uint16 number?
I've tried uInt16 = ~uInt16 + 1 but the code produces 32bit integer and I want it to stay a…

Behnam Shahabadi
- 3
- 3
-1
votes
2 answers
Converting binary int to binary uint8_t in c
I have an array defined as
int data[k];
where k is the size of the array. Each element of the array is either 0 or 1. I want to save the binary data in another array defined as
uint8_t new_data[k/8];
(k is usually a multiple of 8).
How can I do…

zahra
- 175
- 1
- 10
-1
votes
1 answer
Initializer fails to determine size of errror
I'm new to a little new to programming, how do I store a variable in message? I'm trying to make a wireless temperature sensor using LoRa, with an Arduino Uno + Dragino shield. The results to be displayed on the things network. Everything else is…

Yasas Medagoda
- 1
- 2
-1
votes
1 answer
c++ convert string to uint8_t array and back
I'm trying to convert a string into an uint8_t array and back to a string, but I don't receive the same result:
#include
#include
#include
#include
using namespace std;
string ByteArrayToString(const uint8_t…

wasp256
- 5,943
- 12
- 72
- 119