Arduino cannot receive serial data from blender I'm trying to send data from blender to arduino(Arduino mega 2560) using pyserial 2.7. But blender cannot send data to Arduino.I'm using COM3 as my serial port and there is no problem with sending data from Arduino to blender.When I'm trying to send data from blender to arduino it print out this error



My blender code

import serial


ser = serial.Serial("COM3", 115200)
var = 10
out = ser.write(var)


arduino code

int led = 40;
void setup() {
Serial.begin(115200);
pinMode(led, OUTPUT);
}


void loop() {
if (Serial.available())

{

int t= Serial.read();

digitalWrite(led,HIGH);


}


Does anyone knows where I'm doing wrong??
The traceback clearly prints:

Could not open port 'COM3' PermissionError(13) 'Access is denied'


Try to run it as admin.