Comments (9)
hi @GitHubRea
Not really clear what the issue is.
If you are referring to the constant not being recognised this might be a minor issue.
Does the code compile and run properly?
If it does not compile and run then it's indeed a bug :)
Also, could you post the code in a snippet?
that allows us to test it doing copy/paste :)
from arduino-ide.
Hello ubidefeo
sorry the delay.
here the code.
Thx
#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");
}
}
from arduino-ide.
@GitHubRea
It is working for me out of the box.
If you cannot compile or the IDE cannot see library definitions it might mean that you haven't installed any cores yet.
Check the README on the main GitHub page for this project and you'll see.
Let me know if this fixes your issue
The Arduino Pro IDE does not provide pre-installed cores, to have board support you have to install a core by using the menu
Tools -> Board Manager...
from arduino-ide.
Hello ubidefeo,
you are right, it is not possible to compile. But I installed the needed core and library.(see attachments)
I am using the MKR Wifi 1010 port.
ArduinoProIde_1.pdf
ArduinoProIde_2.pdf
Thanks for the effort!
from arduino-ide.
unfortunately I cannot reproduce the issue,
let's see if someone else has an idea of what could be troubling your setup
from arduino-ide.
Hello I am so sorry,
I found the problem for my issue.
I saved the project to an other folder, not in the Arduino basic root.
ArduinoIdePro_library.pdf
And in this project folder there is no library folder included.
I copied the library folder in this project folder. After that it was compiling.
So I think I should handle my projects in the installed root of Arduino.
ArduinoIdePro_correctFolder.pdf
What do you think?
Thanks a lot!
from arduino-ide.
... is it possible to set the folder root of library somewhere in the ProIDE.
Because in standard IDE it is possible to save setches in other folders.
Thx and sorry for my boor english.
from arduino-ide.
@GitHubRea
I know it's been a long time, but this works for me on the latest Alpha 0.1.4
we're cleaning up old issues.
@per1234 I saw you can still replicate this, I have noticed that as soon as you trigger the Language Server by selecting a board it starts working for me
from arduino-ide.
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.
from arduino-ide.
Related Issues (20)
- Hanging Downloading index: package_index.tar.bz2 HOT 2
- Ctrl+; to add/remove semicolon at end of line
- SaveAs also copies old binary builds
- Example files: Save as does not save changes and read only flag is still set on ino file HOT 1
- Arduino IDE 2.3.2 Crashing in the libary manager
- variable ARDUINO has wrong value HOT 3
- Electron 27 is EOL HOT 1
- Move the .ino .h .c tabs from the top of the screen HOT 1
- IDE starts outside of the viewing area HOT 3
- Some small improvement suggestions HOT 2
- Issue #2878 is still an issue (Can't remove library using IDE library manger GUI) HOT 3
- 2.3.2 AppImage fails to start due to missing sandboxing HOT 9
- Cannot support Chinese paths and file names HOT 1
- The output of the Port Monitor is not copied HOT 1
- Crash after opening board manager or library manager HOT 1
- Intermittent availability of error line navigation features for additional sketch files
- Missing App Icon on Linux.
- Faster compiles HOT 1
- Using third party board and using debugging feature on Arduino IDE
- Arduino-Ide Linux failed to start with Fedora 40 new mesa-driver
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-ide.