Browse our open source example apps to accelerate your wireless IoT project.

Blues Developers
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Button IconHelp
Notehub StatusVisit our Forum
Button IconSign In
Sign In
Sign In
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
homechevron_rightExample Appschevron_rightAcceleratorschevron_rightSign and Door Tilt Sensor

Sign and Door Tilt Sensor

  • Hostless
  • Motion Tracking

Detect when a sign is knocked over or a door is opened/closed.

You Will Need

  • USB A to micro USB cable
  • LiPo battery with JST cable
  • Notecarrier-A
  • Notecard

Notehub Setup

Sign up for a free account on notehub.io and create a new project.

Hardware Setup

  1. Assemble Notecard and Notecarrier as described here.
  2. Plug the LiPo battery's JST cable into the Notecarrier port labeled "LIPO".
  3. Connect the micro USB cable from your development PC to the port on the Notecarrier.

Notecard Firmware

The Notecard should use firmware version 3.5.2 or higher. The simplest way to update firmware is to do an over-the-air update.

Testing

With the Notecarrier connected to your development PC, navigate to open the in-browser terminal, and connect to the Notecard. Then, enter this command in the terminal:

{ "req": "hub.set", "product" : "com.your-company:your-product-name", "sn": "a-serial-number", "body": {"app":"nf19"} }

Make sure to replace "com.your-company:your-product-name" with your ProductUID from Notehub Setup. Also, replace "a-serial-number" with the serial number of other relevant identifier for this particular sign/door (e.g. "refrigerator door").

Next, enter this command to optimize battery, assuming our power source is the LiPo battery:

{ "req": "card.voltage", "mode": "lipo" }

You can read more about this command in the Low Power Design documentation.

Finally, enter this command to have the Notecard send a note to Notehub every time it detects motion:

{ "req": "card.motion.sync", "start": true, "threshold": 0 }

The "start": true parameter tells the Notecard to begin motion tracking. The "threshold": 0 parameter makes it so the Notecard will sync motion event notes to Notehub only when its orientation changes. So, for example, if we've mounted our device to a sign and that sign gets bumped but doesn't tilt/tip over, no motion event will be synced. If the sign falls over, an event will be synced. You can read more about these parameters in our card.motion.sync documentation.

With those commands entered, unplug the Notecarrier's USB connection so that the Notecard's running on LiPo power. Flip the Notecarrier over on your work surface. Go to your project on Notehub, open the Events tab, and soon enough you should see an event like this in _motion.qo for the flip:

{
  "alert": true,
  "motion": 1,
  "movements": "1",
  "orientation": "face-down",
  "temperature": 17.375,
  "tilt": 1,
  "voltage": 5.1286890300781243
}

Let's break down the fields in the response:

  • alert: This will always be true when we get a _motion.qo note after issuing card.motion.sync.
  • motion: The number of motion detections since the last note.
  • movements: A string of base-36 characters, where each character represents the number of movements in each bucket during the sample duration. Each character will be a digit 0-9, A-Z to indicate a count of 10-35, or * to indicate a count greater than 35.
  • orientation: The orientation of the Notecard in space. In the above example, I flipped the Notecarrier over so that the Notecard was resting against my table, so the orientation is "face-down."
  • temperature: Temperature reading from the Notecard.
  • tilt: The number of orientation changes since the last motion note.
  • voltage: The current voltage.

Notecard CLI

You can also use the config.json file in this directory along with the Notecard CLI to issue the above commands in one fell swoop:

notecard -setup config.json

Again, you'll need to edit config.json and replace com.your-company:your-product-name with your ProductUID from Notehub Setup.

On This Page

  • You Will Need
  • Notehub Setup
  • Hardware Setup
  • Notecard Firmware
  • Testing
    • Notecard CLI

Resources

  • GitHub
  • Request More Info
© 2025 Blues Inc.
© 2025 Blues Inc.
TermsPrivacy
Notecard Disconnected
Having trouble connecting?

Try changing your USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

Advanced Usage

The help command gives more info.

Connect a Notecard
Use USB to connect and start issuing requests from the browser.
Try Notecard Simulator
Experiment with Notecard's latest firmware on a Simulator assigned to your free Notehub account.

Don't have an account? Sign up