[ISSUE] Local Flash and Cloud Flash - no Cloud Functions

electron
Tags: #<Tag:0x00007fe21fda7a10>

#1

Env:
Version: 1.37.1 (system setup)
Date: 2019-08-15T16:17:55.855Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362

When doing a local compile or cloud compile from Workbench, it’s not registering the Cloud Functions. Not sure how to troubleshoot this.

For example, when I compile the following code from Particle Web IDE, it lists command as a function.

void setup() {
  Particle.function("command", com);
  pinMode(D0, OUTPUT);
}

void loop() {
}


int com(String command) {
  return 1;
}

However, if I use this same exact code from VS Workbench, and do a Local Flash or Cloud Flash, my device will not show any functions available.

Any ideas on how I can troubleshoot this?


#2

hm. that’s odd. not sure what’s up but here’s what worked for me:

  1. run the Particle: Create New Project command (docs)
  2. once the new project loads, open ./src/<project name>.ino and copy+paste your application code
  3. configure your project to use the platform (e.g. photon) and Device OS version (e.g. 1.4.0) that matches your target device (to update, click the items in the status bar - see screen grab below)
  4. make sure your device is plugged in via usb and run the Particle: Flash application & Device OS (local) task (docs)
  5. once the flash operation completes, run the Particle: Launch CLI command
  6. in the terminal instance that launches, run particle list

status bar - project settings

in my case, those steps ultimately produced the following:

photonatron [<device id>] (Photon) is online
  Functions:
    int command(String args)

couple of things to check:

  1. are you signed in? run the Particle: Who am i? command to verify
  2. what particle.targetPlatform (e.g. photon, argon, etc) and particle.firmwareVersion (e.g. 1.4.0) project settings are you using?
  3. are you seeing any build errors?
  4. does your target device appear at all when running the CLI particle list command?
  5. run the Particle: Audit Environment and scan the report for any fields like: “ok”: false

let me know how it goes :+1:


#3

Thank you m_m,

Apologies for the delayed response. I got pulled away from my computer for a few days. Your solution worked for me. I must have set the original project up wrong somehow.

Thank you again.