Forum Tips and Tricks


Post your forum Tips and Tricks here!

Do you have some simple but useful tip that will save users time, or make their forum use much more rich with features? Post them here! Tips and Tricks should be short and to the point. Also, please don’t post questions here regarding anything other than the tips and tricks posted. I will organize and link to each relevant tip from this first post as the thread builds. If you have a way to improve a tip or trick, please make a suggestion. Thanks!

Please use these formatting techniques to submit your tips and tricks:

Table of Contents

for Tips and Tricks found in below posts

  1. Formatting your Code Examples is Easy
  2. Make Keyboard Shortcuts look Beautiful!
  3. Make Keywords stand out
  4. Fix Reply Box height with cool Bookmarklet
  5. Use the Search function

How to use a REST API to do a POST with Spark Core?
Serial.begin kills Setup() in Electron
Live data from photon shown on server
Blank page in HTML browser controller
Webhook Tutorial - Send an Email!
Particle Publish Event CURL not working
Electron sleep problems, yet again
InfluxDB/Telegraf Webhook JSON error
OLED Display Code Help
Power Saving modes
Am I Doing Something Wrong?
Using char strings and sprintf - problem with Time.format()
Spark Photon Expected Shipping Dates
Photon and the PIN_MAP[] challenge!
Welcome! Using Particle Forums and Forum Etiquette
[Fixed] Webhooks callbacks are not reliable!
Sharp Memory LCD Displays = Ultra Low Power
Current sensor ACS712 error
Spark-bouncer - Cloud+RFID based door access control - configure rules via cloud calls, handle >3000 keys on flash storage, live logging via publish, RFID OTP read/write/compares, bling!
[SOLVED]AdaFruit_LSM303 errors
Sparkcore operating without an instruction
Tying an MCP23008 to Particle
Electron reading digital pin state help request (novice)
Malfunctioning if statement
Probems with Serial1

Formatting your Code Examples is Easy

Here is a quick tip that makes your posted code look beautiful.

// The following two line is for Local Builds, 
// but works fine in the Sparkulator (web IDE)
#include "application.h"

void setup() {

void loop() {
  // Blinky code

Here’s what my post looks like edited:

All you have to do is wrap your code in


// my code
if(worldRuler == “ME”) {


and it will look like this:

// my code
if(worldRuler == "ME") {

Make sure the




are on their own lines!

Some further discussion about the language hints (e.g. cpp, java, …) can be found in this thread

Home Security System with Arm Function Not working
Button to LED code not working
Newbie: spark core locks me out
Detect movement by Electron RSSI project Success!
Read from RX/TX Pins
How to make the accelerometer on asset tracker work every times it has a change?
How to Display the Temperature readings?
IFTTT Integration for notification on receiving a Twilio SMS doesn't work
Erratic mouse movement while Photon is plugged in
Expose spark core connection ready and disconnect event to API in spark-protocol DeviceServer.js
Simple PHP Page
[Fixed/Solved] Calling a web PHP page not working anymore: after a code modification and flash
Why does D0 never turn off? (code help)
Commenting styles, I have a dream
Commenting styles, I have a dream
Commenting styles, I have a dream
Using spark.publish() json format
Thermal sensor AOSONG AM2302 project
Webhook to FIWARE
HttpClient Example Issues
Using Spark.publish
Using Tinker with my own code - HELP!
Spark core web relay
Examples of basic recipes
TCP server and client between two photons
Does pinSetFast work reliably?
AC dimmer Timer Interupt

Make Keyboard Shortcuts look Beautiful!

Here is a quick tip that makes your keyboard shortcuts look beautiful. Every want to tell someone what keys to press, but you you type something like press CTRL + ALT + DEL to get to the Task Manager. Well, NO MORE! Check this out…

Just use the keyboard tags.

<kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Del</kbd>

Looks like the real thing!

Ctrl + Alt + Del


Make Keywords stand out

To make keywords like function names or commands stand out of the text without putting them in a code block, you can use this symbol ` (grave accent) before and after the respective word (in some languages you might have to press SPACE after it to make it appear).
And the * does some magic, too :wink:

The text above was typed like this

 ... make `keywords` like ***function*** *names* or **commands** stand out ...


Fix Reply Box height with cool Bookmarklet

The following link loads a twitter bootstrap html page (i.e., cool page) that’s shared from my Dropbox account (i.e., super hacky web hosting because It’s too easy to drag and drop it to my webhost through Filezilla FTP). It has a bookmarklet that you can drag up you your bookmarks bar and click while on any Discourse forum (such as this one) to change the reply box height to 200px. This is useful if you have maximized your reply box on a computer with a large monitor, and then switch to a smaller monitor computer with no way to shrink the reply box. This bookmarklet will reset your reply box height to something you can grab and resize.

Get the Fix Reply bookmarklet to instantly set your Reply box to a height of 200px.

Add this code to a Bookmark called Fix Reply:



Hey @BDub, thanks for this it is a great help.

I have struggled with the issues you address here.

Thank you very much.

Now… more tips please!! :wink:


Use the Search function

Contrary to popular belief, and prior experiences with those ‘old fashioned’ forums, Discourse provides a really well working search functionality. Please, for the sake of the community,USE THE SEARCH FUNCTION. It’s not that hard, and it provides reliable answers, for which you don’t have to scroll through the entire forum. For those who are visual learners:

The search button is the little looking glass at the top right corner, next to your profile image, and notification bubble.

To get more, and possibly more relevant, answers, please click the “show more” button, which is shown after entering a query. Shown in the picture below:

I know it’s easier to just open a new thread, ask your question, and wait for answers. But with the community growing, there will be more and more questions asked, and more time will have to be spent answering those. We’re absolutely okay with that, and you’re more than welcome to ask question. It will however clutter the forum if some questions have to be answered on 7 different topics, while they’ve been answered several times before. So I’d like to request it once more: please use the search functionalities, and don’t be afraid to read a bit before opening a new topic.

Thanks in advance!

How Photon connects to the Particle Cloud

To bypass the incredibly annoying Ctrl + F hijacking that occurs in Discourse (this forum software) for select browsers, press Ctrl + F twice.

There’s a debate thread over at


To center an uploaded (via drag and drop, copy paste or the upload icon ) wrap it into this

<div align="center">
<img src="..." >



Adding a spoiler block like this

What's it? This should not be seen immediately

<summary>What's it?</summary>
This should not be seen immediately


How to mark a thread as solved:

The OP of a thread or a moderator can click the ellipsis symbol image at the bottom of the solving post, this will reveal a image icon to click.

That way the respective post will be quoted in the opening post and the thread marked as solved.