Hello.
I am using NANO33 IOT third time having no problem to compile and upload the sketch in IOT Cloud.
But this time I have permanent problem that IOT is not compiling my sketch independently if by OTA or via USB.
What is wrong with my sketch ?
/*
Sketch generated by the Arduino IoT Cloud Thing "Untitled"
https://create.arduino.cc/cloud/things/b9e132b2-fb27-4070-ad4e-ea4c4e157e39
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
float humidity;
float pressure;
float temperature;
Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/
#include "thingProperties.h"
//#include <WiFiNINA.h>
#include "Seeed_BME280.h" //biblioteka czujnika BME280
#include <Wire.h>
#include <SPI.h>
#include <Arduino.h>
#include <U8g2lib.h>
BME280 bme280;
U8G2_SH1106_128X64_WINSTAR_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
// Defined in thingProperties.h
initProperties();
bme280.init();
u8g2.begin();
u8g2.enableUTF8Print();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}
void loop() {
ArduinoCloud.update();
// Your code here
pressure = bme280.getPressure()/100.0;
humidity = bme280.getHumidity() ;
temperature = bme280.getTemperature();
Serial.print(pressure);
u8g2.firstPage();
do {
u8g2.setFont(u8g2_font_lubR24_tr);
u8g2.setCursor(0, 45);
u8g2.print(pressure);
u8g2.setFont(u8g2_font_lubR19_tr);
u8g2.setCursor(70, 45);
u8g2.print(" hPa");
}
while ( u8g2.nextPage() );
delay(1500);
u8g2.firstPage();
do {
u8g2.setFont(u8g2_font_lubR24_tr);
u8g2.setCursor(0, 60);
u8g2.print(humidity);
u8g2.setFont(u8g2_font_lubR19_tr);
u8g2.setCursor(90, 60);
u8g2.print(" %");
} while ( u8g2.nextPage() );
delay(1500);
u8g2.firstPage();
do {
u8g2.setFont(u8g2_font_lubR24_tr);
u8g2.setCursor(0, 30);
u8g2.print(temperature);
u8g2.setFont(u8g2_font_lubR19_tr);
u8g2.setCursor(90, 30);
u8g2.print(" C");
} while ( u8g2.nextPage() );
delay(1500);
}
do you mean "compiling" (as in the process of generating the binary file corresponding to your code) or "uploading to the board" (transferring that successfully compiled binary onto the flash memory of the board)?
Well if I understand the Cloud Editor : first activity is verifying the sketch - the green pushbutton with check mark,.Next- if sketch is positively verified - is compilation with uploading binary code to the board - this is after pushing the green button with arrow.
In my case, after pushing first button - nothing happens, same as after pushing this second button.
I was expecting some information, as with my two previous NANO 33IOT boards
So this is the reason that the compilation is rejected at the early stage without any information. Looks like Cloud Editor is not recognising my sketch.
Stan
The check mark button actually performs a full compile (thus indeed it verifies that the code will compile) and the other button does the same + upload
HI.
I checked as you suggest.
During verification the Editor informed that the process is running
After a few seconds compilation ( or verification ) was finished with success.
See attached print screen: Untitled 2.pdf (74.7 KB)
But in my case when I am trying verify and upload my sketch - there is no reaction from the side of the Cloud Editor.
I do not know if this is important or not but this particular sketch was done with old version of the Cloud Editor. And the program was running without problems. Actually I am using new version of the Cloud Editor, and I have problems with compiling and uploading program with some improvements.
If you need more information - let me know.
Thank you
Stan
I dont really use the web editor, just the IDE so I can’t say really what is going on
If it works from a blank sketch I would suggest that you copy paste the resources from the old generation stuff into a new project and see if it makes a difference
Hi.
I've tried as suggested by you and started with removing all device data from the cloud.
I' ve tried from the very beginning- add the NANO as new device.
And Cloud was not able to configure my NANO.
So I purchased the next NANO 33 IOT and again , the IOT Cloud was not able to configure my board. Board have newest firmware version ( 1.5.0)
I've checked the WIFI and internet operation with my new NANO and - everything was ok.
So where is the problem?
What did you do? I've tried to add device to IOT cloud see screenshot "Screen_1" Screen_1.pdf (98.9 KB)
What were the results you expected from doing that thing? It will allow me to create "project" ( meaning - to create thing add variables and create dashboard )
What were the results you observed that did not match your expectations? The adding of the device ( = my NANO 333 IOT board) , was not possible. The process stopped at firmware update - seee attached Screen_4. Screen_4.pdf (44.6 KB)
And what is strange for me - the board have WIFi NINA firmware 1.5.0 ( checked with the IDE). I do not have the problems with interned and WiFi in my location - checked with pinging Google and have result in average 30msec.
The same behaviour is for both NANO33 IOT boards: one previously worked successfully as device in IOT Clod and second freshly purchased
My Arduino Agent's version is 1.4.0 b213179. The Mac IOS is latest update same as Safari.
If you need more information- let me know.
Thanks
Stan