Get started with Particle Workbench


#1

Originally published at: https://blog.particle.io/2019/06/03/get-started-with-particle-workbench/

Particle Workbench is a robust, local Integrated Development Environment for firmware development and debugging. It provides all of the tools, libraries, and extensions you need for IoT development, and because Workbench built on Visual Studio Code, you get all the features available in the world’s most popular, cross-platform text editor.

In this video, you’ll learn how to use Particle Workbench as your local IDE for Particle projects. Particle Workbench is available for Windows, macOS and Linux, and provides all of the same capabilities as the Particle Web IDE, plus a number of other features that are perfect for Particle power users.

For other videos covering the basics of working with Particle devices, check out our Particle 101 series on YouTube. If you have questions about using Particle Workbench, or anything else in the Particle platform, visit us in the Particle Community.


#2

I’ve been using VS Code for everything - and also for Particle dev for many years with this hack.
I’ve been using now Workbench and I must say it’s great work.
One thousand chapeau bas to you @m_m !!!

Nice video Brandon, you almost convinced me to leave the VS Code dark theme behind.
I like it that the video is short and to the point, :+1:
Gustavo.


#3

thank you @gusgonnet :pray::heart:

we’re just getting started :wink:


#4

Full-disclosure, @gusgonnet, I use a dark theme for my day-to-day work (currently the amazing Synthwave 84), but switch to lite for demos and videos. :smiley:


#5

I need to use Visual Studio Work Bench now to start playing around with the Gen 3 Bluetooth features.

I have all my projects in folders that I build in using Particle DEV.

When I open the project folders in Work Bench its all there but when I then open the Particle Tab and choose which device I want to compile for I get this error message saying it’s needing a Project.Properties file?

I assume this is a file that Particle DEV did not need or generate that is generated when starting a new project in Work Bench.

So what do I need to do when loading project folders from Particle DEV into Work Bench to generate this Project.properties file it’s asking for?


#6

I don’t know what you need to do, but I can tell you what I did.

  • I left my old projects intact
  • I chose my first old project as a candidate to be “migrated”
  • I created a new project in VS Code//Workbench
  • I copy-pasted the ino from the old project in the ino from VS Code/Workbench
  • I added the libraries via VS Code//Workbench

boom, that worked fine for me.
All the best Ryan!
Gustavo.


#7

Thanks!

I have a lot of custom/modified libraries so I’m hoping there is a easier way to create the Project.Properties file.

Looking forward to getting used to Work Bench, it’s look alot more powerful and feels cutting edge :slight_smile:


#8

I have a few of those too.
In those cases what I did is I copy-pasta the files right next to the ino file. The build process will pick them up.

VS Code is a great great great tool. I use it for all my coding needs, not only Particle. Love it. I’m ultra happy that we have Workbench now. :champagne:


#9

Hey @RWB did you try running the “Import Project” command from the Workbench command palette?


#10

Found some instructions @ScruffR had posted for somebody else which showed me how to create a new project.

What I’m seeing is that your folder path cannot have any whitespace or blank spaces or it will not work. My folder path to all my projects had some whitespace so I had to erase the whitespace for them to work in Workbench.

So I can create a new blank project inside my current project folder that holds the code I want to use and then Workbench creates the project properties file which it is asking for. Then I copy the project code into the new project folder Workbench Created and were all good to go!


#11

I finally have Particle Workbench up and running and I’m flashing code just like I used to on Particle IDE!

I’m very happy to have finally made the switch over to WorkBench and understand how to use the basic parts of the program now.

Excellent work Particle Team! @will @m_m @bsatrom @zach @zachary


#12

Awesome, glad to hear it @RWB! Let me know if you run into any other issues or have other questions!

For the whitespace issue, are you running WB on Windows?


#13

Yes, Windows 10 on MacBook Pro


#14

Ok, I feel like that’s a known limitation I’ve seen before, but I don’t use Win10, so I can’t be certain. Is that right @m_m?


#15

Should I clean the build every time I switch to compile the different Gen3 devices?


#16

Should I clean the build every time I switch to compile the different Gen3 devices?

yes. workbench tries to detect a “dirty” state at launch and will prompt you to clean if necessary but in general we say “when in doubt, clean” :+1:

What I’m seeing is that your folder path cannot have any whitespace or blank spaces or it will not work.

yes, an unfortunate limitation of our current build system - more info here:


#17

Cool I turned off the Dirty Clean Check and quickly realized it’s required which switching between devices so I turned the check back ON.


#18

Hey guys @m_m or anybody else :slight_smile:

image

Do you guys know how to get this lightbulb problem finder back after it has been disabled?

I can’t find any info on how to get this little useful guy back :smile:


#19

:thinking: i don’t recall the exact setting but i’m pretty sure you’ll find it if you open preferences - from the main menu click “Code” (or “File” on windows) > “Preferences” to open the settings editor. from there you can click the “{}” icon top-right to toggle between editor and raw JSON views. raw JSON is a bit easier since it’ll just include your edits (vs. the editor which shows everything). check each level of settings - “User”, “Workspace”, and if applicable “Folder” - via the links top-left below the search bar.


#20

found it in settings!

Thanks!