Visual programming with Blockly on the Photon!


As part of some work I’ve been doing for edtech startup Machido, I’ve put together a quick port of Blockly for the Photon, using Particle’s APIs. With it, you can do drag-and-drop visual programming, hit a button, and have it flashed to your photon, just like on Build.

It’s a bit basic so far - the set of blocks needs expanding and the UI could use some refinement - but fully functional. You can try it out at - you’ll be asked to sign in with your Particle account.

Feedback hugely appreciated!

Photon-based 3 wheeler robot

Nicely done @nickjohnson! It’s really easy to use.

Good old blinky

I get “Upload failed” on a Core after 1 second, but the upload then starts and completes successfully.

Is there a way to save a diagram yet?

Another small thing: digitalWrite can only take a hard-coded value whereas analogWrite can take a variable.


Thanks! Note that if you click on the gear in the ‘if’, a box pops up. Drag an ‘else’ into an ‘if’ in the box, and your ‘if’ becomes an ‘if else’, so you can skip the extra comparison.

Hm. Does it return a status code? I see a few 500s in the logs due to timeouts, but nothing else.

Not yet. Your current work is saved in localstorage between page loads, but there’s no persistent storage on the server. It’s on the todo list, but it will require a secondary login, because Particle doesn’t currently provide any identity information - so I can’t identify you between login sessions.

Good point. A lot of this comes from BlocklyDuino, which has some seriously hinky code, and is a bit inconsistent in places. I’m trying to straighten it out as I go. The source is at in the ‘blocklyphoton’ branch - Please feel free to file bugs - or pull requests!


Yes, it was a 500 each time.

Thanks for the link! I’ll take a look.



I am not able to find this branch of blockly photon. can you please help.


If you follow your own link you can find it here :wink:


Hi @ScruffR,

i enjoyed programming the Photon using Blockly, thanks for this cool stuff.

Can you please help on how to add custom blocks and host it on an EC2 instance or any server?

I am trying to build something for kids.



That’s probably something to best ask the contributor of that project.


thanks @ScruffR

@nickjohnson can you please help on this.



Hi @nickjohnson ,

Can you please help me on this.