pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • Examples
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

Community

  • Events
    • Developer Retreat 2015
    • Developer Retreat 2014
  • Online Communities
  • Example Apps
    • Hello
    • Caltrain
    • HeroBoard
    • Multi Timer
    • Resistor Time
  • Tools
    • App Message Bridge
    • Appstore Badge Generator
    • GPath.svg
    • pBuild Travis CI Build Tool
    • Sublime Text Plugin
    • Watchface Generator
    • Watch Status
  • Libraries
    • Color Selector
    • Custom Status Bar for Pebble
    • EffectLayer
    • GBitmap Colour Palette Manipulator
    • Java Pebble Timeline
    • JS Message Queue
    • Pebble Timeline API for DotNet (C#)
    • Pebble API PHP
    • PebbleTimeline API Ruby
    • PHPebbleTimeline
    • PinPusher
    • pypebbleapi
    • Simple Dithering Library
    • T3 Keyboard
    • ToastLayer Library

Caltrain

Caltrain is a Pebble app that displays upcoming trains at a station, and where those trains will stop along the remainder of each of their routes.

It stores the schedule locally in resources, and makes heavy use of resource_load_byte_range to read in the required data without running out of RAM. This is wrapped in a block reading API for performance reasons; without that it takes several seconds to load each window.

It also uses Persistent Storage to store the state of the UI, so it can be restored to the state in which you left it when you return to the app.

Finally, it uses PebbleKit JS to retrieve your location on launch. If it gets a response before you manually choose a station, it will automatically show the station closest to you.

The windows were built using CloudPebble's UI Editor.

A python script is included to convert from the Caltrain GTFS data to the compressed format it uses.

Screenshots:

Created By:

Katharine Berry

View on Appstore

View Source