ESP32 Configuration Error When Uploading Server: First input must be either a character vector or a string scalar
Show older comments
I have a project where I need to send sensor readings to MATLAB through WiFi and also be able to control actuator\give orders through MATLAB. I already configured my esp32 to connect to wifi on arduino IDE. However when I am configuing and setting up the arduino hardware on MATLAB, I get the error message that First input must be either a character vector or a string scalar.
If anyone has an idea on how to solve this that would be great!
Note:- I followed these steps: https://www.mathworks.com/help/supportpkg/arduinoio/ug/configure-setup-for-esp32-hardware.html
#include <WiFi.h>
const char* ssid = ".."; //choose your wireless ssid
const char* password = ".."; //put your wireless password here.
void setup(){
Serial.begin(115200);
delay(1000);
WiFi.mode(WIFI_STA); //Optional
WiFi.begin(ssid, password);
Serial.println("\nConnecting");
while(WiFi.status() != WL_CONNECTED){
Serial.print(".");
delay(100);
}
Serial.println("\nConnected to the WiFi network");
Serial.print("Local ESP32 IP: ");
Serial.println(WiFi.localIP());
}
void loop(){}
1 Comment
Hi Hana,
It seems that in some function the argument passed is of different datatype than expected, try converting the arguments to appropriate datatype.
To track the issue exactly, please provide the complete code and the steps to reproduce the error.
Answers (0)
Categories
Find more on Read Data from Channel in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!