0

I am a beginner in programming. I write a code to convert images into base64. I attached that python script bellow. Then I need to send that output data of base64 to my Arduino board. But it shows some problems and nothing going happen on the Arduino. Please help me to solve this problem.

python script

import base64
import serial
with open ("image.png","rb") as img_file:





my_string= base64.b64encode(img_file.read())
#print(my_string)
encoded=my_string.decode('utf-8')
print(encoded)
Arduino_Serial=serial.Serial('COM3',9600)
Arduino_Serial.write(my_string)
Arduino_Serial.close()

Arduino script

String myText;
void setup() {
Serial.begin(9600);
pinMode(LEDTrans, OUTPUT);
while(Serial.available())
{
myText=Serial.readString();
}

Please guide me to do this.I need to send image converted base64 ouput to the ardiono.I need to serial read that base64 ouput to the "myText". please help me solve this anyone..

0 Answers0