i want to read in 300 bits on 1 input (serieel) with using a clock pulse. i want to store this.
0,1 sec later i have to do this again.... and again... and again for 300 times.
so i receive 300x300 = 90 000 bits.
what is the most easy way to do this ?
i already did some homework of course, and i found a way to store a single bit in a array, the problem is that you normal not can use a single bit in a array.
but whit this trick it was posible, and i save it in my favorites (google)
and then.....my laptop crashed so my favorites in google are gone
but i already used a part of the code in a program (not tested) so maybe some one wil recognize this trick ?
with the same trick it was also possible to read out a single bit.
just for your information, what i finally want to gonna do whit the bitmap: you can imaging, this wil gif a bit map from 300x300 bits. in this bitmap you can see the shape from (for example) the letter E. later i wil gonna draw this letter whit a marker on paper. (steppermotors).
thanks in advance for your help, and i like to wish every one a happy and healthy 2019.
int colum ; int colnum = scan/32; // i = array index (use: A[i]) int pos = scan%32; // pos = bit position in A[i] unsigned int flag = 1; // flag = 0000.....00001 flag = flag << pos; // flag = 0000...010...000 (shifted k positions) A[colnum] = A[colnum] | flag; // Set the bit at the k-th position in A[i]