Go Down

Topic: Code added by Add Tab Disappears  (Read 544 times) previous topic - next topic


Each time I add my own code to the Create Editor using the Add Tab option it disappears when I come back to the Editor.  I'm using Ubuntu Linux 16.04.6 and Firefox.

Is there a way to get the code to stay with the project?


If you don't have "Enable Autosave" checked in your Preferences, you'll need to hover your mouse over the button with the three dots and then click "Save" before you close the Arduino Web Editor in your browser.


Also ensure tabs have something in them

IIRC empty tabs didn't used to be saved.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.


Yes, I ensure I have something in them otherwise the code would not compile since I am referencing it in the application.   I've tried to use the Save option at the top of the screen (under the three dot menu) and the only Tab of the code I added that gets saved is the .h file, not the .cpp file.   Each time I use the Editor I have to add a tab for the .cpp file before I can compile the code again.

If I download the code from the three dot menu after adding all of my own code via the tabs, then the code is saved locally will all files in it.  However, if I close the browser window or click "GO TO IOT CLOUD" and go back to the Editor, the .cpp file is missing again.


What is the name of the .cpp tab?

After you do the save, do you see the little message that pops up and says "{sketch name} saved", where {sketch name} is the name of your sketch?


The Tabs are labeled:

I am able to download the code from the Create Editor and compile it fine in the Arduino IDE and load it into a MKR1000 without issue.

This did require installing the following libraries into the Arduino IDE via Manage Libraries to get it to compile though.


There were a number of warnings seen for the debugMessage method, although no issues for the code I added.

Code: [Select]
/home/jomoros/Arduino/libraries/ArduinoIoTCloud/src/EthernetConnectionManager.cpp: In member function 'virtual void EthConnectionManager::check()':
/home/jomoros/Arduino/libraries/ArduinoIoTCloud/src/EthernetConnectionManager.cpp:72:55: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
           debugMessage("No Ethernet chip connected", 0);
/home/jomoros/Arduino/libraries/ArduinoIoTCloud/src/EthernetConnectionManager.cpp:83:66: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
           debugMessage("Failed to configure Ethernet via dhcp", 0);



Go Up