Did Duke Win?

An IoT project using the SparkFun Inventor’s Kit for Photon

Project abstract

If you missed the last Duke Men’s basketball game, use this IoT device to instantly check the outcome and score via a button press, voice command, or other IFTTT trigger! This project uses an Http Get Request, OLED screen, servomotor and interrupts.

Full project description

I built this project to utilize some of the coolest components of the SparkFun Inventor’s Kit: the MicroOLED screen, the servomotor, and the internet-connected P1 Photon chip. A library is used to make a Get Request to pull information from diddukewin.com. Particle Cloud functions are used to expose the core functionality of the device to the web.

Parts Used

  • SparkFun Photon RedBoard
  • Mini breadboard
  • SparkFun Micro OLED
  • Push-button
  • Servomotor
  • Hookup jumper wires
  • Micro-USB power source (V-USB used for servo)

Source Code

The diddukewin.ino file is included in the src folder of the Gitlab repo: gitlab.oit.duke.edu/dpb6/diddukewin

If you are using the Build IDE, you need to add the SparkFunMicroOLED library (version 1.3.0) to your project and create new files for the included HttpClient.cpp and HttpClient.h, which were modified to enlarge the buffer size for the response body.

Techniques and Features Utilized:

  • HttpClient library to make a Get request
  • OLED library to make writing to the screen easy
  • Built-in servo object for waving the Duke flag
  • Interrupt to catch the button press
  • Particle Cloud functions to expose the wave, displayScore and check routines

IFTTT voice command

Using an IFTTT Applet I connected my Google Assistant with my Particle Photon Cloud Function check. I can now say, “Ok Google, Did Duke Win?” and my IoT device will check the web and show me the result.

Hardware wiring

Wiring diagram of the SparkFun Inventor’s Kit for Photon, MicroOLED display, servomotor and pushbutton. Made at Fritzing.com

An Always-Updated Analysis of #docklessdurham Bikeshares

Dockless Durham is Dead?


Lime Free Helmets

Get a free Helmet from lime by signing their pledge to ‘respect the ride’ https://www.li.me/respect-the-ride

Lime Price Increase

Mid-September 2018 Lime updated their pricing model for pedal bikes in Durham. The new price is $1 to unlock plus 5¢/min, and with the EDU discount it is 50¢ to unlock plus 2¢/min.

City of Durham’s Info Page



There are currently two companies operating in Durham (Spin and Lime). Ofo was a third operator that was the last to start and the first to pull out of the Durham market. I have taken look at the costs, details, bikes, and apps. Thanks for reading, and let me know if you have corrections or additions!

Reporting Problems

For bike relocation requests or to report a bike that’s in need of repair, here is the contact information:



  • Current promos will be added here

Education Discounts

LimeBike and Spin offer a 50% education discount to those who register with an EDU email address. This discount applies to both pay-per-ride and subscription models. For Spin, the pay-per ride cost becomes 50¢ per half hour. For Lime, there is an extra 2¢/min charge. The LimePrime  and Spin Unlimited subscriptions are also discounted as outlined in a section below. Note, when signing up for Spin don’t use the Facebook button to  log in, rather enter an EDU email address if you have one to qualify for the 50% discount.

Regular Price Pay-Per-Ride

Spin charges $1 per 30 minutes of ride time (half price with EDU email). For Lime there is an extra 5¢/min charge (2¢ with EDU discount).


The monthly model is pretty simple for Spin – a number of months with unlimited 30-minute rides for a fixed price. One month unlimited is $29 ($14 with EDU email). A 3-month plan is $59 ($29 with EDU email), and a 12-month plan is $99 ($49 with EDU email).

With an EDU address, the Spin Unlimited plan provides unlimited 30-minute rides at a good price.

For LimeBike there appears to be a monthly price of $29.95 ($14.95 with the EDU discount). Rather than being unlimited like Spin, this plan includes 100 ‘free’ rides, and then above 100 in a month each ride is 14¢ each.

Reloading Pay-Per-Ride Balances

For Spin and LimeBikes there are ‘bonuses’ awarded when reloading your balance:

  • Spin’s bonus is $1 extra for every $5 reloaded. So effectively every 6th ride is free.
  • LimeBike’s bonuses are ‘1 free ride’ when you add $10, ‘3 free rides’ when you add $20, or ’10 free rides’ when you add $50.


Spin is cheaper or equal to LimeBike for pay-per-ride and subscriptions. Spin also offers the best reload bonus, especially if you have the EDU discount.

Referrals Rewards

  • Spin offers a free ride up to $10 when you refer a friend with your personal code. Presumably this is a single ride up to 5 hours in length?
  • LimeBike offers 3 free rides for you and 3 for the person you referred. Presumably these are all 30-minute rides.

If you appreciate this guide, please use my referral codes:

  • LimeBike: RP37UXF
  • Spin: DAVIDBR01


LimeBike has the most generous referral bonus.

Free Rides on LimeBike ‘Bonus Bikes’?

Bonus Bikes
Lime’s Bonus Bikes are marked with a moneybag icon in the app.

LimeBike offers free rides on so-called ‘Bonus Bikes’. If you ride that bike for at least ten minutes, they make your ride free. I noticed most of the ‘Bonus Bikes’ help relocate underused bikes to new locations where they may see more traffic, without relying on LimeBike employees to shuttle bikes around in vans. It’s not clear how to tell which specific bike in a cluster of bikes matches up to the Bonus Bike on the app map besides renting one and hopefully getting lucky.

Bike Quality and Features

The obvious difference is color (Orange for Spin and lime green for LimeBikes). All bikes have 3-speed twist shift, lights, fenders, a basket, a step-through frame, kickstand, bell, etc. Some LimeBikes have an adjustable cell-phone mount on the handlebars. None of the bikes come with helmets. The handlebars are a bit different on the bikes: I find the Spin bars to be pretty narrow for me, and I like the swept-back LimeBike handlebars best.

A Warning for Tall Riders

Not all LimeBikes are created equal: some have ‘normal’ seatpost clamps and long seatposts which fit me well, while others have a simple seatpost lever (see photo) and short seatposts. I have also had a few of the ‘normal’ seatpost LimeBikes where the seatpost was jammed all the way down, so beware and raise the seat before you rent! Spin seems to have the longest seatposts, and on some of their bikes you can extend the seat beyond the 2″ safety margin line or remove the seat entirely (time will tell if we see these orange bikes vandalized and seatless).

Seatpost Lever
Some LimeBikes have a simple seatpost lever with short seatposts which aren’t good for tall riders. Check before you rent!


Download apps for the bikeshare operators here:

There is a third party app called Transit which allows one to check many  transportation options at once. Right now it supports all local bus systems, Spin, Uber, and directions for biking and walking. Get it below and see these articles for more information!
Transit: Apple, Android