-
-
Notifications
You must be signed in to change notification settings - Fork 435
Problem with WiFiNINA.h #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hi @GitHubRea Also, could you post the code in a snippet? |
Hello ubidefeo here the code. #include <SPI.h>
#include <WiFiNINA.h>
char ssid[] = "xxx";
char pass[] = "xxx";
int status = WL_IDLE_STATUS;
byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0x7D, 0x54 };
WiFiServer server(80);
void setup() {
// initialize serial:
Serial.begin(9600);
Serial.println("Attempting to connect to WPA network...");
Serial.print("SSID: ");
Serial.println(ssid);
status = WiFi.begin(ssid, pass);
if ( status != WL_CONNECTED) {
Serial.println("Couldn't get a wifi connection");
while(true);
}
else {
server.begin();
Serial.print("Connected to wifi. My address:");
IPAddress myAddress = WiFi.localIP();
Serial.println(myAddress);
}
}
void loop(void) {
WiFiClient client = server.available();
//two variables to hold your temperatures
float temperatureIndoor;
float temperatureOutdoor;
if (client) {
Serial.println("new client");
//an http request ends with a blank line
boolean currentLineIsBlank = true;
while (client.connected()) {
if (client.available()) {
char c = client.read();
Serial.write(c);
// if you've gotten to the end of the line (received a newline
// character) and the line is blank, the http request has ended,
// so you can send a reply
if (c == '\n' && currentLineIsBlank) {
// send a standard http response header
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connnection: close");
client.println();
temperatureIndoor = 22.77;
temperatureOutdoor = 15.55;
client.print("{\"arduino\":[{\"location\":\"indoor\",\"celsius\":\"");
client.print(temperatureIndoor);
client.print("\"},");
client.print("{\"location\":\"outdoor\",\"celsius\":\"");
client.print(temperatureOutdoor);
client.print("\"}]}");
client.println();
break;
}
if (c == '\n') {
currentLineIsBlank = true;
}
else if (c != '\r') {
//you've gotten a character on the current line
currentLineIsBlank = false;
}
}
}
// give the web browser time to receive the data
delay(1);
// close the connection:
client.stop();
Serial.println("client disonnected");
}
} |
@GitHubRea
|
Hello ubidefeo, ArduinoProIde_1.pdf Thanks for the effort! |
unfortunately I cannot reproduce the issue, |
Hello I am so sorry, I found the problem for my issue. So I think I should handle my projects in the installed root of Arduino. Thanks a lot! |
... is it possible to set the folder root of library somewhere in the ProIDE. |
@GitHubRea we're cleaning up old issues. |
I am able to reproduce the issue of the incorrect language server results for the WiFiNINA library with older versions of the IDE (e.g. 2.0.0-beta.3), but not with 2.0.0-beta.12. So I'll close this as fixed. If anyone is able to still reproduce the issue with the latest version of the IDE, please comment here with full details and I'll investigate. Note: While attempting to bisect, I had annoying experiences of the bad state persisting into later IDE versions until I cleared the data folders, after which I could no longer reproduce the issue with those later IDE versions. |
Describe the bug

problem with WiFi-Status constant.
see screenshot: arduino-pro-ide 0.0.5
But in Arduion 1.8.12 it is working fine

Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: