This might be quite basic but why does my Electron want to flash programs made in Particle build and saved in .io-files ONLY OTA and not using serial? I have succeeded in registrating my Electron and in flashing the firmware.bin so that's not the problem.The message in CLI goes as following:
Memory use:
text data bss dec hex filename
5532 8 1564 7104 1bc0
Compile succeeded.
Saved firmware to: /tmp/117013-28306-1xja21.vedgarwwmi.bin
! Flashing firmware Over The Air (OTA) uses cellular data, which may cause you to incur usage charges.
! This flash is estimated to use at least 0.007 MB, but may use more depending on network conditions.
! Please type 0.007 below to confirm you wish to proceed with the OTA flash.
! Any other input will cancel.
? Confirm the amount of data usage in MB:
ScruffR yes I typed it here incorrectly, in CLI it worked fine with --serial.
Okay, Moors7, if I want to upload blinky.ino (so that my led in D/ would blink in my Electron) to my board without OTA using serial, what is the command i should use?
You always flash a binary to the device - never source code!
The command particle flash <deviceName> <source.ino> just hides the fact that you send the source.ino to the build farm which compiles it into a .bin but instead of handing it back to you (for download and USB flashing) forwards it directly to the OTA update endpoint which then loads the binary onto your device to be flashed there.
Thank you! I restarted my terminal and now it says “command not found” when I use particle -commands. What should my path be exactly to run particle-commands? I’m inside particle-cli -folder where there is app.js and particle.sh -files for example but commands are still not working.
You want to install the CLI globally so you can access it from anywhere. For Windows there’s an installer, but doing npm install -g particle-cli should do the trick as well.