Things used in this project

Hardware components:
Photon new
Particle Photon
×1
12002 04
Breadboard (generic)
This was the base of our device and consisted of the Particle, wires, LCD, and Potentiometer.
×1
11026 02
Jumper wires (generic)
These wires allowed us to connect the Particle to the LCD.
×1
Bourns 3362p 1 103lf image 160px
Single Turn Potentiometer- 10k ohms
We used this to adjust the brightness of the LCD.
×1
181 02
Adafruit Standard LCD - 16x2 White on Blue
This was used to display the quote of the day or the default "Waiting for quote of the day"
×1
Software apps and online services:
Q8wtlimqnp04fzhtr9v5
IFTTT Maker service
BrainyQuote
Hand tools and fabrication machines:
Lasercutter
Laser cutter (generic)
This was used to cut the box designed to fit the device.

Schematics

Fritzing Diagram
This diagram was used to arrange our wires.
Image 2t892y50ef

Code

Coding For Our Quote GeneratorC/C++
Hopefully this will help you understand our thoughts behind our final project.
// This sketch is based on instructions found here: http://blog.jongallant.com/2015/10/particle-photon-lcd-setup/
// The next few lines are to state what we’re using and the general things we need to have happen
#include "application.h"
#include <LiquidCrystal.h>
LiquidCrystal lcd(D0, D1, D2, D3, D4, D5);
SYSTEM_MODE(AUTOMATIC);
// The LCD will show this when there’s no quote or when the quote is loading so the screen is never blank
String content = "Waiting for the quote of the day";
int strLength;
// This gives the dimensions of the LCD
void setup() {
  lcd.begin(16, 2);
// Display Quote is the function being used by particle
  Particle.function("Display Quote", displayQuote);
}
// This loop will allow the quote to scroll and fit on the LCD so it can be read, and will repeat the scrolling automatically. The actually scrolling code is further down
void loop() {
// This says that when the string length is greater than 16 characters, the LCD should use the scrolling function
  strLength = content.length();
  if (strLength > 16) {
    scrollText();
  }
//This part of the code allows the LCD to keep itself from scrolling when the quote is less than 16 characters
  else {
    lcd.home();
    lcd.print(content);
  }
}
boolean displayQuote (String subject) {
  content = subject;
  return true;
}
// This is the breakdown of the code allowing the quote to scroll on the LCD
void scrollText() {
  String onScreen;
  for (int i = 0; i < strLength - 15; i++) {
    lcd.home();
    onScreen = content.substring(i, i + 16);
    lcd.home();
    lcd.print(onScreen);
    delay(750);
  }
}

Credits

5f0dbc025a85296cbb9b51a65b0bb72a
Maddy
1 project • 0 followers
Contact
Photo
Sean Freese
0 projects • 0 followers
Contact
Thanks to Sean Freese.

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / Login