Hello,
I am planning to send data through the COM port to Processing to construct a low-resolution image based on the collected data. As it is being sent over UART, I assume that the refresh rate will be very low. My idea is to create different segments of 5x5 pixels. So if I have only 25 data points, the image will be 25 pixel based (each data point will be considered as an individual pixel). And I will only increase the number of data points by 25.
First, I thought of using the rect(a, b, c, d) function for each pixel and the fill(a) function to use the UART data as color. I wanted to use the 5x5 section to create two different loops. One will be called to draw the 5x5 pixel image and then, based on how many 5x5 segements I have, I’ll call the other function to add the other 5x5 blocks to different sides of the first block. My primary goal is to add at least four of those blocks.
And even just thinking about this process made me realize that it can be very slow. Is there any way I can make the process quicker?
Your idea seems sound. I would suggest that any implementation you choose to work out will help you define how “fast” or “slow” the code is. You can then see about ways of improving it.
It seems to me UART can run quite quickly, (Common values for baud rate are 9600, 1200, 2400, 4800 , 19200, 38400, 57600, and 115200 bps) it just depends how many calculations you wish to send per loop cycle from your arduino or from processing’s draw loop.
Share some of your code and members will jump in to help.
Thanks. I have already completed the UART communication code. It seems to work. but still have not completed the design. If there is a speed-related issue, then I can use this example to see if there is any improvement.
By the way, is there some way I can select a thermal camera type color palette other than using RGB to fill the squires? I have seen fill() as the primary way to select color for an object.