Edit or Add a cloud variable to existing sketch creates new basic sketch

When I attempt to add a new variable to an existing sketch the cloud editor creates a new sketch with the new cloud variables but none of the existing code from the original sketch.
The original sketch is unchanged.
How can I force the cloud editor to update the current sketch with the new cloud variables?

Hi @mackarduino. I gave it a try, but was not able to reproduce the behavior you describe.

Please add a reply here on this forum thread that provides detailed instructions I can follow to reproduce it.

Make sure to tell me which editor you are using. At the current time, there are three different editors an Arduino Cloud user might have a sketch open in:

Hi,

Thanks

These are the 2 editor screens which I am using. I did not realise that there are 3 editors!

Old Editor The first editor Verify OK and I can also upload the sketch to a Nano 33 iot and it connects to the Arduino cloud OK. Success.

New Cloud Editor The 2nd editor Verify Fails with a Nano 33 iot specified but not connected to a usb

The 2 Editors both Verify the sketch OK if a MKR WIFI 1010 is specified but not connected to a usb. I have not attempted an MKR upload.

I have a 2nd query.

When I add a new cloud variable on the Thing Setup web page a new minimal sketch is created.

But what I want to do is add this new cloud variable to my existing sketch.

Can I choose an existing sketch to be edited instead of creating a new sketch which is minimal?

Regards

mack

Thanks for the clarification.

This is a known bug with the "new" Cloud Editor. It has been reported to the Arduino Cloud developers. If you are interested in technical details, you can find an explanation here.

For now, please use either the Thing sketch editor or the "old" editor when you run into this problem. I'll add a comment here once the bug has been fixed so that you'll be able to switch back to using the "new" Cloud Editor for all your sketches again.

Unfortunately I have not been able to reproduce this behavior. When I add a new Cloud Variable to a Thing, it is added to the existing Thing sketch as expected.

Please add a reply here on this forum thread that provides detailed step-by-step instructions I can follow to reproduce the behavior of a new minimal sketch being created when you add a new Cloud Variable to a Thing.

It should work that way. When you add a new Cloud Variable to a Thing, it should update the existing Thing sketch.

Hi,

I now have a better understanding of the 3 cloud editors. It would be helpful for new users to be easily alerted that there are 3 editors.

I deleted and recreated my Thing, used the Thing editor to recreate my sketch and yes it all works correctly.

Adding new variables updates the Thing Sketch as expected.

Thanks

The "old" and "new" editor situation is only temporary. The "new" Cloud Editor was released only recently. Since this is a complete reworking of the editor, Arduino decided that it would be best to allow a transition period where users are able to revert back to the "old" editor in case they encounter a bug in the "new" editor. Once we are confident that the "new" editor doesn't contain any significant regressions, the "old" editor will be retired and there will only be the one Cloud Editor.

As for the "Thing sketch editor", I believe that is a permanent Arduino Cloud feature. The "Thing sketch editor" does a pretty good job of making the existence of the Cloud Editor known to the user through the prominent "Open full editor" button on its toolbar. The "old" editor likewise provides a path back through its own "GO TO IOT CLOUD" toolbar button. The "new" editor doesn't have that, but it does have the icon at the top left corner of the page that opens a navigation panel that gives access to all components of Arduino Cloud, so perhaps that is sufficient.

I'm glad it is working now. Thanks for taking the time to post an update!

Regards,
Per

Hi @mackarduino. I'm happy to report that the Arduino Cloud developers have fixed the bug in the "new" Cloud Editor that caused the "Verify" operation to be considered a failure when it produced innocuous stderr output.

So you can now switch back to using the "new" editor if you like. Please let us know if you still encounter the problem.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.