How to access ardunio serial port using mathlab

2 views (last 30 days)
How to develop this code to access arduino serial poart and how to read 1, 0 valuea from transmitter. and also how to reading values for receiver code for arduino ?
filename = 'image.jpg';
img = imread(filename);
bitstream = reshape((dec2bin(img(:), 8) - '0').', 1, []);
reconstructed = uint8( reshape(bin2dec(reshape(char(bitstream + '0'), 8, []).'), size(img)) );
imshow(img);
title('original');
imshow(reconstructed);
title('reconstructed');

Answers (0)

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!