File Locations for CLI compiler - Electron

Hi. I’m a newbie starting off with an Electron. I am working through the startup guides and have installed Particle CLI (node.js) and can execute the particle commands at the CMD prompt OK.

In the following instruction on the guide (page is https://docs.particle.io/guide/tools-and-features/cli/electron/#blink-an-led-with-tinker), I dont know where the blinky.io file should be saved.

Guide text is “You can write whole apps and flash them remotely from the command line just as you would from the build IDE. Let’s write a small blink sketch to try it out.
Copy and paste the following program into a file called blinky.ino”

(I think the guide should say where it should be saved).
As a result when I try to compile the code in blink.io the CLI returns:

“I couldn’t find that: blinky.ino
Compile failed. Exiting.
undefined”

Thanks for any help.

Save it anywhere you like, just make sure your command line is in the same directory when trying to use is. On windows you can use CD to get there, or open in (the console) from the menu.

Thanks Moors. Got it. Worked fine.

Feedback to other newbies. When using Windows Notepad to save a file you dont want “.TXT” on the end of the file.
I saved from Notepad as {blinky.ino} but I didnt realise Windows had thoughtfully saved it as {blinky.ino.txt}, so that the CLI compiler didnt recognise/find the file.
Save in Notepad with quote marks " around the file name (eg “Blinky.ino”) and Notepad doesnt save with the .TXT extension.
Maybe I am the only person who didnt know that- but thought I’d share just the same…

Glad it’s working :smile:

As for the file names, in the ‘view’ options of windows explorer, you can enable it to show file extensions, which should help in situations like theses.

Thanks for that. Yes that option in Windows Explorer is now my default :slight_smile:

1 Like